From 28d65cf7ebfe0dd30ade6973e0634e1c8f663b63 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 28 十月 2020 16:12:20 +0800
Subject: [PATCH] 2020-10-28

---
 src/tabviews/zshare/actionList/index.jsx |   50 ++++++++++++--------------------------------------
 1 files changed, 12 insertions(+), 38 deletions(-)

diff --git a/src/tabviews/zshare/actionList/index.jsx b/src/tabviews/zshare/actionList/index.jsx
index 47cdba2..67f6200 100644
--- a/src/tabviews/zshare/actionList/index.jsx
+++ b/src/tabviews/zshare/actionList/index.jsx
@@ -25,48 +25,24 @@
     Tab: PropTypes.any,               // 濡傛灉褰撳墠鍏冪礌涓烘爣绛炬椂锛宼ab涓烘爣绛句俊鎭�
     MenuID: PropTypes.string,         // 鑿滃崟ID
     actions: PropTypes.array,         // 鎸夐挳缁�
-    operations: PropTypes.array,      // 琛ㄦ牸涓寜閽粍
     logcolumns: PropTypes.array,      // 鏄剧ず鍒�
     setting: PropTypes.any,           // 椤甸潰閫氱敤璁剧疆
     ContainerId: PropTypes.any,       // tab椤甸潰ID锛岀敤浜庡脊绐楁帶鍒�
     refreshdata: PropTypes.func,      // 鎵ц瀹屾垚鍚庢暟鎹埛鏂�
     getexceloutparam: PropTypes.func, // 鑾峰彇excel瀵煎嚭鏁版嵁
-    triggerBtn: PropTypes.any,        // 蹇嵎閿Е鍙戠殑鎸夐挳
   }
 
   state = {
-    dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
-    running: false,
-    triggerBtn: null
-  }
-
-  /**
-   * @description 涓婄骇鑿滃崟id鍙樺寲鏃讹紝鍒锋柊鏁版嵁
-   */
-  UNSAFE_componentWillReceiveProps(nextProps) {
-    if (nextProps.triggerBtn && !is(fromJS(this.props.triggerBtn), fromJS(nextProps.triggerBtn)) && nextProps.triggerBtn.parentId === this.props.MenuID) {
-      if (!this.state.running) {
-        this.setState({
-          triggerBtn: nextProps.triggerBtn
-        })
-      }
-    }
+    dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS
   }
 
   shouldComponentUpdate (nextProps, nextState) {
     return !is(fromJS(this.props), fromJS(nextProps)) || !is(fromJS(this.state), fromJS(nextState))
   }
 
-  updateStatus = (type, positon, unclose) => {
-    if (type === 'start') {
-      this.setState({running: true})
-    } else if (type === 'over') {
-      this.setState({running: false})
-    } else if (type === 'refresh') {
+  updateStatus = (type, positon) => {
+    if (type === 'refresh') {
       this.props.refreshdata(positon)
-      if (!unclose) {
-        this.setState({running: false})
-      }
     } else if (type === 'trigger') { // 鏃ュ巻涓殑鏂版爣绛鹃〉瑙﹀彂浜嬩欢
       this.props.refreshdata('trigger')
     }
@@ -80,6 +56,7 @@
         return (
           <NormalButton
             key={item.uuid}
+            show="actionList"
             BID={BID}
             Tab={Tab}
             btn={item}
@@ -88,7 +65,6 @@
             columns={logcolumns}
             ContainerId={ContainerId}
             selectedData={selectedData}
-            triggerBtn={this.state.triggerBtn}
             updateStatus={this.updateStatus}
           />
         )
@@ -96,12 +72,12 @@
         return (
           <ExcelInButton
             key={item.uuid}
+            show="actionList"
             BID={BID}
             Tab={Tab}
             btn={item}
             setting={setting}
             selectedData={selectedData}
-            triggerBtn={this.state.triggerBtn}
             updateStatus={this.updateStatus}
           />
         )
@@ -109,11 +85,11 @@
         return (
           <ExcelOutButton
             key={item.uuid}
+            show="actionList"
             BID={BID}
             Tab={Tab}
             btn={item}
             setting={setting}
-            triggerBtn={this.state.triggerBtn}
             getexceloutparam={getexceloutparam}
             updateStatus={this.updateStatus}
           />
@@ -122,13 +98,13 @@
         return (
           <PopupButton
             key={item.uuid}
+            show="actionList"
             BID={BID}
             Tab={Tab}
             btn={item}
             BData={BData}
             setting={setting}
             selectedData={selectedData}
-            triggerBtn={this.state.triggerBtn}
             updateStatus={this.updateStatus}
           />
         )
@@ -136,11 +112,11 @@
         return (
           <TabButton
             key={item.uuid}
+            show="actionList"
             btn={item}
             MenuID={MenuID}
             setting={setting}
             selectedData={selectedData}
-            triggerBtn={this.state.triggerBtn}
             updateStatus={this.updateStatus}
           />
         )
@@ -148,11 +124,11 @@
         return (
           <NewPageButton
             key={item.uuid}
+            show="actionList"
             btn={item}
             setting={setting}
             selectedData={selectedData}
             updateStatus={this.updateStatus}
-            triggerBtn={this.state.triggerBtn}
           />
         )
       } else if (item.OpenType === 'funcbutton') {
@@ -160,11 +136,11 @@
           return (
             <ChangeUserButton
               key={item.uuid}
+              show="actionList"
               BID={BID}
               btn={item}
               setting={setting}
               selectedData={selectedData}
-              triggerBtn={this.state.triggerBtn}
               updateStatus={this.updateStatus}
             />
           )
@@ -172,6 +148,7 @@
           return (
             <PrintButton
               key={item.uuid}
+              show="actionList"
               BID={BID}
               Tab={Tab}
               btn={item}
@@ -179,7 +156,6 @@
               setting={setting}
               ContainerId={ContainerId}
               selectedData={selectedData}
-              triggerBtn={this.state.triggerBtn}
               updateStatus={this.updateStatus}
             />
           )
@@ -190,7 +166,7 @@
   }
 
   render() {
-    const { setting, MenuID, actions, operations } = this.props
+    const { setting, MenuID, actions } = this.props
     let fixed = setting.actionfixed && setting.tabType === 'main' // 鎸夐挳鏄惁鍥哄畾鍦ㄥご閮�
 
     if (fixed) {
@@ -198,7 +174,6 @@
         <Affix offsetTop={48}>
           <div className="button-list toolbar-button" id={fixed ? MenuID + 'mainaction' : ''}>
             {this.getButtonList(actions)}
-            {operations && operations.length > 0 ? <div className="grid-button-list">{this.getButtonList(operations)}</div> : null}
           </div>
         </Affix>
       )
@@ -206,7 +181,6 @@
       return (
         <div className="button-list toolbar-button" id={fixed ? MenuID + 'mainaction' : ''}>
           {this.getButtonList(actions)}
-          {operations && operations.length > 0 ? <div className="grid-button-list">{this.getButtonList(operations)}</div> : null}
         </div>
       )
     }

--
Gitblit v1.8.0