From ded0a522a7747fb841719c13c8c35f13cf5cda4c Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 15 十一月 2021 17:28:13 +0800
Subject: [PATCH] 2021-11-15

---
 src/tabviews/custom/components/table/normal-table/index.jsx |   19 +++++++++----------
 1 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/src/tabviews/custom/components/table/normal-table/index.jsx b/src/tabviews/custom/components/table/normal-table/index.jsx
index 9adf4bf..dd7f4d0 100644
--- a/src/tabviews/custom/components/table/normal-table/index.jsx
+++ b/src/tabviews/custom/components/table/normal-table/index.jsx
@@ -85,7 +85,7 @@
         return item
       })
 
-      if (setting.selected !== 'false') {
+      if (setting.selected !== 'false' && _data && _data.length > 0) {
         setTimeout(() => {
           MKEmitter.emit('mkCheckTopLine', _config.uuid)
         }, 200)
@@ -124,6 +124,7 @@
     }
 
     this.setState({
+      pageSize: setting.pageSize || 10,
       BID: BID || '',
       BData: BData || '',
       title: _config.wrap.title,
@@ -193,7 +194,7 @@
 
     let result = await Api.genericInterface(param)
     if (result.status) {
-      if (setting.selected !== 'false') {
+      if (setting.selected !== 'false' && result.data && result.data.length > 0) {
         setTimeout(() => {
           MKEmitter.emit('mkCheckTopLine', config.uuid)
         }, 200)
@@ -202,6 +203,9 @@
         }
       } else {
         MKEmitter.emit('resetSelectLine', config.uuid, '', '') // 骞挎挱鏁版嵁鍒囨崲
+        if (setting.$hasSyncModule) {
+          MKEmitter.emit('syncBalconyData', config.uuid, [], false)
+        }
       }
       
       reset && MKEmitter.emit('resetTable', config.uuid, repage) // 鍒楄〃閲嶇疆
@@ -224,9 +228,6 @@
         total: result.total,
         loading: false
       })
-      if (setting.$hasSyncModule) {
-        MKEmitter.emit('syncBalconyData', config.uuid, [], false)
-      }
     } else {
       this.setState({
         loading: false
@@ -485,7 +486,7 @@
     const { setting } = this.state
 
     if (!setting.supModule || setting.supModule !== MenuID) return
-    if (id !== this.state.BID) {
+    if (id !== this.state.BID || id !== '') {
       this.setState({
         pageIndex: 1,
         BID: id,
@@ -538,7 +539,7 @@
           return item
         })
 
-        if (setting.selected !== 'false') {
+        if (setting.selected !== 'false' && _data && _data.length > 0) {
           setTimeout(() => {
             MKEmitter.emit('mkCheckTopLine', config.uuid)
           }, 200)
@@ -650,9 +651,7 @@
 
 const mapStateToProps = (state) => {
   return {
-    menuType: state.editLevel,
-    permAction: state.permAction,
-    permMenus: state.permMenus
+    menuType: state.editLevel
   }
 }
 

--
Gitblit v1.8.0