From a79248340947b233e0a1f693b547193a732e4592 Mon Sep 17 00:00:00 2001 From: liuye Date: Thu, 20 Jan 2022 15:05:53 +0800 Subject: [PATCH] 26818 --- .../2.0.5/AppGridMember/components/Family.vue | 38 +++++++++++++++++-- 1 file changed, 35 insertions(+), 3 deletions(-) diff --git a/packages/2.0.5/AppGridMember/components/Family.vue b/packages/2.0.5/AppGridMember/components/Family.vue index cd47cb7b..85e81d00 100644 --- a/packages/2.0.5/AppGridMember/components/Family.vue +++ b/packages/2.0.5/AppGridMember/components/Family.vue @@ -46,6 +46,23 @@ title="添加户主" @onConfirm="onConfirm"> + + + + + + + +
@@ -137,7 +154,9 @@ tableData: [], areaId: '', ids: [], - disabledLevel: 0 + disabledLevel: 0, + girdList: [], + girdId: '' } }, @@ -149,12 +168,20 @@ this.areaId = this.user.info.areaId this.disabledLevel = this.user.info.areaList.length this.dict.load('epidemicDangerousAreaLevel').then(() => { + this.getGirdList() this.getList() this.getUserList() }) }, methods: { + getGirdList() { + this.instance.post(`/app/appgirdmemberinfo/queryMyGirdListByLevel2?girdMemberId=${this.params.id}`).then(res => { + if (res.code == 0) { + this.girdList = res.data + } + }) + }, getList () { this.instance.post(`/app/appgirdmemberresident/listByGirdMember`, null, { params: { @@ -184,6 +211,10 @@ }, onConfirm () { + if(!this.girdId) { + return this.$message.error('请选择网格') + } + if (!this.chooseUser.length) { return this.$message.error('请选择户主') } @@ -192,7 +223,8 @@ return { girdMemberId: this.params.id, name: v.split('~')[0], - residentId: v.split('~')[1] + residentId: v.split('~')[1], + girdId: this.girdId } }) this.instance.post(`/app/appgirdmemberresident/add`, { @@ -219,7 +251,7 @@ size: 200, con: this.name, householdName: 1, - areaId: this.areaId + areaId: this.areaId, } }).then(res => { if (res.code == 0) {