From c51f5e007a3e03c9d6731ab7f28f0080de009990 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 17 十一月 2021 18:38:32 +0800
Subject: [PATCH] 2021-11-17

---
 src/tabviews/zshare/actionList/excelInbutton/index.jsx |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/src/tabviews/zshare/actionList/excelInbutton/index.jsx b/src/tabviews/zshare/actionList/excelInbutton/index.jsx
index 5d69148..0961633 100644
--- a/src/tabviews/zshare/actionList/excelInbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/excelInbutton/index.jsx
@@ -28,7 +28,9 @@
   state = {
     dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
     loading: false,
+    selines: null,
     disabled: false,
+    hidden: false,
     primaryId: '',
   }
 
@@ -43,7 +45,7 @@
           disabled = true
         }
       })
-      this.setState({disabled})
+      this.setState({disabled, hidden: disabled && btn.control === 'hidden'})
     }
   }
 
@@ -69,7 +71,7 @@
           }
         })
       }
-      this.setState({disabled})
+      this.setState({disabled, hidden: disabled && btn.control === 'hidden'})
     }
   }
 
@@ -127,6 +129,7 @@
     }
 
     this.setState({
+      selines: data,
       primaryId: primaryId
     }, () => {
       this.refs.excelIn.exceltrigger()
@@ -167,7 +170,7 @@
     })
 
     if (btn.execSuccess !== 'never') {
-      MKEmitter.emit('refreshByButtonResult', btn.$menuId, btn.execSuccess, btn)
+      MKEmitter.emit('refreshByButtonResult', btn.$menuId, btn.execSuccess, btn, '', this.state.selines)
     }
     if (btn.switchTab && btn.switchTab.length > 0) {
       let id = btn.switchTab[btn.switchTab.length - 1]
@@ -211,7 +214,7 @@
     })
 
     if (btn.execError !== 'never') {
-      MKEmitter.emit('refreshByButtonResult', btn.$menuId, btn.execError, btn)
+      MKEmitter.emit('refreshByButtonResult', btn.$menuId, btn.execError, btn, '', this.state.selines)
     }
   }
 
@@ -436,7 +439,9 @@
 
   render() {
     const { btn, show } = this.props
-    const { loading, disabled } = this.state
+    const { loading, disabled, hidden } = this.state
+
+    if (hidden) return null
 
     if (show === 'actionList') {
       return <div style={{display: 'inline-block'}} onClick={(e) => e.stopPropagation()}>

--
Gitblit v1.8.0