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/table/normal-table/index.jsx |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/src/tabviews/custom/components/table/normal-table/index.jsx b/src/tabviews/custom/components/table/normal-table/index.jsx
index 97af3a8..136a42c 100644
--- a/src/tabviews/custom/components/table/normal-table/index.jsx
+++ b/src/tabviews/custom/components/table/normal-table/index.jsx
@@ -539,7 +539,7 @@
   /**
    * @description 鑾峰彇鍗曡鏁版嵁
    */ 
-  async loadmainLinedata (id) {
+  async loadLinedata (id, position) {
     const { setting, config, search, orderBy, BID, pageIndex, pageSize, BData } = this.state
 
     if (config.forbidLine) {
@@ -567,6 +567,11 @@
 
     let result = await Api.genericInterface(param)
     if (result.status) {
+      if (position === 'line_grid' && (!result.data || !result.data[0])) {
+        this.loadmaindata(true, 'false')
+        return
+      }
+      
       let data = fromJS(this.state.data).toJS()
       let selectedData = fromJS(this.state.selectedData).toJS()
 
@@ -743,7 +748,7 @@
     if (!id) {
       this.reloadtable()
     } else {
-      this.loadmainLinedata(id)
+      this.loadLinedata(id)
     }
   }
 
@@ -774,9 +779,9 @@
 
     if (config.uuid !== menuId) return
 
-    if (position === 'line') {
+    if (position === 'line' || position === 'line_grid') {
       if (lines && lines.length === 1) {
-        this.loadmainLinedata(lines[0].$$uuid)
+        this.loadLinedata(lines[0].$$uuid, position)
       } else {
         this.reloadtable(btn, id)
       }

--
Gitblit v1.8.0