From 2388f6ea547f53b20a4b9b64efc8aa6dc33e013b Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 06 十一月 2023 15:23:54 +0800
Subject: [PATCH] 2023-11-06

---
 src/tabviews/custom/components/card/data-card/index.jsx |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/src/tabviews/custom/components/card/data-card/index.jsx b/src/tabviews/custom/components/card/data-card/index.jsx
index 9cc9fcd..55ada26 100644
--- a/src/tabviews/custom/components/card/data-card/index.jsx
+++ b/src/tabviews/custom/components/card/data-card/index.jsx
@@ -398,9 +398,9 @@
           }, i * 10)
         })
       } else {
-        if (position === 'line') {
+        if (position === 'line' || position === 'line_grid') {
           if (lines && lines.length === 1) {
-            this.loadLinedata(lines[0].$$uuid)
+            this.loadLinedata(lines[0].$$uuid, position)
           } else {
             this.loadData(id)
           }
@@ -417,9 +417,9 @@
     } else {
       let supModule = config.setting.supModule
 
-      if (position === 'line') {
+      if (position === 'line' || position === 'line_grid') {
         if (lines && lines.length === 1) {
-          this.loadLinedata(lines[0].$$uuid)
+          this.loadLinedata(lines[0].$$uuid, position)
         } else {
           this.loadData(id)
         }
@@ -870,7 +870,7 @@
   /**
    * @description 鑾峰彇鍗曡鏁版嵁
    */ 
-  async loadLinedata (id) {
+  async loadLinedata (id, position) {
     const { config, pageIndex, pageSize, search, BID, BData, orderBy } = this.state
 
     if (config.forbidLine) {
@@ -902,6 +902,11 @@
 
     let result = await Api.genericInterface(param)
     if (result.status) {
+      if (position === 'line_grid' && (!result.data || !result.data[0])) {
+        this.loadData()
+        return
+      }
+
       let data = fromJS(this.state.data).toJS()
       let selectedData = fromJS(this.state.selectedData).toJS()
       let selectKeys = fromJS(this.state.selectKeys).toJS()

--
Gitblit v1.8.0