diff --git a/src/apps/AppMonitoringObject/Add.vue b/src/apps/AppMonitoringObject/Add.vue index fb3cb9a9..f8d3e103 100644 --- a/src/apps/AppMonitoringObject/Add.vue +++ b/src/apps/AppMonitoringObject/Add.vue @@ -184,7 +184,6 @@
-
@@ -517,14 +516,17 @@ export default { ...mapState(['user']), isEdit() { return !!this.$route.query.id - } + }, }, + 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 + this.form.birthday = this.$idCardNoUtil.getIdCardInfo(idNumber)?.birthday + this.form.age = this.$calcAge(this.form.idNumber) }, deep: true, }, @@ -636,8 +638,6 @@ export default { }, submit() { - - if(!this.isEdit) { if (!this.form.riskType) { return this.$u.toast('请选择风险因素') @@ -700,10 +700,6 @@ export default { }) }, - onChange(e) { - this.form.placeAreaId = e - }, - getInfo(id) { this.$http.post(`/app/apppreventionreturntopoverty/queryDetailById?id=${id}`).then(res => { if (res?.data) { @@ -720,15 +716,10 @@ export default { this.helthList.map(items => { items.checked = res.data.healthyStatusList.includes(items.dictValue) }) - this.form = { - ...this.form, - ...res.data - } - // this.photo = [{url: this.form.photo}] + this.form = { ...this.form, ...res.data } if (this.form.photo) { this.photo = [{url: this.form.photo}] || [] - // this.form.files = [{url: this.form.photo}] } } diff --git a/src/apps/AppMonitoringObject/MonitorAddFamilyMember.vue b/src/apps/AppMonitoringObject/MonitorAddFamilyMember.vue index 69ff8aeb..a944cf93 100644 --- a/src/apps/AppMonitoringObject/MonitorAddFamilyMember.vue +++ b/src/apps/AppMonitoringObject/MonitorAddFamilyMember.vue @@ -661,6 +661,8 @@ export default { let {name, idNumber, currentAreaId, currentAreaName} = v?.[0] || {} this.form = {...this.form, name, idNumber, currentAreaId, currentAreaName} this.form.sex = this.$idCardNoUtil.getIdCardInfo(idNumber)?.sex + this.form.birthday = this.$idCardNoUtil.getIdCardInfo(idNumber)?.birthday + this.form.age = this.$calcAge(this.form.idNumber) }, deep: true, },