From 29c5821ce140e89a8b35e53f41672dd86da56982 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 18 二月 2020 18:43:38 +0800
Subject: [PATCH] 2020-02-18

---
 src/tabviews/subtable/index.jsx |   22 +++++++++++++++-------
 1 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/src/tabviews/subtable/index.jsx b/src/tabviews/subtable/index.jsx
index 8d1c0ca..924ba66 100644
--- a/src/tabviews/subtable/index.jsx
+++ b/src/tabviews/subtable/index.jsx
@@ -26,7 +26,8 @@
     SupMenuID: PropTypes.string,     // 涓婄骇鑿滃崟Id
     ContainerId: PropTypes.any,      // 涓夌骇鑿滃崟Container(html) ID
     handleTableId: PropTypes.func,   // 鎺у埗琛ㄦ牸鏁版嵁鍒囨崲鏃讹紝鏇存柊鍦ㄤ富琛ㄤ腑鐨刬d
-    handleMainTable: PropTypes.func  // 鎺у埗琛ㄦ牸鏁版嵁鍒囨崲鏃讹紝鏇存柊鍦ㄤ富琛ㄤ腑鐨刬d
+    handleMainTable: PropTypes.func, // 鍒锋柊涓昏〃
+    refreshtabs:PropTypes.any
   }
 
   state = {
@@ -60,6 +61,8 @@
   UNSAFE_componentWillReceiveProps(nextProps) {
     if (this.props.Tab.supMenu && !is(fromJS(this.props.BID), fromJS(nextProps.BID))) {
       this.loadmaindata(nextProps.BID, 'refresh')
+    } else if (nextProps.refreshtabs && nextProps.refreshtabs.includes(this.props.Tab.uuid)) {
+      this.reloadtable()
     }
   }
 
@@ -497,15 +500,20 @@
     if (btn.execSuccess === 'grid' && type === 'success') {
       this.reloadtable()
     } else if (btn.execError === 'grid' && type === 'error') {
-      this.reloadview()
-    } else if (btn.execSuccess === 'view' && type === 'success') {
       this.reloadtable()
+    } else if (btn.execSuccess === 'view' && type === 'success') {
+      this.reloadview()
     } else if (btn.execError === 'view' && type === 'error') {
       this.reloadview()
-    } else if (btn.popClose === 'maingrid' && type === 'pop') {
-      this.props.handleMainTable()
-    } else if (btn.popClose === 'subgrid' && type === 'pop') {
+    } else if (btn.popClose === 'grid' && type === 'pop') {
       this.reloadtable()
+    } else if (btn.popClose === 'view' && type === 'pop') {
+      this.reloadview()
+    } else if (btn.popClose === 'maingrid' && type === 'pop') {
+      this.props.handleMainTable('maingrid')
+    } else if (btn.popClose === 'equaltab' && type === 'pop') {
+      this.reloadtable()
+      this.props.handleMainTable('equaltab')
     }
   }
 
@@ -640,7 +648,7 @@
           visible={this.state.visible}
           onCancel={this.popclose}
           footer={[
-            <Button key="cancel" onClick={this.popclose}>{this.state.dict['main.close']}</Button>
+            <Button key="close" onClick={this.popclose}>{this.state.dict['main.close']}</Button>
           ]}
           destroyOnClose
         >

--
Gitblit v1.8.0