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(