From c83a50317baeba1a4771e4d802eee029ed2b7e31 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 23 六月 2020 18:23:43 +0800
Subject: [PATCH] 2020-06-23

---
 src/tabviews/subtable/index.jsx |   19 ++++++++++++-------
 1 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/src/tabviews/subtable/index.jsx b/src/tabviews/subtable/index.jsx
index 78d939a..9fd6f65 100644
--- a/src/tabviews/subtable/index.jsx
+++ b/src/tabviews/subtable/index.jsx
@@ -61,7 +61,7 @@
     pageIndex: 1,         // 椤电爜
     pageSize: 10,         // 姣忛〉鏁版嵁鏉℃暟
     orderBy: '',          // 鎺掑簭
-    search: '',           // 鎼滅储鏉′欢鏁扮粍锛屼娇鐢ㄦ椂闇�鍒嗗満鏅鐞�
+    search: [],           // 鎼滅储鏉′欢鏁扮粍锛屼娇鐢ㄦ椂闇�鍒嗗満鏅鐞�
     pickup: false,        // 瀛愯〃鏁版嵁闅愯棌鏄剧ず鍒囨崲
     triggerBtn: null,     // 鎸夐挳瑙﹀彂
     chartId: ''           // 灞曞紑鍥捐〃ID
@@ -77,7 +77,9 @@
         selectedData: [],
         resetTable: !this.state.resetTable,
       }, () => {
-        this.loadmaindata(nextProps.BID, 'refresh')
+        if (this.state.setting) {
+          this.loadmaindata(nextProps.BID, 'refresh')
+        }
       })
     } else if (this.state.config && nextProps.refreshtabs && nextProps.refreshtabs.includes(this.props.Tab.uuid)) {
       this.reloadtable()
@@ -90,9 +92,11 @@
         triggerBtn: trigger
       })
     } else if (!this.props.Tab.supMenu && nextProps.mainSearch && !is(fromJS(this.props.mainSearch), fromJS(nextProps.mainSearch))) {
-      this.setState({}, () => {
-        this.loadmaindata()
-      })
+      if (this.state.setting) {
+        this.setState({}, () => {
+          this.loadmaindata()
+        })
+      }
     }
   }
 
@@ -263,8 +267,9 @@
       config.columns.forEach(col => {
         if (col.field) {
           _arrField.push(col.field)
-
           _logcolumns.push(col)
+
+          col.nameField && _arrField.push(col.nameField) // 閾炬帴鍚嶅瓧娈�
         }
         if (col.type === 'colspan' && col.sublist) { // 绛涢�夐殣钘忓垪
           _hideCol = _hideCol.concat(col.sublist)
@@ -778,7 +783,7 @@
   reloadview = () => {
     this.setState({ loadingview: true, viewlost: false, lostmsg: '', config: null, searchlist: null, actions: null,
       columns: null, arr_field: '', setting: null, data: null, total: 0, loading: false, pageIndex: 1, pageSize: 10,
-      orderBy: '', search: '', triggerBtn: null
+      orderBy: '', search: [], triggerBtn: null
     }, () => {
       this.loadconfig()
     })

--
Gitblit v1.8.0