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