From a51639a48ca17d2d6bdd0848aff83e6cfaea22bd Mon Sep 17 00:00:00 2001 From: yinzuomei Date: Fri, 29 Nov 2019 11:04:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E7=A0=81=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E9=A1=B5=E9=9D=A2=EF=BC=8C=E5=AE=8C=E5=96=84=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E6=9F=A5=E8=AF=A2=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/events/item-deal-list.vue | 6 ++--- src/views/modules/sys/deptmacode.vue | 25 ++++++++++++++++++--- 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/src/views/modules/events/item-deal-list.vue b/src/views/modules/events/item-deal-list.vue index 915a3334..a8d8aa93 100644 --- a/src/views/modules/events/item-deal-list.vue +++ b/src/views/modules/events/item-deal-list.vue @@ -158,14 +158,14 @@ export default { }, watch: { 'ids': function (val) { - if (val.length === 1){ + if (val.length === 1) { this.dataForm.streetId = this.ids[0] } - if (val.length === 2){ + if (val.length === 2) { this.dataForm.streetId = this.ids[0] this.dataForm.communityId = this.ids[1] } - if (val.length === 3){ + if (val.length === 3) { this.dataForm.streetId = this.ids[0] this.dataForm.communityId = this.ids[1] this.dataForm.gridId = this.ids[2] diff --git a/src/views/modules/sys/deptmacode.vue b/src/views/modules/sys/deptmacode.vue index f0838cb5..e71bbe17 100644 --- a/src/views/modules/sys/deptmacode.vue +++ b/src/views/modules/sys/deptmacode.vue @@ -8,7 +8,7 @@ > {}) }, + watch: { + 'deptIdList': function (val) { + if (val.length === 1) { + this.dataForm.streetId = this.deptIdList[0] + } + if (val.length === 2) { + this.dataForm.streetId = this.deptIdList[0] + this.dataForm.communityId = this.deptIdList[1] + } + if (val.length === 3) { + this.dataForm.streetId = this.deptIdList[0] + this.dataForm.communityId = this.deptIdList[1] + this.dataForm.gridId = this.deptIdList[2] + } + } + }, methods: { createDeptMaCodeHandle (id) { this.$confirm(