From e41207305b4b077d549edd3de1b76cbceea44bd4 Mon Sep 17 00:00:00 2001 From: zhangyu Date: Fri, 9 Jun 2023 13:39:33 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=20alertRule=20?= =?UTF-8?q?=E5=85=B3=E8=81=94=20dashboard=E5=90=8E=20dashboard=20=E5=9C=A8?= =?UTF-8?q?alertMessageInfo=E4=B8=8D=E6=98=BE=E7=A4=BA=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 --- nezha-fronted/src/components/common/alert/alertMessageInfo.vue | 2 ++ .../src/components/common/bottomBox/tabs/alertMessageTabNew.vue | 1 + nezha-fronted/src/components/common/searchBox/searchBox.vue | 2 +- nezha-fronted/src/components/page/alert/alertMessage.vue | 2 ++ 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/nezha-fronted/src/components/common/alert/alertMessageInfo.vue b/nezha-fronted/src/components/common/alert/alertMessageInfo.vue index 0ef16d518..3b4ee4e63 100644 --- a/nezha-fronted/src/components/common/alert/alertMessageInfo.vue +++ b/nezha-fronted/src/components/common/alert/alertMessageInfo.vue @@ -83,6 +83,7 @@ export default { chartDetailInfo: Object, from: String, filter: {}, + currentMsg: Object, showHeader: { type: Boolean, default: true @@ -325,6 +326,7 @@ export default { this.$get('/alert/message/' + this.chartInfo.id).then(res => { if (res.code === 200) { this.infoData = res.data + this.infoData.alertRule = this.currentMsg.alertRule this.tabNoData = false } else { this.tabNoData = true diff --git a/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTabNew.vue b/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTabNew.vue index 0925b70b7..051b0368a 100644 --- a/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTabNew.vue +++ b/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTabNew.vue @@ -97,6 +97,7 @@ :chart-info="chartInfo" :from="fromRoute.alertMessage" :filter="{}" + :currentMsg="currentMsg" :is-fullscreen="true" :time-range="searchTime" @showFullscreen="showFullscreen" diff --git a/nezha-fronted/src/components/common/searchBox/searchBox.vue b/nezha-fronted/src/components/common/searchBox/searchBox.vue index 9f7f30cf1..c90f4f2af 100644 --- a/nezha-fronted/src/components/common/searchBox/searchBox.vue +++ b/nezha-fronted/src/components/common/searchBox/searchBox.vue @@ -828,7 +828,7 @@ export default { } } else { this.selectArr.push({ - i18n: key, + i18n: this.$t(findKeyItem.i18n), code: findKeyItem.i18n, name: name, realValue: [realValue], diff --git a/nezha-fronted/src/components/page/alert/alertMessage.vue b/nezha-fronted/src/components/page/alert/alertMessage.vue index 0a89021a1..6ff923dec 100644 --- a/nezha-fronted/src/components/page/alert/alertMessage.vue +++ b/nezha-fronted/src/components/page/alert/alertMessage.vue @@ -155,6 +155,7 @@ :chart-info="chartInfo" :from="fromRoute.alertMessage" :filter="{}" + :currentMsg="currentMsg" :is-fullscreen="true" :time-range="searchTimeDialog" @showFullscreen="showFullscreen" @@ -599,6 +600,7 @@ export default { // this.sign = Number(row.alertRule.id) this.$get('/alert/rule/' + row.alertRule.id).then(res => { this.currentMsg = { ...row, alertRule: { ...res.data } } + console.log(this.currentMsg) this.$nextTick(() => { this.searchTimeDialog = [bus.computeTimezoneTime(new Date().getTime() - 1 * 60 * 60 * 1000), bus.computeTimezoneTime(new Date().getTime())] this.$store.dispatch('dispatchPanelTime', {