From 31ec63f0419895876cbaba99637a884a32d33d0d Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 01 九月 2021 10:31:45 +0800 Subject: [PATCH] 2021-09-01 --- src/tabviews/zshare/cardcomponent/index.jsx | 58 +++++++++++++++++----------------------------------------- 1 files changed, 17 insertions(+), 41 deletions(-) diff --git a/src/tabviews/zshare/cardcomponent/index.jsx b/src/tabviews/zshare/cardcomponent/index.jsx index a5ca725..a689085 100644 --- a/src/tabviews/zshare/cardcomponent/index.jsx +++ b/src/tabviews/zshare/cardcomponent/index.jsx @@ -25,12 +25,11 @@ Tab: PropTypes.any, // 濡傛灉褰撳墠鍏冪礌涓烘爣绛炬椂锛宼ab涓烘爣绛句俊鎭� MenuID: PropTypes.string, // 鑿滃崟ID setting: PropTypes.object, // 椤甸潰璁惧畾 - logcolumns: PropTypes.array, // 瀛楁鍒� + columns: PropTypes.array, // 鏄剧ず鍒� card: PropTypes.object, // 鍗$墖璁剧疆淇℃伅 data: PropTypes.object, // 鍗$墖鏁版嵁 selectKey: PropTypes.string, // 閫夋嫨鍗$墖鐨勫簭鍙� colMap: PropTypes.any, // 鏄剧ず鍒椾俊鎭紝鐢ㄤ簬璁剧疆鏍囪 - refreshdata: PropTypes.func, // 鎸夐挳鎿嶄綔鍚庢暟鎹埛鏂� switchCard: PropTypes.func // 鍗$墖鍒囨崲 } @@ -129,40 +128,38 @@ * @description 鑾峰彇鎸夐挳鍏冪礌 */ getActionList = (actions, show) => { - const { BID, BData, Tab, setting, logcolumns, ContainerId, data, MenuID } = this.props + const { BData, Tab, setting, columns, ContainerId, data, MenuID } = this.props return actions.map(item => { if (['exec', 'prompt', 'pop'].includes(item.OpenType)) { return ( <NormalButton key={item.uuid} - BID={BID} + BID={data.$$BID} Tab={Tab} btn={item} show={show} BData={BData} setting={setting} - columns={logcolumns} + columns={columns} selectedData={[data]} ContainerId={ContainerId} - updateStatus={this.updateStatus} /> ) } else if (item.OpenType === 'popview') { return ( <PopupButton key={item.uuid} - BID={BID} + BID={data.$$BID} Tab={Tab} btn={item} show={show} BData={BData} setting={setting} selectedData={[data]} - updateStatus={this.updateStatus} /> ) - } else if (item.OpenType === 'tab' || item.OpenType === 'blank') { + } else if (item.OpenType === 'tab') { return ( <TabButton key={item.uuid} @@ -171,7 +168,6 @@ MenuID={MenuID} setting={setting} selectedData={[data]} - updateStatus={this.updateStatus} /> ) } else if (item.OpenType === 'innerpage' || item.OpenType === 'outerpage') { @@ -182,27 +178,25 @@ show={show} setting={setting} selectedData={[data]} - updateStatus={this.updateStatus} /> ) } else if (item.OpenType === 'funcbutton') { - if (item.funcType === 'changeuser') { + if (item.funcType === 'changeuser' || item.funcType === 'closetab') { return ( <ChangeUserButton key={item.uuid} - BID={BID} + BID={data.$$BID} btn={item} show={show} setting={setting} selectedData={[data]} - updateStatus={this.updateStatus} /> ) } else if (item.funcType === 'print') { return ( <PrintButton key={item.uuid} - BID={BID} + BID={data.$$BID} Tab={Tab} btn={item} show={show} @@ -210,7 +204,6 @@ setting={setting} selectedData={[data]} ContainerId={ContainerId} - updateStatus={this.updateStatus} /> ) } @@ -218,15 +211,6 @@ return null }) - } - - /** - * @description 鎿嶄綔瀹屾垚鍚庯紝鏁版嵁鍒锋柊 - */ - updateStatus = (type, positon) => { - if (type === 'refresh') { - this.props.refreshdata(positon) - } } /** @@ -260,7 +244,7 @@ if (isNaN(originVal) || isNaN(contrastVal)) { originVal = '' } - } catch { + } catch (e) { originVal = '' } } @@ -347,7 +331,7 @@ if (isNaN(content)) { content = '' } - } catch { + } catch (e) { content = '' } } @@ -505,10 +489,9 @@ show={'plus' + plusSize} BData={this.props.BData} setting={this.props.setting} - columns={this.props.logcolumns} + columns={this.props.columns} selectedData={[]} ContainerId={this.props.ContainerId} - updateStatus={this.updateStatus} /> </div> </Card> : null} @@ -524,14 +507,12 @@ Tab: PropTypes.any, // 濡傛灉褰撳墠鍏冪礌涓烘爣绛炬椂锛宼ab涓烘爣绛句俊鎭� MenuID: PropTypes.string, // 鑿滃崟ID config: PropTypes.object, // 椤甸潰閰嶇疆淇℃伅 - logcolumns: PropTypes.array, // 鏄剧ず鍒� + columns: PropTypes.array, // 鏄剧ず鍒� ContainerId: PropTypes.any, // tab椤甸潰ID锛岀敤浜庡脊绐楁帶鍒� plot: PropTypes.object, tableId: PropTypes.string, loading: PropTypes.bool, data: PropTypes.array, - refreshdata: PropTypes.func, - getexceloutparam: PropTypes.func, handleTableId: PropTypes.func } @@ -758,7 +739,7 @@ } render() { - const { plot, data, loading, BID, BData, Tab, MenuID, config, logcolumns, ContainerId } = this.props + const { plot, data, loading, BID, BData, Tab, MenuID, config, columns, ContainerId } = this.props const { card, colMap, selectKey, actionList } = this.state return ( @@ -779,10 +760,9 @@ key={action.uuid} BID={BID} Tab={Tab} - btn={action} show="icon" + btn={action} setting={config.setting} - updateStatus={() => {}} /> ) } else { @@ -791,11 +771,9 @@ key={action.uuid} BID={BID} Tab={Tab} - btn={action} show="icon" + btn={action} setting={config.setting} - getexceloutparam={this.props.getexceloutparam} - updateStatus={() => {}} /> ) } @@ -814,12 +792,11 @@ BData={BData} MenuID={MenuID} colMap={colMap} + columns={columns} selectKey={selectKey} - logcolumns={logcolumns} setting={config.setting} ContainerId={ContainerId} switchCard={this.switchCard} - refreshdata={this.props.refreshdata} /> )) } @@ -836,7 +813,6 @@ setting={config.setting} ContainerId={ContainerId} switchCard={() => {}} - refreshdata={this.props.refreshdata} /> : null } {(loading || !card.insertAction) && (!data || data.length === 0) ? <Empty description={false}/> : null} -- Gitblit v1.8.0