From fda3c459010b29c765d7a66ecd291d265ee6436d Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 16 二月 2022 17:59:46 +0800
Subject: [PATCH] 2022-02-16

---
 src/tabviews/zshare/actionList/normalbutton/index.jsx |   16 +++++++++++++---
 1 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/src/tabviews/zshare/actionList/normalbutton/index.jsx b/src/tabviews/zshare/actionList/normalbutton/index.jsx
index 61a8389..12daac6 100644
--- a/src/tabviews/zshare/actionList/normalbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/normalbutton/index.jsx
@@ -1459,7 +1459,7 @@
     const { btn } = this.props
     const { btnconfig, autoMatic } = this.state
 
-    if ((res && res.ErrCode === 'S') || autoMatic) { // 鎵ц鎴愬姛
+    if ((res && (res.ErrCode === 'S' || !res.ErrCode)) || autoMatic) { // 鎵ц鎴愬姛
       notification.success({
         top: 92,
         message: res.ErrMesg || this.state.dict['main.action.confirm.success'],
@@ -1495,6 +1495,15 @@
     if (btn.output) {
       id = res.mk_b_id || res[btn.output] || ''
     }
+    let tabId = ''
+    if (btn.refreshTab && btn.refreshTab.length > 0) {
+      tabId = btn.refreshTab[btn.refreshTab.length - 1]
+    }
+
+    if (tabId && btn.$MenuID === tabId) { // 鍒锋柊褰撳墠鑿滃崟鏃讹紝鍋滄鍏朵粬鎿嶄綔
+      MKEmitter.emit('reloadMenuView', tabId, 'table')
+      return
+    }
 
     if (btn.execSuccess === 'closetab') {
       MKEmitter.emit('closeTabView', btn.$MenuID)
@@ -1504,9 +1513,10 @@
       MKEmitter.emit('refreshByButtonResult', btn.$menuId, btn.execSuccess, btn, id, this.state.selines)
     }
 
-    if (btn.refreshTab && btn.refreshTab.length > 0) {
-      MKEmitter.emit('reloadMenuView', btn.refreshTab[btn.refreshTab.length - 1], 'table')
+    if (tabId) {
+      MKEmitter.emit('reloadMenuView', tabId, 'table')
     }
+    
     if (btn.switchTab && btn.switchTab.length > 0) {
       let id = btn.switchTab[btn.switchTab.length - 1]
       let node = document.getElementById('tab' + id)

--
Gitblit v1.8.0