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/subtabtable/index.jsx | 22 +++++++++------------- 1 files changed, 9 insertions(+), 13 deletions(-) diff --git a/src/tabviews/subtabtable/index.jsx b/src/tabviews/subtabtable/index.jsx index 483d8b9..af5ce85 100644 --- a/src/tabviews/subtabtable/index.jsx +++ b/src/tabviews/subtabtable/index.jsx @@ -47,7 +47,6 @@ searchlist: null, // 鎼滅储鏉′欢 actions: null, // 鎸夐挳闆� columns: null, // 鏄剧ず鍒� - logcolumns: null, // 鏃ュ織涓樉绀虹殑鍒椾俊鎭� (澧炲姞鑷冲叏閮ㄥ垪锛岄櫎鍘诲悎骞跺垪) arr_field: '', // 浣跨敤 sPC_Get_TableData 鏃剁殑鏌ヨ瀛楁闆� setting: null, // 椤甸潰鍏ㄥ眬璁剧疆锛氭暟鎹簮銆佹寜閽強鏄剧ず鍒楀浐瀹氥�佷富閿瓑 data: null, // 鍒楄〃鏁版嵁闆� @@ -105,7 +104,6 @@ let _arrField = [] // 瀛楁闆� let _columns = [] // 鏄剧ず鍒� - let _logcolumns = [] // 鏃ュ織鏄剧ず鍒� let _hideCol = [] // 闅愯棌鍙婂悎骞跺垪涓瓧娈电殑uuid闆� let colMap = new Map() let statFields = [] // 鍚堣瀛楁淇℃伅 @@ -186,7 +184,6 @@ config.columns.forEach(col => { if (col.field) { _arrField.push(col.field) - _logcolumns.push(col) col.nameField && _arrField.push(col.nameField) // 閾炬帴鍚嶅瓧娈� if (col.Hide !== 'true' && col.type === 'number' && col.sum === 'true') { @@ -195,8 +192,6 @@ } 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) }) @@ -207,10 +202,14 @@ col.linkThdMenu = '' // 寮圭獥涓笉鍙娇鐢ㄥ瓧娈甸�忚 - 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)) } @@ -296,7 +295,6 @@ searchlist: config.search, actions: _actions, columns: _columns, - logcolumns: _logcolumns, arr_field: _arrField.join(','), search: Utils.initMainSearch(config.search) // 鎼滅储鏉′欢鍒濆鍖栵紙鍚湁鏃堕棿鏍煎紡锛岄渶瑕佽浆鍖栵級 }, () => { @@ -590,20 +588,19 @@ <SubAction setting={setting} actions={actions} + columns={columns} BID={this.props.BID} dict={this.state.dict} BData={this.props.BData} selectedData={selectedData} MenuID={this.props.SupMenuID} MenuName={this.props.Tab.label} - logcolumns={this.state.logcolumns} refreshdata={this.refreshbyaction} getexceloutparam={this.getexceloutparam} /> </div> <SubTable tableId={this.props.Tab.uuid} - config={config} setting={setting} columns={columns} pageSize={pageSize} @@ -616,7 +613,6 @@ loading={this.state.loading} MenuName={this.props.Tab.label} refreshdata={this.refreshbytable} - logcolumns={this.state.logcolumns} statFValue={this.state.statFValue} refreshbyaction={this.refreshbyaction} chgSelectData={this.changeSelectedData} @@ -631,12 +627,12 @@ tableId="" plot={item} config={config} + columns={columns} BID={this.props.BID} data={this.state.data} BData={this.props.BData} loading={this.state.loading} MenuName={this.props.Tab.label} - logcolumns={this.state.logcolumns} refreshdata={this.refreshbyaction} handleTableId={() => {}} /> -- Gitblit v1.8.0