From 2292d1826e69e21c8a411c217faef635fe57d458 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 07 一月 2021 10:48:49 +0800
Subject: [PATCH] Merge branch 'bms' of ssh://39.106.218.81:29418/~jinfei/pc-plat into bms

---
 src/tabviews/subtabtable/index.jsx |   20 ++++++++++++--------
 1 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/src/tabviews/subtabtable/index.jsx b/src/tabviews/subtabtable/index.jsx
index 55d904d..190922a 100644
--- a/src/tabviews/subtabtable/index.jsx
+++ b/src/tabviews/subtabtable/index.jsx
@@ -229,9 +229,7 @@
 
       config.action.forEach(item => {
         item.logLabel = Tab.label + '-' + item.label // 鐢ㄤ簬sPC_TableData_InUpDe璁板綍鎿嶄綔鎸夐挳
-        if (item.execMode) {
-          item.OpenType = 'funcbutton'
-        }
+        item.$menuId = this.props.MenuID
 
         if (item.position === 'toolbar') {
           _actions.push(item)
@@ -526,21 +524,23 @@
   /**
    * @description 瀵煎嚭Excel鏃讹紝鑾峰彇椤甸潰鎼滅储鎺掑簭绛夊弬鏁�
    */
-  getexceloutparam = () => {
-    const { Tab, mainSearch } = this.props
+  getexceloutparam = (menuId, btnId) => {
+    const { Tab, mainSearch, MenuID } = this.props
     const { arr_field, orderBy, search, setting} = this.state
+
+    if (MenuID !== menuId) return
 
     let searches = search
     if (mainSearch && mainSearch.length > 0) { // 涓昏〃鎼滅储鏉′欢
       searches = [...mainSearch, ...search]
     }
 
-    return {
+    MKEmitter.emit('execExcelout', MenuID, btnId, {
       arr_field: arr_field,
       orderBy: orderBy || setting.order,
       search: searches,
       menuName: Tab.label
-    }
+    })
   }
 
   /**
@@ -559,6 +559,10 @@
     return !is(fromJS(this.props), fromJS(nextProps)) || !is(fromJS(this.state), fromJS(nextState))
   }
 
+  componentDidMount () {
+    MKEmitter.addListener('getexceloutparam', this.getexceloutparam)
+  }
+
   /**
    * @description 缁勪欢閿�姣侊紝娓呴櫎state鏇存柊
    */
@@ -566,6 +570,7 @@
     this.setState = () => {
       return
     }
+    MKEmitter.removeListener('getexceloutparam', this.getexceloutparam)
   }
 
   render() {
@@ -602,7 +607,6 @@
                       selectedData={selectedData}
                       MenuID={this.props.SupMenuID}
                       refreshdata={this.refreshbyaction}
-                      getexceloutparam={this.getexceloutparam}
                     />
                   </div>
                   <SubTable

--
Gitblit v1.8.0