NEZ-3502 fix: alert message页面asset dashboard标签页 Group组件图表时区计算错误
This commit is contained in:
@@ -105,7 +105,7 @@ export default {
|
||||
if (this.$refs.pickTime.$refs.multipleTime && !this.$refs.pickTime.$refs.multipleTime.showDropdown) {
|
||||
multipleTime = ''
|
||||
}
|
||||
this.$emit('dateChange', this.filter, multipleTime)
|
||||
this.$emit('dateChange', this.filter, multipleTime, nowTimeType)
|
||||
}, 100)
|
||||
},
|
||||
closeDialog () {
|
||||
|
||||
@@ -229,7 +229,6 @@ export default {
|
||||
const origin = new Date(bus.timeFormate(bus.formateTimeToTime(this.timeRange[1]), 'YYYY-MM-DD HH:mm:ss'))
|
||||
const numInterval = now.getTime() - origin.getTime()
|
||||
let nowTimeType = this.nowTimeType
|
||||
console.log(nowTimeType)
|
||||
if (!nowTimeType) {
|
||||
nowTimeType = {
|
||||
value: 1
|
||||
|
||||
@@ -126,7 +126,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
isGroup,
|
||||
dateChange (filter, multipleTime) {
|
||||
dateChange (filter, multipleTime, nowTimeType) {
|
||||
this.loading = true
|
||||
// TODO assetInfo、endpointInfo、echarts等进行不同的处理
|
||||
let startTime = bus.formateTimeToTime(filter.start_time)
|
||||
@@ -144,6 +144,10 @@ export default {
|
||||
this.multipleTime = false
|
||||
}
|
||||
this.time = [startTime, endTime]
|
||||
this.$store.dispatch('dispatchPanelTime', {
|
||||
time: [filter.start_time, filter.end_time],
|
||||
nowTimeType: nowTimeType
|
||||
})
|
||||
this.chartInfo.loaded && this.chartInfo.alertRule && this.chartInfo.alertRule.type !== 3 && this.query(elements, startTime, endTime, step)
|
||||
},
|
||||
// 参数 isRefresh 标识是否是刷新操作
|
||||
|
||||
@@ -186,7 +186,7 @@ export default {
|
||||
immediate: true,
|
||||
handler (n) {
|
||||
if (n && n.length) {
|
||||
this.timeRange = this.timeRange = [
|
||||
this.timeRange = [
|
||||
bus.timeFormate(bus.computeTimezone(n[0] * 1000)),
|
||||
bus.timeFormate(bus.computeTimezone(n[1] * 1000))
|
||||
]
|
||||
|
||||
@@ -676,7 +676,7 @@ export default {
|
||||
this.$get('/alert/rule/' + row.alertRule.id).then(res => {
|
||||
this.currentMsg = { ...row, alertRule: { ...res.data } }
|
||||
this.$nextTick(() => {
|
||||
this.searchTime = [bus.computeTimezoneTime(new Date().getTime() - 1 * 60 * 60 * 1000), bus.computeTimezoneTime(new Date().getTime())]
|
||||
this.searchTime = [bus.timeFormate(bus.computeTimezoneTime(new Date().getTime() - 1 * 60 * 60 * 1000)), bus.timeFormate(bus.computeTimezoneTime(new Date().getTime()))]
|
||||
this.$store.dispatch('dispatchPanelTime', {
|
||||
time: this.searchTime,
|
||||
nowTimeType: {
|
||||
@@ -1070,6 +1070,12 @@ export default {
|
||||
this.chartInfo = chartInfo
|
||||
this.graphShow = show
|
||||
}
|
||||
},
|
||||
beforeDestroy () {
|
||||
this.$store.dispatch('dispatchPanelTime', {
|
||||
time: [],
|
||||
nowTimeType: {}
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -595,7 +595,7 @@ export default {
|
||||
this.$get('/alert/rule/' + row.alertRule.id).then(res => {
|
||||
this.currentMsg = { ...row, alertRule: { ...res.data } }
|
||||
this.$nextTick(() => {
|
||||
this.searchTimeDialog = [bus.computeTimezoneTime(new Date().getTime() - 1 * 60 * 60 * 1000), bus.computeTimezoneTime(new Date().getTime())]
|
||||
this.searchTimeDialog = [bus.timeFormate(bus.computeTimezoneTime(new Date().getTime() - 1 * 60 * 60 * 1000)), bus.timeFormate(bus.computeTimezoneTime(new Date().getTime()))]
|
||||
this.$store.dispatch('dispatchPanelTime', {
|
||||
time: this.searchTimeDialog,
|
||||
nowTimeType: {
|
||||
|
||||
Reference in New Issue
Block a user