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;