From 85a952522862836897df919545f6f4e1cf712b0d Mon Sep 17 00:00:00 2001 From: zhangyu Date: Wed, 29 Nov 2023 18:39:01 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E5=8E=BB=E9=99=A4=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E8=BD=AC=E5=8C=96=20=E7=9B=B4=E6=8E=A5=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E6=8E=A5=E5=8F=A3=E6=95=B0=E6=8D=AE=E5=A4=84=E7=90=86?= =?UTF-8?q?=E6=8C=81=E7=BB=AD=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/common/bottomBox/tabs/alertMessageTabNew.vue | 2 +- .../src/components/common/table/alert/alertMessageTable.vue | 5 +++-- nezha-fronted/src/components/page/alert/alertMessage.vue | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTabNew.vue b/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTabNew.vue index 27dcb4042..07c5770a3 100644 --- a/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTabNew.vue +++ b/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTabNew.vue @@ -579,7 +579,7 @@ export default { this.$get(url, queryParams).then(response => { this.tools.loading = false if (response.code === 200) { - this.nowTime = this.utcTimeToTimezoneStr(response.time) + this.nowTime = response.time this.tableData = response.data.list this.deleteBox.ids = '' this.pageObj.total = response.data.total diff --git a/nezha-fronted/src/components/common/table/alert/alertMessageTable.vue b/nezha-fronted/src/components/common/table/alert/alertMessageTable.vue index 7e96c8089..d48f9ea14 100644 --- a/nezha-fronted/src/components/common/table/alert/alertMessageTable.vue +++ b/nezha-fronted/src/components/common/table/alert/alertMessageTable.vue @@ -259,12 +259,13 @@ export default { return function (record) { // 当 state = active | silence 时,duration = 当前服务器时间(result.time)- startAt if (record.state == 1 || record.state == 2) { - return calcDurationByStringTimeB(record.startAt, this.timezoneToUtcTimeStr(this.nowTime)) + console.log(record.startAt, this.nowTime, record.endAt) + return calcDurationByStringTimeB(record.startAt, this.nowTime) } if (record.endAt) { return calcDurationByStringTimeB(record.startAt, record.endAt) } - return calcDurationByStringTimeB(record.startAt, this.timezoneToUtcTimeStr(this.nowTime)) + return calcDurationByStringTimeB(record.startAt, this.nowTime) } } }, diff --git a/nezha-fronted/src/components/page/alert/alertMessage.vue b/nezha-fronted/src/components/page/alert/alertMessage.vue index 2e2ac581c..ac8b6584c 100644 --- a/nezha-fronted/src/components/page/alert/alertMessage.vue +++ b/nezha-fronted/src/components/page/alert/alertMessage.vue @@ -938,7 +938,7 @@ export default { this.$get('/alert/message/query', { ...queryParams }).then(response => { this.tools.loading = false if (response.code == 200) { - this.nowTime = this.utcTimeToTimezoneStr(response.time) + this.nowTime = response.time response.data.list.forEach((item) => { const labels = JSON.parse(item.labels) if (labels) {