From 8a7dc2e7988e45dbf9280268866bd0ce1d07ec66 Mon Sep 17 00:00:00 2001 From: yanran200730 Date: Wed, 19 Apr 2023 10:58:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B1=85=E6=B0=91=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/AppResidentInfo/components/Add.vue | 128 +++++++++++++++++- 1 file changed, 125 insertions(+), 3 deletions(-) diff --git a/project/fengdu/app/AppResidentInfo/components/Add.vue b/project/fengdu/app/AppResidentInfo/components/Add.vue index aebd157e..b926a592 100644 --- a/project/fengdu/app/AppResidentInfo/components/Add.vue +++ b/project/fengdu/app/AppResidentInfo/components/Add.vue @@ -184,7 +184,7 @@ + :value="[baseInfo.householdAreaName, baseInfo.householdAddress].join('')"/> @@ -275,6 +275,25 @@ :areaLevel="3" /> + + +
+ +
+ {{ item.girdName }} +
+ 请选择网格 +
{{ girdList.length ? '重新选择' : '选择网格' }}
+
+
+
@@ -359,10 +378,13 @@ export default { buildingCascader: true, houseCascader: true, navId: 0, + girdList: [], baseInfo: { registerStatus: "", tips: [], age: "", + girdName: '', + girdId: [], birthplaceAreaId: "", currentAddress: "", currentAreaId: "", @@ -426,6 +448,9 @@ export default { phone: [ {required: true, message: "请输入联系方式", trigger: "blur"} ], + girdName: [ + {required: true, message: "请选择网格", trigger: "change"} + ], householdName: [ {required: true, message: "请选择是否户主", trigger: "change"} ], @@ -481,6 +506,16 @@ export default { type: 'List' }) }, + onPick (e) { + if (e.length) { + this.baseInfo.girdName = e[0].girdName + } else { + this.baseInfo.girdName = '' + this.baseInfo.girdId = [] + } + + this.girdList = e + }, householdRelationChange() { this.baseInfo.householdIdNumber = ""; this.baseInfo.householdRelation = ""; @@ -513,7 +548,8 @@ export default { ...this.baseInfo, currentHouseList: currentHouseList?.join("|"), householdHouseList: householdHouseList?.join("|"), - tips: tips?.join("|") + tips: tips?.join("|"), + girdId: this.baseInfo.girdId[0] }).then(res => { if (res?.code == 0) { this.$message.success("保存成功"); @@ -524,8 +560,13 @@ export default { this.instance.post(`/app/appresidentapplet/queryDetailById?id=${this.params.id}`).then(res => { if (res?.data) { this.baseInfo = { - ...res.data + ...res.data, + girdId: [res.data.girdId] }; + this.girdList = [{ + id: res.data.girdId, + girdName: res.data.girdName + }] // this.family = res.data.family; this.IdCard(res.data.idNumber); } @@ -574,6 +615,87 @@ export default {