From 3ca91a731665962918a026f521c556f4745ebf35 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 16 十一月 2020 19:20:19 +0800
Subject: [PATCH] 2020-11-16

---
 src/tabviews/subtabtable/index.jsx |   39 ++++++++++++++++-----------------------
 1 files changed, 16 insertions(+), 23 deletions(-)

diff --git a/src/tabviews/subtabtable/index.jsx b/src/tabviews/subtabtable/index.jsx
index 971d1d8..9d8409f 100644
--- a/src/tabviews/subtabtable/index.jsx
+++ b/src/tabviews/subtabtable/index.jsx
@@ -473,14 +473,21 @@
   /**
    * @description 琛ㄦ牸鍒锋柊
    */
-  reloadtable = () => {
-    MKEmitter.emit('resetTable', this.props.MenuID + this.props.Tab.uuid) // 鍒楄〃閲嶇疆
-    this.setState({
-      pageIndex: 1
-    }, () => {
+  reloadtable = (btn) => {
+    if (!btn || btn.resetPageIndex !== 'false') {
+      MKEmitter.emit('resetTable', this.props.MenuID + this.props.Tab.uuid) // 鍒楄〃閲嶇疆
+      this.setState({
+        pageIndex: 1
+      }, () => {
+        this.loadmaindata()
+        this.getStatFieldsValue()
+      })
+    } else {
+      MKEmitter.emit('resetTable', this.props.MenuID + this.props.Tab.uuid, 'false') // 鍒楄〃閲嶇疆
       this.loadmaindata()
       this.getStatFieldsValue()
-    })
+    }
+    
   }
 
   /**
@@ -491,25 +498,11 @@
   }
 
   /**
-   * @description 椤甸潰鍒锋柊锛岄噸鏂拌幏鍙栭厤缃�
-   */
-  reloadview = () => {
-    this.setState({ loadingview: true, viewlost: false, lostmsg: '', config: null, searchlist: null, actions: null, columns: null,
-      arr_field: '', setting: null, data: null, total: 0, loading: false, pageIndex: 1, pageSize: 10, orderBy: '', search: ''
-    }, () => {
-      this.loadconfig()
-    })
-  }
-
-  /**
    * @description 鎸夐挳鎿嶄綔瀹屾垚鍚庯紙鎴愬姛鎴栧け璐ワ級锛岄〉闈㈠埛鏂帮紝閲嶇疆椤电爜鍙婇�夋嫨椤�
    */
-  refreshbyaction = (position) => {
-    if (position === 'grid' || position === 'maingrid') {
-      this.reloadtable()
-      this.props.refreshSupView()
-    } else if (position === 'view') {
-      this.reloadview()
+  refreshbyaction = (position, btn) => {
+    if (position === 'grid' || position === 'view' || position === 'maingrid') {
+      this.reloadtable(btn)
       this.props.refreshSupView()
     } else if (position === 'trigger') { // 鏃ュ巻瀛愯〃瑙﹀彂鏍囩鐐瑰嚮浜嬩欢
       this.props.closeModalView && this.props.closeModalView()

--
Gitblit v1.8.0