From 8190d6e5ac14616d85e3992169ecef6d99d03b76 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 13 十一月 2020 15:29:57 +0800
Subject: [PATCH] 2020-11-13

---
 src/tabviews/verupmanage/subtabtable/index.jsx |   15 +++++++--------
 1 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/src/tabviews/verupmanage/subtabtable/index.jsx b/src/tabviews/verupmanage/subtabtable/index.jsx
index cb714a6..21f2026 100644
--- a/src/tabviews/verupmanage/subtabtable/index.jsx
+++ b/src/tabviews/verupmanage/subtabtable/index.jsx
@@ -10,6 +10,7 @@
 import Utils from '@/utils/utils.js'
 import options from '@/store/options.js'
 import { buttonConfig, tabConfig } from '../config'
+import MKEmitter from '@/utils/events.js'
 
 import asyncSpinComponent from '@/utils/asyncSpinComponent'
 import SubAction from '../actionList'
@@ -43,7 +44,6 @@
     setting: null,        // 椤甸潰鍏ㄥ眬璁剧疆锛氭暟鎹簮銆佹寜閽強鏄剧ず鍒楀浐瀹氥�佷富閿瓑
     data: null,           // 鍒楄〃鏁版嵁闆�
     selectedData: [],     // 宸查�夎〃鏍兼暟鎹�
-    resetTable: false,    // 琛ㄦ牸閲嶇疆锛屽�煎湪true涓巉alse涔嬮棿鍒囨崲锛屽垏鎹㈡椂琛ㄦ牸閲嶇疆
     total: 0,             // 鎬绘暟
     loading: false,       // 鍒楄〃鏁版嵁鍔犺浇涓�
     pageIndex: 1,         // 椤电爜
@@ -63,9 +63,9 @@
     if (this.state.config && this.props.Tab.supMenu && !is(fromJS(this.props.BID), fromJS(nextProps.BID))) {
       this.setState({
         pageIndex: 1,
-        selectedData: [],
-        resetTable: !this.state.resetTable,
+        selectedData: []
       }, () => {
+        MKEmitter.emit('resetTable', this.props.MenuID + this.props.Tab.uuid) // 鍒楄〃閲嶇疆
         this.loadmaindata(nextProps.BID, 'refresh')
       })
     } else if (this.state.config && nextProps.refreshtabs && nextProps.refreshtabs.includes(this.props.Tab.uuid)) {
@@ -303,12 +303,12 @@
    * 鍚湁鍒濆涓嶅姞杞界殑椤甸潰锛屼慨鏀硅缃�
    */
   refreshbysearch = (searches) => {
+    MKEmitter.emit('resetTable', this.props.MenuID + this.props.Tab.uuid) // 鍒楄〃閲嶇疆
     this.setState({
       loading: true,
       pageIndex: 1,
       selectedData: [],
-      search: searches,
-      resetTable: !this.state.resetTable
+      search: searches
     }, () => {
       this.loadmaindata()
     })
@@ -341,11 +341,11 @@
    * @description 琛ㄦ牸鍒锋柊
    */
   reloadtable = () => {
+    MKEmitter.emit('resetTable', this.props.MenuID + this.props.Tab.uuid) // 鍒楄〃閲嶇疆
     this.setState({
       loading: true,
       pageIndex: 1,
-      selectedData: [],
-      resetTable: !this.state.resetTable
+      selectedData: []
     }, () => {
       this.loadmaindata()
     })
@@ -488,7 +488,6 @@
               refreshdata={this.refreshbytable}
               buttonTrigger={() => {}}
               handleTableId={this.handleTableId}
-              resetTable={this.state.resetTable}
               chgSelectData={this.changeSelectedData}
             />
           </div> : null

--
Gitblit v1.8.0