diff --git a/src/views/modules/police/police.vue b/src/views/modules/police/police.vue index f604975..5c90a6a 100644 --- a/src/views/modules/police/police.vue +++ b/src/views/modules/police/police.vue @@ -27,7 +27,7 @@ - 警民群补建 + 警民群补建 @@ -65,7 +65,7 @@ {{ $t('delete') }} - 补建群 @@ -130,13 +130,13 @@ this.dataForm.deptId = value.slice(-1).shift() }, beforeDeleteHandle(id) { - this.$confirm('删除民警将会解散全部警民群,是否继续操作?', this.$t('prompt.title'), { - confirmButtonText: this.$t('confirm'), - cancelButtonText: this.$t('cancel'), - type: 'warning' - }).then(() => { - this.deleteHandle(id); - }) + // this.$confirm('删除民警将会解散全部警民群,是否继续操作?', this.$t('prompt.title'), { + // confirmButtonText: this.$t('confirm'), + // cancelButtonText: this.$t('cancel'), + // type: 'warning' + // }).then(() => { + this.deleteHandle(id); + // }) }, supplementHandle(data) { if (!data && this.dataListSelections.length <= 0) { @@ -146,12 +146,19 @@ duration: 500 }) } + if (!data && this.dataListSelections.length > 1) { + return this.$message({ + message: '只能选择一个社区', + type: 'warning', + duration: 500 + }) + } this.$confirm(this.$t('prompt.info', {'handle': '补建群'}), this.$t('prompt.title'), { confirmButtonText: this.$t('confirm'), cancelButtonText: this.$t('cancel'), type: 'warning' }).then(() => { - this.$http.put('/property/police/supplement', data ? [data] : this.dataListSelections.map(item => item)).then(({data: res}) => { + this.$http.put('/property/police/supplement', data ? data : this.dataListSelections[0]).then(({data: res}) => { if (res.code !== 0) { return this.$message.error(res.msg) } @@ -171,6 +178,7 @@ } } +