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/zshare/actionList/exceloutbutton/index.jsx |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/tabviews/zshare/actionList/exceloutbutton/index.jsx b/src/tabviews/zshare/actionList/exceloutbutton/index.jsx
index 58f5269..10674f4 100644
--- a/src/tabviews/zshare/actionList/exceloutbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/exceloutbutton/index.jsx
@@ -23,7 +23,6 @@
     btn: PropTypes.object,            // 鎸夐挳
     setting: PropTypes.any,           // 椤甸潰閫氱敤璁剧疆
     updateStatus: PropTypes.func,     // 鎸夐挳鐘舵�佹洿鏂�
-    getexceloutparam: PropTypes.func, // 鑾峰彇琛ㄦ牸涓弬鏁�
   }
 
   state = {
@@ -43,6 +42,7 @@
     if (position === 'toolbar') {
       MKEmitter.addListener('triggerBtnId', this.actionTrigger)
     }
+    MKEmitter.addListener('execExcelout', this.triggerExcelout)
   }
 
   componentWillUnmount () {
@@ -50,6 +50,7 @@
       return
     }
     MKEmitter.removeListener('triggerBtnId', this.actionTrigger)
+    MKEmitter.removeListener('execExcelout', this.triggerExcelout)
   }
 
   /**
@@ -109,15 +110,17 @@
       return
     }
 
-    this.triggerExcelout()
+    MKEmitter.emit('getexceloutparam', btn.$menuId, btn.uuid)
   }
 
   /**
    * @description Excel 瀵煎嚭
    */
-  triggerExcelout = () => {
+  triggerExcelout = (menuId, btnId, viewParam) => {
     const { btn } = this.props
-    let viewParam = this.props.getexceloutparam()
+    
+    if (btn.$menuId !== menuId || btn.uuid !== btnId || !viewParam) return
+
     let name = `${viewParam.menuName}${moment().format('YYYYMMDDHHmmss')}.xlsx`
     let pageSize = 1000
 

--
Gitblit v1.8.0