Browse Source

新增居民重复进到居民编辑后没有姓名

feature
mk 2 years ago
parent
commit
d9ca83327f
  1. 112
      src/views/components/addResi.vue

112
src/views/components/addResi.vue

@ -338,6 +338,18 @@
<resi-expand ref="resiExpand" @submitExpand="submitExpand" @hideExpand="hideExpand"
:operationType="'add'"></resi-expand>
</el-dialog>
<el-dialog title="密码验证" :visible.sync="showCheckPassword">
<el-form :model="checkPasswordFrom" :rules="checkPasswordRulse" ref="checkPasswordFrom">
<el-form-item label="密码" prop="password">
<el-input v-model.trim="checkPasswordFrom.password" autocomplete="off" type="password" placeholder="请输入当前账号密码"
@keydown.native.enter="handelClickCheckPassword"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="showCheckPassword = false"> </el-button>
<el-button type="primary" @click="handelClickCheckPassword"> </el-button>
</div>
</el-dialog>
</div>
</template>
@ -364,20 +376,35 @@ import resiExpand from "./resiExpand";
export default {
data() {
return {
dialogVisible: false,
dialogTitle: "",
formList: [],
orgOptions: [],
orgOptionProps: {
value: 'agencyId',
label: 'agencyName',
children: 'subAgencyList',
emitPath: false,
multiple: false,
checkStrictly: true
},
form: {
resiId:null,
showCheckPassword:false,
checkPasswordFrom: {
password: "",
},
checkPasswordRulse: {
password: [
{ required: true, message: "请输入密码", trigger: "blur" },
{
min: 6,
max: 18,
message: "长度在 6 到 18 个字符",
trigger: "blur",
},
],
},
dialogVisible: false,
dialogTitle: "",
formList: [],
orgOptions: [],
orgOptionProps: {
value: 'agencyId',
label: 'agencyName',
children: 'subAgencyList',
emitPath: false,
multiple: false,
checkStrictly: true
},
form: {
baseInfoDto: {
name: null,//
idType: null,//
@ -481,8 +508,8 @@ export default {
resideSituation: null,
oldSubsidy:null
}
},
footerInputList: [
},
footerInputList: [
{
id: 'healthDto',
children: [
@ -911,14 +938,13 @@ export default {
]
},
],
idTypeList,
genderList,
hasOptions,
disabilityFlagList,
btnLoading: false,
rules: {
],
idTypeList,
genderList,
hasOptions,
disabilityFlagList,
btnLoading: false,
rules: {
"baseInfoDto.name": [
{ required: true, message: "请输入姓名", trigger: "blur" },
],
@ -934,8 +960,8 @@ export default {
"baseInfoDto.nationality": [
{ required: true, message: "请选择国籍", trigger: "blur" },
],
},
dicts: {
},
dicts: {
educationList: [], //
nationList: [], //
nationalityList: [], //
@ -956,8 +982,8 @@ export default {
value: 1,
},
],
},
logLevelChecked: 0,
},
logLevelChecked: 0,
};
},
created() {
@ -967,6 +993,33 @@ export default {
this.initHouseBind();
},
methods: {
handelClickCheckPassword() {
this.$refs.checkPasswordFrom.validate((vali) => {
if (vali) {
this.saveCheckPassword(this.checkPasswordFrom.password);
} else {
return false;
}
});
},
async saveCheckPassword(password){
const url = `/actual/base/residentBaseInfo/getResiUserInfo/${this.resiId}`;
let parm = {
password,
};
const { data, code, msg } = await requestPost(url, parm);
if (code === 0) {
this.showCheckPassword = false;
this.$router.push({
name: "edit-resi",
query: { id: this.resiId },
params: { idNum: data.idNum, mobile: data.mobile, name: data.name, nationality: data.nationality },
});
this.checkPasswordFrom.password = "";
} else {
this.$message.error(msg);
}
},
//
initHouseBind() {
for (let i in this.form.resideInfoDtos) {
@ -1234,7 +1287,8 @@ export default {
cancelButtonText: '继续填写',
type: 'warning'
}).then(() => {
this.$router.push({ name: 'edit-resi', query: { id: data.id }, params: { idNum: data.idNum, mobile: data.mobile } });
this.resiId = data.id
this.showCheckPassword = true;
}).catch(() => {

Loading…
Cancel
Save