From 4aac1a7c201128e3111ca01aadf6db8de1b7257d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=8A=B2=E6=9D=BE?= Date: Thu, 9 Apr 2020 16:48:23 +0800 Subject: [PATCH] =?UTF-8?q?fixed:=20=E4=BF=AE=E5=A4=8D=E5=88=A0=E9=99=A4al?= =?UTF-8?q?ert-message=E6=97=B6=E6=8A=A5=E9=94=99=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/common/bottomBox/tabs/alertMessageTab.vue | 9 ++++++--- nezha-fronted/src/components/page/alert/list.vue | 9 ++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTab.vue b/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTab.vue index 1f12cb0fd..1636ed175 100644 --- a/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTab.vue +++ b/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTab.vue @@ -183,7 +183,7 @@ }, importBox: {show: false, title:this.$t('overall.exportExcel')}, - deleteBox: {show: false, ids: [], remark: ''}, + deleteBox: {show: false, ids: "", remark: '', state: 2}, tableTitle: [ { @@ -329,6 +329,7 @@ this.$put("alert/message", this.deleteBox).then(res => { if (res.code === 200) { this.$message({duration: 2000, type: 'success', message: this.$t("tip.deleteSuccess")}); + this.deleteBox.show = false; this.getAlertList(); } else { this.$message.error(res.msg); @@ -336,10 +337,12 @@ }) }, selectChange(s) { - this.deleteBox.ids = []; + let ids = []; + this.deleteBox.ids = ""; s.forEach(item => { - this.deleteBox.ids.push(item.id); + ids.push(item.id); }); + this.deleteBox.ids = ids.join(","); }, exportCur:function(){ this.exportExcel(this.searchLabel); diff --git a/nezha-fronted/src/components/page/alert/list.vue b/nezha-fronted/src/components/page/alert/list.vue index fde85e845..5c118cb83 100644 --- a/nezha-fronted/src/components/page/alert/list.vue +++ b/nezha-fronted/src/components/page/alert/list.vue @@ -196,7 +196,7 @@ //导出相关 importBox: {show: false, title:this.$t('overall.exportExcel')}, - deleteBox: {show: false, ids: [], remark: ''}, + deleteBox: {show: false, ids: "", remark: '', state: 2}, tableId: 'alertListTable', //需要分页的table的id,用于记录每页数量 showTopBtn: false, @@ -398,6 +398,7 @@ this.$put("alert/message", this.deleteBox).then(res => { if (res.code === 200) { this.$message({duration: 2000, type: 'success', message: this.$t("tip.deleteSuccess")}); + this.deleteBox.show = false; this.getAlertList(); } else { this.$message.error(res.msg); @@ -405,10 +406,12 @@ }) }, selectChange(s) { - this.deleteBox.ids = []; + let ids = []; + this.deleteBox.ids = ""; s.forEach(item => { - this.deleteBox.ids.push(item.id); + ids.push(item.id); }); + this.deleteBox.ids = ids.join(","); }, showExportDialog() { this.importBox.show = true;