From 31087db26788fc5557ff1318cbd8fcf13d0e1414 Mon Sep 17 00:00:00 2001 From: zhangyuan Date: Wed, 27 May 2020 11:23:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B0=91=E8=AD=A6=E5=8F=AF=E4=BB=A5=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=A4=9A=E4=B8=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/police/police.vue | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) 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 @@ } } +