From da7068bd48791cdee966c786ce0dfd46f6e03df9 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 08 一月 2021 19:02:24 +0800
Subject: [PATCH] 2021-01-08

---
 src/tabviews/zshare/cardcomponent/index.jsx |   32 +++++---------------------------
 1 files changed, 5 insertions(+), 27 deletions(-)

diff --git a/src/tabviews/zshare/cardcomponent/index.jsx b/src/tabviews/zshare/cardcomponent/index.jsx
index 824b554..4007fa6 100644
--- a/src/tabviews/zshare/cardcomponent/index.jsx
+++ b/src/tabviews/zshare/cardcomponent/index.jsx
@@ -30,7 +30,6 @@
     data: PropTypes.object,           // 鍗$墖鏁版嵁
     selectKey: PropTypes.string,      // 閫夋嫨鍗$墖鐨勫簭鍙�
     colMap: PropTypes.any,            // 鏄剧ず鍒椾俊鎭紝鐢ㄤ簬璁剧疆鏍囪
-    refreshdata: PropTypes.func,      // 鎸夐挳鎿嶄綔鍚庢暟鎹埛鏂�
     switchCard: PropTypes.func        // 鍗$墖鍒囨崲
   }
 
@@ -129,14 +128,14 @@
    * @description 鑾峰彇鎸夐挳鍏冪礌
    */
   getActionList = (actions, show) => {
-    const { BID, BData, Tab, setting, columns, 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}
@@ -145,21 +144,19 @@
             columns={columns}
             selectedData={[data]}
             ContainerId={ContainerId}
-            updateStatus={this.props.refreshdata}
           />
         )
       } 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.props.refreshdata}
           />
         )
       } else if (item.OpenType === 'tab' || item.OpenType === 'blank') {
@@ -171,7 +168,6 @@
             MenuID={MenuID}
             setting={setting}
             selectedData={[data]}
-            updateStatus={this.props.refreshdata}
           />
         )
       } else if (item.OpenType === 'innerpage' || item.OpenType === 'outerpage') {
@@ -182,7 +178,6 @@
             show={show}
             setting={setting}
             selectedData={[data]}
-            updateStatus={this.props.refreshdata}
           />
         )
       } else if (item.OpenType === 'funcbutton') {
@@ -190,19 +185,18 @@
           return (
             <ChangeUserButton
               key={item.uuid}
-              BID={BID}
+              BID={data.$$BID}
               btn={item}
               show={show}
               setting={setting}
               selectedData={[data]}
-              updateStatus={this.props.refreshdata}
             />
           )
         } 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.props.refreshdata}
             />
           )
         }
@@ -499,7 +492,6 @@
               columns={this.props.columns}
               selectedData={[]}
               ContainerId={this.props.ContainerId}
-              updateStatus={this.props.refreshdata}
             />
           </div>
         </Card> : null}
@@ -521,7 +513,6 @@
     tableId: PropTypes.string,
     loading: PropTypes.bool,
     data: PropTypes.array,
-    refreshdata: PropTypes.func,
     handleTableId: PropTypes.func
   }
 
@@ -747,15 +738,6 @@
     this.props.handleTableId(this.props.tableId, _id, data)
   }
 
-  /**
-   * @description 鎿嶄綔瀹屾垚鍚庯紝鏁版嵁鍒锋柊
-   */
-  updateStatus = (type, positon, btn) => {
-    if (type === 'refresh') {
-      this.props.refreshdata(positon, btn)
-    }
-  }
-
   render() {
     const { plot, data, loading, BID, BData, Tab, MenuID, config, columns, ContainerId } = this.props
     const { card, colMap, selectKey, actionList } = this.state
@@ -781,7 +763,6 @@
                     show="icon"
                     btn={action}
                     setting={config.setting}
-                    updateStatus={this.updateStatus}
                   />
                 )
               } else {
@@ -793,7 +774,6 @@
                     show="icon"
                     btn={action}
                     setting={config.setting}
-                    updateStatus={this.updateStatus}
                   />
                 )
               }
@@ -817,7 +797,6 @@
               setting={config.setting}
               ContainerId={ContainerId}
               switchCard={this.switchCard}
-              refreshdata={this.updateStatus}
             />
           ))
         }
@@ -834,7 +813,6 @@
             setting={config.setting}
             ContainerId={ContainerId}
             switchCard={() => {}}
-            refreshdata={this.updateStatus}
           /> : null
         }
         {(loading || !card.insertAction) && (!data || data.length === 0) ? <Empty description={false}/> : null}

--
Gitblit v1.8.0