diff --git a/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTabNew.vue b/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTabNew.vue index 6a8505598..4ff4c55af 100644 --- a/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTabNew.vue +++ b/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTabNew.vue @@ -600,7 +600,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 432e7c195..05b7d9add 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 692d26095..a079493d5 100644 --- a/nezha-fronted/src/components/page/alert/alertMessage.vue +++ b/nezha-fronted/src/components/page/alert/alertMessage.vue @@ -951,7 +951,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) {