From cd388c78650efe85fe4dd41cc439208d58ab6c29 Mon Sep 17 00:00:00 2001
From: haoxuan <haoxuan>
Date: 星期二, 05 十二月 2023 16:19:55 +0800
Subject: [PATCH] 接口轮训时 设备负荷对比柱状图 动画问题修改

---
 src/views/cockpitPage/components/DeviceChart.vue |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/views/cockpitPage/components/DeviceChart.vue b/src/views/cockpitPage/components/DeviceChart.vue
index 530e342..1e8f376 100644
--- a/src/views/cockpitPage/components/DeviceChart.vue
+++ b/src/views/cockpitPage/components/DeviceChart.vue
@@ -46,6 +46,7 @@
       // },
       startValue: 0,
       endValue: 5,
+      chartTimer:null,
     };
   },
   watch: {
@@ -64,6 +65,7 @@
     //鍦ㄨ亴
     pieChart(chartName, data) {
       let that = this;
+      clearInterval(this.chartTimer);
       let chartDomTwo = this.$refs[chartName];
       let myChartTwo = echarts.init(chartDomTwo)
       myChartTwo.dispose()
@@ -205,7 +207,7 @@
           ],
         };
 
-        setInterval(function () {
+        this.chartTimer=setInterval(function () {
           if (option.dataZoom[0].endValue == data.datay.length) {
             option.dataZoom[0].startValue = that.startValue;
             option.dataZoom[0].endValue = that.endValue;

--
Gitblit v1.8.0