From c98e45bfac25e9110ad0383faac54a54d98ea9d5 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 18 十一月 2021 20:47:04 +0800
Subject: [PATCH] 2021-11-18

---
 src/tabviews/custom/components/chart/antv-dashboard/index.jsx |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/src/tabviews/custom/components/chart/antv-dashboard/index.jsx b/src/tabviews/custom/components/chart/antv-dashboard/index.jsx
index fb6dbb2..df4fba4 100644
--- a/src/tabviews/custom/components/chart/antv-dashboard/index.jsx
+++ b/src/tabviews/custom/components/chart/antv-dashboard/index.jsx
@@ -234,7 +234,7 @@
     const { config } = this.state
 
     if (!config.setting.supModule || config.setting.supModule !== MenuID) return
-    if (id !== this.state.BID) {
+    if (id !== this.state.BID || id !== '') {
       this.setState({ BID: id }, () => {
         this.loadData()
       })
@@ -289,11 +289,17 @@
           data.value = result.data[0][config.plot.valueField]
         }
       }
+      let reset = true
+
+      if (hastimer && is(fromJS(data), fromJS(this.state.data))) {
+        reset = false
+      }
 
       this.setState({
         data,
         loading: false
       }, () => {
+        if (!reset) return
         this.handleData()
       })
     } else {

--
Gitblit v1.8.0