From 89a58758f2045daf62383dc993178d857f3bbc39 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 10 七月 2023 15:07:50 +0800
Subject: [PATCH] 2023-07-10

---
 src/tabviews/custom/components/chart/antv-X6/index.jsx |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/src/tabviews/custom/components/chart/antv-X6/index.jsx b/src/tabviews/custom/components/chart/antv-X6/index.jsx
index 2f4c57b..71aed16 100644
--- a/src/tabviews/custom/components/chart/antv-X6/index.jsx
+++ b/src/tabviews/custom/components/chart/antv-X6/index.jsx
@@ -491,6 +491,7 @@
         this.cells = []
         this.handleData()
       }
+      this.setState({empty: true})
       return
     }
 
@@ -505,9 +506,6 @@
 
     let result = await Api.genericInterface(param)
     if (result.status) {
-      this.setState({
-        loading: false
-      })
       let item = result.data && result.data[0] ? result.data[0] : null
       let cells = []
 
@@ -518,6 +516,10 @@
 
       this.cells = cells
       this.handleData()
+
+      this.setState({
+        loading: false
+      })
 
       if (result.message) {
         if (result.ErrCode === 'Y') {
@@ -1740,11 +1742,13 @@
 
     if (config.plot.function === 'show') {
       if (config.plot.empty === 'hidden' && this.cells.length === 0) {
-        style.display = 'none'
+        style.position = 'absolute'
+        style.width = '100%'
+        style.zIndex = -1
       }
 
       return (
-        <div className="custom-x6-plot-box" id={'anchor' + config.uuid} style={config.style}>
+        <div className="custom-x6-plot-box" id={'anchor' + config.uuid} style={style}>
           {loading ?
             <div className="loading-mask">
               <div className="ant-spin-blur"></div>

--
Gitblit v1.8.0