Browse Source

密码验证

feature
mk 1 year ago
parent
commit
26d6d9b5ae
  1. 33
      src/views/modules/base/resi.vue
  2. 13
      src/views/modules/portrayal/jumin/index.vue

33
src/views/modules/base/resi.vue

@ -968,16 +968,36 @@ export default {
} }
); );
}, },
handelCLickShowCheckPassword(row) { async handelCLickShowCheckPassword(row) {
const url = `/actual/base/residentCategoryUpdateInfo/isUpdater/${row.resiId}`;
const { data, code, msg } = await requestPost(url);
if(code==0){
if(data==true){
this.editUserId = row.resiId;
this.saveCheckPassword()
}
else{
this.editUserId = row.resiId; this.editUserId = row.resiId;
this.showCheckPassword = true; this.showCheckPassword = true;
}
}
else{
this.$message.error(msg);
}
}, },
handelClickCheckPassword() { handelClickCheckPassword() {
this.$refs.checkPasswordFrom.validate(async (vali) => { this.$refs.checkPasswordFrom.validate((vali) => {
if (vali) { if (vali) {
this.saveCheckPassword(this.checkPasswordFrom.password);
} else {
return false;
}
});
},
async saveCheckPassword(password){
const url = `/actual/base/residentBaseInfo/getResiUserInfo/${this.editUserId}`; const url = `/actual/base/residentBaseInfo/getResiUserInfo/${this.editUserId}`;
let parm = { let parm = {
password: this.checkPasswordFrom.password, password,
}; };
const { data, code, msg } = await requestPost(url, parm); const { data, code, msg } = await requestPost(url, parm);
if (code === 0) { if (code === 0) {
@ -991,12 +1011,7 @@ export default {
} else { } else {
this.$message.error(msg); this.$message.error(msg);
} }
} else {
return false;
}
});
}, },
handleAdd() { handleAdd() {
this.$router.push({ name: "add-resi" }); this.$router.push({ name: "add-resi" });
}, },
@ -1177,7 +1192,7 @@ export default {
watch: { watch: {
$route: { $route: {
handler: function (newVal, oldVal) { handler: function (newVal, oldVal) {
if (newVal.name == "base-resi") { if (newVal.name == "base-resi" && oldVal.name!='edit-resi') {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.myResiSearch.form.attentionCrowds = []; this.$refs.myResiSearch.form.attentionCrowds = [];
this.$refs.myResiSearch.form.healthStatus = []; this.$refs.myResiSearch.form.healthStatus = [];

13
src/views/modules/portrayal/jumin/index.vue

@ -21,7 +21,6 @@
<div class="list"> <div class="list">
<div <div
:class="{ item: true, active: index == active }" :class="{ item: true, active: index == active }"
v-for="(item, index) in menuList"
v-for="(item, index) in menuList" :key="index" v-for="(item, index) in menuList" :key="index"
@click="handelCLickMenu(item.id, index)" @click="handelCLickMenu(item.id, index)"
> >
@ -1273,18 +1272,11 @@ export default {
// const { data, code, msg } = await requestPost(url, parm); // const { data, code, msg } = await requestPost(url, parm);
// }, // },
async handelClickJumpEdit() { async handelClickJumpEdit() {
console.log(this)
const url = `/actual/base/residentCategoryUpdateInfo/isUpdater/${this.resiId}`; const url = `/actual/base/residentCategoryUpdateInfo/isUpdater/${this.resiId}`;
const { data, code, msg } = await requestPost(url); const { data, code, msg } = await requestPost(url);
console.log(this.form.password)
console.log(data, code, msg)
if(code==0){ if(code==0){
if(data==true){
if(data==false){ this.handleSaveTuomin()
this.$router.push({
name: "edit-resi",
});
} }
else{ else{
this.checkType = "edit"; this.checkType = "edit";
@ -1294,7 +1286,6 @@ export default {
else{ else{
this.$message.error(msg); this.$message.error(msg);
} }
}, },
async getDictName(url, params, value, itemType, opction) { async getDictName(url, params, value, itemType, opction) {
try { try {

Loading…
Cancel
Save