diff --git a/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTabNew.vue b/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTabNew.vue index a11a6f90c..a40307952 100644 --- a/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTabNew.vue +++ b/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTabNew.vue @@ -285,6 +285,24 @@ export default { }) } }, + del (row) { + const self = this + this.$confirm(this.$t('tip.confirmDelete'), { + confirmButtonText: this.$t('tip.yes'), + cancelButtonText: this.$t('tip.no'), + type: 'warning' + }).then(() => { + this.$delete(this.url + '?ids=' + row.id + '&state=3').then(response => { + if (response.code === 200) { + self.delFlag = true + this.$message({ duration: 2000, type: 'success', message: this.$t('tip.deleteSuccess') }) + self.getTableData() + } else { + this.$message.error(response.msg) + } + }) + }) + }, getTableData (state) { if (state) { this.state = state diff --git a/nezha-fronted/src/components/page/alert/alertMessage.vue b/nezha-fronted/src/components/page/alert/alertMessage.vue index 4dce6eb2a..ed3bbaecc 100644 --- a/nezha-fronted/src/components/page/alert/alertMessage.vue +++ b/nezha-fronted/src/components/page/alert/alertMessage.vue @@ -227,6 +227,24 @@ export default { this.queryChartDate() }) }, + del (row) { + const self = this + this.$confirm(this.$t('tip.confirmDelete'), { + confirmButtonText: this.$t('tip.yes'), + cancelButtonText: this.$t('tip.no'), + type: 'warning' + }).then(() => { + this.$delete(this.url + '?ids=' + row.id + '&state=3').then(response => { + if (response.code === 200) { + self.delFlag = true + this.$message({ duration: 2000, type: 'success', message: this.$t('tip.deleteSuccess') }) + self.getTableData() + } else { + this.$message.error(response.msg) + } + }) + }) + }, messageDetail (row) { this.$get('/alert/rule/' + row.alertRule.id).then(res => { this.currentMsg = { ...row, alertRule: { ...res.data } }