From 86466ee4e68f31be54ac05c1dd90d44108883e4f Mon Sep 17 00:00:00 2001 From: zhangyu Date: Tue, 7 Sep 2021 11:03:58 +0800 Subject: [PATCH] =?UTF-8?q?NEZ-974=20fix=EF=BC=9A=E4=BF=AE=E6=94=B9alert?= =?UTF-8?q?=20message=20=E9=BB=98=E8=AE=A4=E6=97=B6=E9=97=B4=E4=B8=8D?= =?UTF-8?q?=E6=98=AF=E4=B8=80=E5=B0=8F=E6=97=B6=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nezha-fronted/src/components/charts/chart-alert-list.vue | 2 +- .../components/common/bottomBox/tabs/alertMessageTabNew.vue | 2 +- nezha-fronted/src/components/page/alert/alertMessage.vue | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/nezha-fronted/src/components/charts/chart-alert-list.vue b/nezha-fronted/src/components/charts/chart-alert-list.vue index 5e4426f50..956a60016 100644 --- a/nezha-fronted/src/components/charts/chart-alert-list.vue +++ b/nezha-fronted/src/components/charts/chart-alert-list.vue @@ -447,7 +447,7 @@ export default { }, queryChartDate () { const $temp = this - const start = this.searchTime[0] ? this.searchTime[0] : bus.computeTimezoneTime(new Date().getTime() - 1 * 30 * 60 * 1000) + const start = this.searchTime[0] ? this.searchTime[0] : bus.computeTimezoneTime(new Date().getTime() - 1 * 60 * 60 * 1000) const end = this.searchTime[1] ? this.searchTime[1] : bus.computeTimezoneTime(new Date().getTime()) this.searchTimeDialog = [start, end] const timeDiff = (new Date(end).getTime() - new Date(start).getTime()) / 1000 / (24 * 60 * 60) diff --git a/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTabNew.vue b/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTabNew.vue index 11067d25e..1e9eb93d5 100644 --- a/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTabNew.vue +++ b/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTabNew.vue @@ -429,7 +429,7 @@ export default { this.currentMsg = { ...row, alertRule: { ...res.data } } this.graphShow = true this.$nextTick(() => { - this.searchTime = [bus.computeTimezoneTime(new Date().getTime() - 1 * 30 * 60 * 1000), bus.computeTimezoneTime(new Date().getTime())] + this.searchTime = [bus.computeTimezoneTime(new Date().getTime() - 1 * 60 * 60 * 1000), bus.computeTimezoneTime(new Date().getTime())] this.queryChartDate() }) }) diff --git a/nezha-fronted/src/components/page/alert/alertMessage.vue b/nezha-fronted/src/components/page/alert/alertMessage.vue index 58b948739..e7aad4233 100644 --- a/nezha-fronted/src/components/page/alert/alertMessage.vue +++ b/nezha-fronted/src/components/page/alert/alertMessage.vue @@ -287,7 +287,7 @@ export default { this.currentMsg = { ...row, alertRule: { ...res.data } } this.graphShow = true this.$nextTick(() => { - this.searchTimeDialog = [bus.computeTimezoneTime(new Date().getTime() - 1 * 30 * 60 * 1000), bus.computeTimezoneTime(new Date().getTime())] + this.searchTimeDialog = [bus.computeTimezoneTime(new Date().getTime() - 1 * 60 * 60 * 1000), bus.computeTimezoneTime(new Date().getTime())] this.queryChartDate() }) }) @@ -300,7 +300,7 @@ export default { }, queryChartDate () { const $temp = this - const start = this.searchTimeDialog[0] ? this.searchTimeDialog[0] : bus.computeTimezoneTime(new Date().getTime() - 1 * 30 * 60 * 1000) + const start = this.searchTimeDialog[0] ? this.searchTimeDialog[0] : bus.computeTimezoneTime(new Date().getTime() - 1 * 60 * 60 * 1000) const end = this.searchTimeDialog[1] ? this.searchTimeDialog[1] : bus.computeTimezoneTime(new Date().getTime()) this.searchTimeDialog = [start, end] const timeDiff = (new Date(end).getTime() - new Date(start).getTime()) / 1000 / (24 * 60 * 60)