diff --git a/src/apps/AppMonitoringObject/MonitorAddFamilyMember.vue b/src/apps/AppMonitoringObject/MonitorAddFamilyMember.vue index 34cd4367..b125a4aa 100644 --- a/src/apps/AppMonitoringObject/MonitorAddFamilyMember.vue +++ b/src/apps/AppMonitoringObject/MonitorAddFamilyMember.vue @@ -32,9 +32,7 @@
- 请选择 - {{ userList[0].name }} - +
@@ -178,7 +176,7 @@ - +
@@ -438,13 +436,11 @@ export default { id: '', $areaId: '', isEdit: false, - id: '', girdInfo: {}, householdIdNumber: '', objectType: '', userList: [], photo: [], - userList: [], flag: false, helthList: [], namelist:[], @@ -471,14 +467,6 @@ export default { }, computed: { - userChange() { - if(this.userList != '') { - this.isEdit = true; - this.form.name = userList[0].name - this.form.idNumber = userList[0].idNumber - return [this.isEdit,this.form.name,this.form.idNumber] - } - }, ...mapState(['user']) }, @@ -532,7 +520,7 @@ export default { this.namelist.splice(index, 1) } }) - + } this.form.healthyStatus = this.namelist.map(v=>v.dictValue).join(',') }, @@ -599,14 +587,14 @@ export default { if(this.photo.length) { this.form.photo = this.photo[0].accessUrl } - + this.form.girdId = this.girdInfo.girdId this.form.girdName = this.girdInfo.girdName // this.form.householdIdNumber = this.form.idNumber // this.form.householdRelation = '01' // this.form.isHousehold = 1 this.current = 1 - + // if(!this.form.riskType) { // return this.$u.toast('请选择风险因素') // } @@ -624,7 +612,7 @@ export default { this.guaranteeList.push(index) } }) - + this.form.guaranteeCheck = this.guaranteeList.join(',') this.checkInit('jcbxCxyiliao',this.basicsCheckList, 0) @@ -685,7 +673,17 @@ export default { } this.form.age = age }, - } + }, + watch: { + userList: { + handler: function (v) { + let {name, idNumber, currentAreaId, currentAreaName} = v?.[0] || {} + this.form = {...this.form, name, idNumber, currentAreaId, currentAreaName} + this.form.sex = this.idCardNoUtil.getIdCardInfo(idNumber)?.sex + }, + deep: true, + }, + }, } @@ -739,7 +737,7 @@ export default { border: 1px solid #1174FE; } } - + } }