summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzhangyu <[email protected]>2023-11-29 18:39:01 +0800
committerzhangyu <[email protected]>2023-11-29 18:39:01 +0800
commit85a952522862836897df919545f6f4e1cf712b0d (patch)
tree1d4589b7230035c2465eec3a6a1d459d4fe81f46
parent71d8cfa8297d8900d3c817e6bfda691b43125487 (diff)
fix:去除时间转化 直接使用接口数据处理持续时间rel-23.07.16
-rw-r--r--nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTabNew.vue2
-rw-r--r--nezha-fronted/src/components/common/table/alert/alertMessageTable.vue5
-rw-r--r--nezha-fronted/src/components/page/alert/alertMessage.vue2
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) {