From 2bccb9ec7bdefe23292a22bc153463cfa1479a49 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 21 六月 2024 16:25:42 +0800 Subject: [PATCH] 2024-06-21 --- src/tabviews/zshare/actionList/index.jsx | 70 ++++++++++++++++++++++++---------- 1 files changed, 49 insertions(+), 21 deletions(-) diff --git a/src/tabviews/zshare/actionList/index.jsx b/src/tabviews/zshare/actionList/index.jsx index 911e141..d0a7bd4 100644 --- a/src/tabviews/zshare/actionList/index.jsx +++ b/src/tabviews/zshare/actionList/index.jsx @@ -17,11 +17,13 @@ const PrintButton = asyncComponent(() => import('./printbutton')) const FuncMegvii = asyncComponent(() => import('./funcMegvii')) const FuncZip = asyncComponent(() => import('./funczip')) +const EditLine = asyncComponent(() => import('./editLine')) +const ExportPdf = asyncComponent(() => import('./exportPdf')) +const FuncButton = asyncComponent(() => import('./funcbutton')) class ActionList extends Component { static propTpyes = { BID: PropTypes.any, // 涓昏〃ID - lock: PropTypes.any, // 鍙紪杈戣〃涓寜閽攣瀹� BData: PropTypes.any, // 涓昏〃鏁版嵁 selectedData: PropTypes.any, // 瀛愯〃涓�夋嫨鏁版嵁 MenuID: PropTypes.string, // 鑿滃崟ID @@ -55,14 +57,14 @@ } getButtonList = (actions) => { - const { BID, BData, MenuID, columns, setting, selectedData, lock } = this.props + const { BID, BData, MenuID, columns, setting, selectedData } = this.props return actions.map(item => { if (['exec', 'prompt', 'pop'].includes(item.OpenType)) { return ( <NormalButton key={item.uuid} show={item.show || 'actionList'} - disabled={lock || false} + disabled={false} BID={BID} btn={item} BData={BData} @@ -76,7 +78,7 @@ <ExcelInButton key={item.uuid} show={item.show || 'actionList'} - disabled={lock || false} + disabled={false} BID={BID} btn={item} BData={BData} @@ -89,11 +91,12 @@ <ExcelOutButton key={item.uuid} show={item.show || 'actionList'} - disabled={lock || false} + disabled={false} BID={BID} btn={item} BData={BData} setting={setting} + selectedData={selectedData} /> ) } else if (item.OpenType === 'popview') { @@ -101,7 +104,7 @@ <PopupButton key={item.uuid} show={item.show || 'actionList'} - disabled={lock || false} + disabled={false} BID={BID} btn={item} BData={BData} @@ -114,7 +117,7 @@ <TabButton key={item.uuid} show={item.show || 'actionList'} - disabled={lock || false} + disabled={false} btn={item} BID={BID} BData={BData} @@ -127,7 +130,8 @@ <NewPageButton key={item.uuid} show={item.show || 'actionList'} - disabled={lock || false} + disabled={false} + BID={BID} btn={item} BData={BData} selectedData={selectedData} @@ -139,7 +143,7 @@ <ChangeUserButton key={item.uuid} show={item.show || 'actionList'} - disabled={lock || false} + disabled={false} BID={BID} btn={item} BData={BData} @@ -153,7 +157,7 @@ <PrintButton key={item.uuid} show={item.show || 'actionList'} - disabled={lock || false} + disabled={false} BID={BID} btn={item} BData={BData} @@ -167,7 +171,7 @@ <FuncMegvii key={item.uuid} show={item.show || 'actionList'} - disabled={lock || false} + disabled={false} BID={BID} btn={item} setting={setting} @@ -178,42 +182,66 @@ return ( <FuncZip key={item.uuid} - show={item.show || 'actionList'} - disabled={lock || false} + disabled={false} BID={BID} btn={item} + BData={BData} setting={setting} selectedData={selectedData} /> ) + } else if (item.funcType === 'expPdf') { + return ( + <ExportPdf + key={item.uuid} + btn={item} + /> + ) + } else if (item.funcType === 'addline' || item.funcType === 'delline') { + return ( + <EditLine + key={item.uuid} + disabled={false} + btn={item} + selectedData={selectedData} + /> + ) + } + } else { + return ( + <FuncButton + key={item.uuid} + BID={BID} + btn={item} + selectedData={selectedData} + /> + ) } - } return null }) } render() { - const { setting, MenuID } = this.props + const { setting } = this.props const { actions, mores } = this.state - let fixed = setting.actionfixed && setting.tabType === 'main' // 鎸夐挳鏄惁鍥哄畾鍦ㄥご閮� - if (fixed && MenuID) { + if (setting.actionfixed === 'true') { return ( <Affix offsetTop={48}> - <div className="button-list toolbar-button" id={fixed ? MenuID + 'mainaction' : ''}> + <div className="button-list toolbar-button"> {this.getButtonList(actions)} {mores ? <Dropdown overlay={<div className="mk-button-dropdown-wrap">{this.getButtonList(mores)}</div>} trigger={['hover']}> - <div className="mk-more">鏇村<DownOutlined/></div> + <div className="mk-button-more">{window.GLOB.dict['more'] || '鏇村'}<DownOutlined/></div> </Dropdown> : null} </div> </Affix> ) } else { return ( - <div className="button-list toolbar-button" id={fixed ? MenuID + 'mainaction' : ''}> + <div className="button-list toolbar-button"> {this.getButtonList(actions)} {mores ? <Dropdown overlay={<div className="mk-button-dropdown-wrap">{this.getButtonList(mores)}</div>} trigger={['hover']}> - <div className="mk-more">鏇村<DownOutlined/></div> + <div className="mk-button-more">{window.GLOB.dict['more'] || '鏇村'}<DownOutlined/></div> </Dropdown> : null} </div> ) -- Gitblit v1.8.0