From 8cdfdd9914d1c4f6cd59176d61869522f51f39e4 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期日, 10 十月 2021 13:53:57 +0800
Subject: [PATCH] 2021-10-10

---
 src/tabviews/zshare/actionList/excelInbutton/index.jsx |   25 +++++--------------------
 1 files changed, 5 insertions(+), 20 deletions(-)

diff --git a/src/tabviews/zshare/actionList/excelInbutton/index.jsx b/src/tabviews/zshare/actionList/excelInbutton/index.jsx
index aff76d3..3d91349 100644
--- a/src/tabviews/zshare/actionList/excelInbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/excelInbutton/index.jsx
@@ -79,21 +79,6 @@
     }
     MKEmitter.removeListener('triggerBtnId', this.actionTrigger)
   }
-
-  /**
-   * @description 鎸夐挳鐘舵�佹敼鍙�
-   */
-  updateStatus = (type) => {
-    if (type === 'start') {
-      this.setState({
-        loading: true
-      })
-    } else if (type === 'over') {
-      this.setState({
-        loading: false
-      })
-    }
-  }
   
   /**
    * @description 瑙﹀彂鎸夐挳鎿嶄綔
@@ -257,7 +242,7 @@
         })
       }
 
-      this.updateStatus('over')
+      this.setState({ loading: false })
       return
     }
 
@@ -267,7 +252,7 @@
         message: '鏈幏鍙栧埌宸ヤ綔琛ㄣ��' + sheetName + '銆嬫暟鎹紒',
         duration: 5
       })
-      this.updateStatus('over')
+      this.setState({ loading: false })
       return
     } else if (data.length * btn.verify.columns.length > 30000) {
       notification.warning({
@@ -285,7 +270,7 @@
         message: result.errors,
         duration: 5
       })
-      this.updateStatus('over')
+      this.setState({ loading: false })
       return
     }
 
@@ -462,7 +447,7 @@
           className={'mk-btn mk-' + btn.class}
           onClick={() => {this.actionTrigger()}}
         >{btn.label}</Button>
-        <ExcelIn btn={btn} triggerExcelIn={() => this.updateStatus('start')} returndata={this.getexceldata} ref="excelIn" />
+        <ExcelIn btn={btn} triggerExcelIn={() => this.setState({ loading: true })} returndata={this.getexceldata} ref="excelIn" />
       </div>
     } else { // icon銆乼ext銆� all 鍗$墖
       let label = ''
@@ -491,7 +476,7 @@
           icon={icon}
           onClick={() => {this.actionTrigger()}}
         >{label}</Button>
-        <ExcelIn btn={btn} triggerExcelIn={() => this.updateStatus('start')} returndata={this.getexceldata} ref="excelIn" />
+        <ExcelIn btn={btn} triggerExcelIn={() => this.setState({ loading: true })} returndata={this.getexceldata} ref="excelIn" />
       </div>
     }
   }

--
Gitblit v1.8.0