From 057d3be83c91259e38926500f98a10bbdc17f10c Mon Sep 17 00:00:00 2001 From: zhangyu Date: Mon, 1 Aug 2022 18:04:55 +0800 Subject: [PATCH] =?UTF-8?q?NEZ-2078=20fix=EF=BC=9A=E6=96=B0=E5=BB=BASystem?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=8D=E5=90=8C=E7=9A=84Display=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E9=A2=84=E8=A7=88=EF=BC=8C=E5=81=B6=E5=B0=94=E4=BC=9A?= =?UTF-8?q?=E5=87=BA=E7=8E=B0=E5=9B=BE=E8=A1=A8=E8=B6=85=E5=87=BA=E9=A2=84?= =?UTF-8?q?=E8=A7=88=E6=A1=86=E7=8E=B0=E8=B1=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/rightBox/chart/chartRightBox.vue | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/nezha-fronted/src/components/common/rightBox/chart/chartRightBox.vue b/nezha-fronted/src/components/common/rightBox/chart/chartRightBox.vue index e07071f3f..fc0836e3e 100644 --- a/nezha-fronted/src/components/common/rightBox/chart/chartRightBox.vue +++ b/nezha-fronted/src/components/common/rightBox/chart/chartRightBox.vue @@ -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 () {