From c81296b147b3b6e578a241e21bae7bded4b5f6c6 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 24 十月 2023 16:58:16 +0800
Subject: [PATCH] 2023-10-24

---
 src/tabviews/custom/components/table/normal-table/index.jsx |   29 ++++++++++++++++++++++++++---
 1 files changed, 26 insertions(+), 3 deletions(-)

diff --git a/src/tabviews/custom/components/table/normal-table/index.jsx b/src/tabviews/custom/components/table/normal-table/index.jsx
index 63b75d4..97af3a8 100644
--- a/src/tabviews/custom/components/table/normal-table/index.jsx
+++ b/src/tabviews/custom/components/table/normal-table/index.jsx
@@ -38,7 +38,8 @@
     pageSize: 10,         // 姣忛〉鏁版嵁鏉℃暟
     orderBy: '',          // 鎺掑簭
     search: '',           // 鎼滅储鏉′欢鏁扮粍锛屼娇鐢ㄦ椂闇�鍒嗗満鏅鐞�
-    statFValue: []        // 鍚堣鍊�
+    statFValue: [],       // 鍚堣鍊�
+    allSearch: null
   }
 
   loaded = false
@@ -138,6 +139,18 @@
 
     _config.style = _config.style || {}
 
+    let allSearch = null
+    if (_config.colsCtrls && _config.colsCtrls.length > 0) {
+      allSearch = [{key: 'BID', value: BID || ''}]
+      allSearch.push(..._config.$searches)
+      if (_config.setting.useMSearch) {
+        let mainSearch = window.GLOB.SearchBox.get(_config.$searchId) || []
+        allSearch.push(...mainSearch)
+      }
+    } else {
+      _config.colsCtrls = null
+    }
+
     this.setState({
       pageSize: setting.pageSize || 10,
       BID: BID || '',
@@ -148,7 +161,8 @@
       setting: setting,
       actions: _config.action,
       columns: _config.cols,
-      search: _config.$searches
+      search: _config.$searches,
+      allSearch
     })
   }
 
@@ -467,9 +481,16 @@
         total = data[data.length - 1].mk_total || 0
       }
 
+      let allSearch = null
+      if (config.colsCtrls) {
+        allSearch = [{key: 'BID', value: BID || ''}]
+        allSearch.push(...searches)
+      }
+
       this.setState({
         data: data,
         selectedData: [],
+        allSearch: allSearch,
         total: total,
         loading: false
       })
@@ -801,7 +822,7 @@
   }
 
   render() {
-    const { BID, setting, actions, config, columns, selectedData, BData, data } = this.state
+    const { BID, setting, actions, config, columns, selectedData, BData, data, allSearch } = this.state
 
     let style = {...config.style}
     if (config.wrap.empty === 'hidden' && (!data || data.length === 0)) {
@@ -825,9 +846,11 @@
           setting={setting}
           columns={columns}
           MenuID={config.uuid}
+          allSearch={allSearch}
           data={this.state.data}
           fields={config.columns}
           total={this.state.total}
+          colsCtrls={config.colsCtrls}
           lineMarks={config.lineMarks}
           loading={this.state.loading}
           refreshdata={this.refreshbytable}

--
Gitblit v1.8.0