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/subtable/index.jsx |   23 +++++++++--------------
 1 files changed, 9 insertions(+), 14 deletions(-)

diff --git a/src/tabviews/subtable/index.jsx b/src/tabviews/subtable/index.jsx
index df9cbc2..874d125 100644
--- a/src/tabviews/subtable/index.jsx
+++ b/src/tabviews/subtable/index.jsx
@@ -183,10 +183,6 @@
             item = {...item, ...userConfig.action[item.uuid]}
           }
 
-          if (item.execMode) {
-            item.OpenType = 'funcbutton'
-          }
-
           if (item.OpenType === 'funcbutton' && item.funcType === 'print' && item.verify && item.printer) {
             item.verify.defaultPrinter = item.printer.defaultPrinter || ''
             if (item.verify.printerTypeList && item.printer.printerList) {
@@ -258,9 +254,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)
@@ -675,21 +669,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
-    }
+    })
   }
 
   /**
@@ -748,6 +744,7 @@
 
   componentDidMount () {
     MKEmitter.addListener('reloadData', this.reloadData)
+    MKEmitter.addListener('getexceloutparam', this.getexceloutparam)
   }
 
   /**
@@ -758,6 +755,7 @@
       return
     }
     MKEmitter.removeListener('reloadData', this.reloadData)
+    MKEmitter.removeListener('getexceloutparam', this.getexceloutparam)
   }
 
   render() {
@@ -794,7 +792,6 @@
                       selectedData={selectedData}
                       refreshdata={this.refreshbyaction}
                       ContainerId={this.props.ContainerId}
-                      getexceloutparam={this.getexceloutparam}
                     />
                   </div>
                   <div className="subtable-box">
@@ -840,7 +837,6 @@
                     tableId={this.props.Tab.uuid}
                     refreshdata={this.refreshbyaction}
                     handleTableId={this.handleTableId}
-                    getexceloutparam={this.getexceloutparam}
                   />
                 </Col>
               )
@@ -853,7 +849,6 @@
                     BID={this.props.BID}
                     Tab={this.props.Tab}
                     data={this.state.data}
-                    getexceloutparam={this.getexceloutparam}
                     loading={this.state.loading}
                   />
                 </Col>

--
Gitblit v1.8.0