From b42f3468eca4f468c2b2147dc79a9f64ebcb4e63 Mon Sep 17 00:00:00 2001 From: zyh Date: Fri, 14 Jul 2023 15:55:41 +0800 Subject: [PATCH] =?UTF-8?q?NEZ-2986=20fix=EF=BC=9Aclock=E5=9B=BE=E8=A1=A8?= =?UTF-8?q?=E5=A4=9A=E6=AC=A1=E6=B8=B2=E6=9F=93=20=E6=9C=AA=E6=B8=85?= =?UTF-8?q?=E9=99=A4=E4=B8=8A=E6=AC=A1=E7=9A=84=E5=AE=9A=E6=97=B6=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nezha-fronted/src/components/chart/chart/chartClock.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nezha-fronted/src/components/chart/chart/chartClock.vue b/nezha-fronted/src/components/chart/chart/chartClock.vue index 3141398d9..da1f87939 100644 --- a/nezha-fronted/src/components/chart/chart/chartClock.vue +++ b/nezha-fronted/src/components/chart/chart/chartClock.vue @@ -124,6 +124,7 @@ export default { this.isInit && setChart(this.chartId, myChart) // 缓存;不使用vue的data是为避免整个chart被监听导致卡顿 this.isInit = false if (this.chartInfo.param && this.chartInfo.param.timeType === 'local') { + clearInterval(_soft.localTimer) _soft.localTimer = setInterval(function () { const date = new Date() const second = date.getSeconds() @@ -146,6 +147,7 @@ export default { myChart.setOption(chartOption) }, 1000) } else { + clearInterval(_soft.serverTimer) _soft.serverTimer = setInterval(function () { _soft.querySystemState() chartOption.animationDurationUpdate = 300