fix: 修改 alertRule 关联 dashboard后 dashboard 在alertMessageInfo不显示的问题

This commit is contained in:
zhangyu
2023-06-09 13:39:33 +08:00
parent 7cb3a7e521
commit e41207305b
4 changed files with 6 additions and 1 deletions

View File

@@ -83,6 +83,7 @@ export default {
chartDetailInfo: Object, chartDetailInfo: Object,
from: String, from: String,
filter: {}, filter: {},
currentMsg: Object,
showHeader: { showHeader: {
type: Boolean, type: Boolean,
default: true default: true
@@ -325,6 +326,7 @@ export default {
this.$get('/alert/message/' + this.chartInfo.id).then(res => { this.$get('/alert/message/' + this.chartInfo.id).then(res => {
if (res.code === 200) { if (res.code === 200) {
this.infoData = res.data this.infoData = res.data
this.infoData.alertRule = this.currentMsg.alertRule
this.tabNoData = false this.tabNoData = false
} else { } else {
this.tabNoData = true this.tabNoData = true

View File

@@ -97,6 +97,7 @@
:chart-info="chartInfo" :chart-info="chartInfo"
:from="fromRoute.alertMessage" :from="fromRoute.alertMessage"
:filter="{}" :filter="{}"
:currentMsg="currentMsg"
:is-fullscreen="true" :is-fullscreen="true"
:time-range="searchTime" :time-range="searchTime"
@showFullscreen="showFullscreen" @showFullscreen="showFullscreen"

View File

@@ -828,7 +828,7 @@ export default {
} }
} else { } else {
this.selectArr.push({ this.selectArr.push({
i18n: key, i18n: this.$t(findKeyItem.i18n),
code: findKeyItem.i18n, code: findKeyItem.i18n,
name: name, name: name,
realValue: [realValue], realValue: [realValue],

View File

@@ -155,6 +155,7 @@
:chart-info="chartInfo" :chart-info="chartInfo"
:from="fromRoute.alertMessage" :from="fromRoute.alertMessage"
:filter="{}" :filter="{}"
:currentMsg="currentMsg"
:is-fullscreen="true" :is-fullscreen="true"
:time-range="searchTimeDialog" :time-range="searchTimeDialog"
@showFullscreen="showFullscreen" @showFullscreen="showFullscreen"
@@ -599,6 +600,7 @@ export default {
// this.sign = Number(row.alertRule.id) // this.sign = Number(row.alertRule.id)
this.$get('/alert/rule/' + row.alertRule.id).then(res => { this.$get('/alert/rule/' + row.alertRule.id).then(res => {
this.currentMsg = { ...row, alertRule: { ...res.data } } this.currentMsg = { ...row, alertRule: { ...res.data } }
console.log(this.currentMsg)
this.$nextTick(() => { this.$nextTick(() => {
this.searchTimeDialog = [bus.computeTimezoneTime(new Date().getTime() - 1 * 60 * 60 * 1000), bus.computeTimezoneTime(new Date().getTime())] this.searchTimeDialog = [bus.computeTimezoneTime(new Date().getTime() - 1 * 60 * 60 * 1000), bus.computeTimezoneTime(new Date().getTime())]
this.$store.dispatch('dispatchPanelTime', { this.$store.dispatch('dispatchPanelTime', {