NEZ-2078 fix:新建System修改不同的Display点击预览,偶尔会出现图表超出预览框现象

This commit is contained in:
zhangyu
2022-08-01 18:04:55 +08:00
parent 94fa80ef01
commit 057d3be83c

View File

@@ -497,17 +497,19 @@ export default {
}
},
preview (show) {
this.previewShow = show
if (show) {
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)
this.prevChart.loaded = true
this.prevChart.param.showHeader = true
this.$nextTick(() => {
const start = new Date().setHours(new Date().getHours() - 1)
const end = new Date()
this.timeRange = [bus.computeTimezoneTime(start), bus.computeTimezoneTime(end)]
setTimeout(() => {
this.prevChart = lodash.cloneDeep(this.editChart)
this.prevChart.loaded = true
this.prevChart.param.showHeader = true
})
})
}
this.$nextTick(() => {
this.previewShow = show
})
}
},
created () {