NEZ-2860 fix:Chart preview 时间范围错误

This commit is contained in:
zhangyu
2023-06-08 14:58:31 +08:00
parent d10fa8fc68
commit 844772c937

View File

@@ -183,7 +183,10 @@ export default {
computed: {
chartLastPosition () {
return this.$store.getters.getChartLastPosition
}
},
timeRange () {
return this.$store.getters.getTimeRange
},
},
data () {
return {
@@ -198,7 +201,7 @@ export default {
id: '',
name: ''
},
timeRange: [],
// timeRange: [],
prevChart: '',
filterPanel: '',
groupArr: [],
@@ -507,9 +510,9 @@ export default {
if (show) {
this.prevChart = ''
setTimeout(() => {
const start = new Date().setHours(new Date().getHours() - 1)
const end = new Date()
this.timeRange = [bus.computeTimezoneTime(start), bus.computeTimezoneTime(end)]
// const start = new Date().setHours(new Date().getHours() - 1)
// const end = new Date()
// this.timeRange = [bus.computeTimezoneTime(start), bus.computeTimezoneTime(end)]
this.prevChart = {
...lodash.cloneDeep(this.editChart),
loaded: true