From 3659f0773a14b54c18ed0af8b64de4afe8227489 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 04 十二月 2020 19:31:12 +0800
Subject: [PATCH] 2020-12-04

---
 src/tabviews/scriptmanage/index.jsx |   21 ++++++++-------------
 1 files changed, 8 insertions(+), 13 deletions(-)

diff --git a/src/tabviews/scriptmanage/index.jsx b/src/tabviews/scriptmanage/index.jsx
index f9e24df..12d0fd9 100644
--- a/src/tabviews/scriptmanage/index.jsx
+++ b/src/tabviews/scriptmanage/index.jsx
@@ -34,7 +34,6 @@
     actions: [],          // 鎸夐挳闆�
     columns: [],          // 鏄剧ず鍒�
     arr_field: '',        // 浣跨敤 sPC_Get_TableData 鏃剁殑鏌ヨ瀛楁闆�
-    logcolumns: null,     // 鏃ュ織涓樉绀虹殑鍒椾俊鎭� (澧炲姞鑷冲叏閮ㄥ垪锛岄櫎鍘诲悎骞跺垪)
     setting: {},          // 椤甸潰鍏ㄥ眬璁剧疆锛氭暟鎹簮銆佹寜閽強鏄剧ず鍒楀浐瀹氥�佷富閿瓑
     data: [],             // 鍒楄〃鏁版嵁闆�
     selectedData: [],     // 宸查�夎〃鏍兼暟鎹�
@@ -56,7 +55,6 @@
 
     let _arrField = []     // 瀛楁闆�
     let _columns = []      // 鏄剧ず鍒�
-    let _logcolumns = []   // 鏃ュ織鏄剧ず鍒�
     let _hideCol = []      // 闅愯棌鍙婂悎骞跺垪涓瓧娈电殑uuid闆�
     let colMap = new Map() // 鐢ㄤ簬瀛楁杩囨护
 
@@ -64,13 +62,9 @@
     config.columns.forEach(col => {
       if (col.field) {
         _arrField.push(col.field)
-
-        _logcolumns.push(col)
       }
       if (col.type === 'colspan' && col.sublist) { // 绛涢�夐殣钘忓垪
         _hideCol = _hideCol.concat(col.sublist)
-      } else if (col.Hide === 'true') {
-        _hideCol.push(col.uuid)
       }
       colMap.set(col.uuid, col)
     })
@@ -79,10 +73,14 @@
     config.columns.forEach(col => {
       if (_hideCol.includes(col.uuid)) return
 
-      if (col.type === 'colspan' && col.sublist) {
-        let _col = JSON.parse(JSON.stringify(col))
+      if (col.type === 'colspan') {
+        if (col.unfold !== 'true') { // 涓嶅睍寮�涓烘棫鐗堝悎骞跺垪
+          col.type = 'old_colspan'
+        }
+
+        let _col = fromJS(col).toJS()
         let subcols = []
-        _col.sublist.forEach(sub => {
+        _col.sublist && _col.sublist.forEach(sub => {
           if (colMap.has(sub)) {
             subcols.push(colMap.get(sub))
           }
@@ -105,7 +103,6 @@
         return item
       }),
       columns: _columns,
-      logcolumns: _logcolumns,
       arr_field: _arrField.join(','),
       search: Utils.initMainSearch(config.search)
     }, () => {
@@ -305,7 +302,7 @@
   }
 
   render() {
-    const { dict, searchlist, config, setting, actions, columns, pickup, selectedData } = this.state
+    const { dict, searchlist, setting, actions, columns, pickup, selectedData } = this.state
 
     return (
       <div className="script-manage-table" id={this.state.ContainerId}>
@@ -322,7 +319,6 @@
           dict={this.state.dict}
           MenuID={this.props.MenuID}
           selectedData={selectedData}
-          logcolumns={this.state.logcolumns}
           ContainerId={this.state.ContainerId}
           refreshdata={this.refreshbyaction}
         />
@@ -335,7 +331,6 @@
           <MainTable
             tableId="mainTable"
             pickup={pickup}
-            config={config}
             setting={setting}
             columns={columns}
             dict={this.state.dict}

--
Gitblit v1.8.0