From 2bccb9ec7bdefe23292a22bc153463cfa1479a49 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 21 六月 2024 16:25:42 +0800
Subject: [PATCH] 2024-06-21

---
 src/tabviews/zshare/actionList/excelInbutton/index.jsx |   33 +++++++++++++++++----------------
 1 files changed, 17 insertions(+), 16 deletions(-)

diff --git a/src/tabviews/zshare/actionList/excelInbutton/index.jsx b/src/tabviews/zshare/actionList/excelInbutton/index.jsx
index 713ad82..1be21b1 100644
--- a/src/tabviews/zshare/actionList/excelInbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/excelInbutton/index.jsx
@@ -29,6 +29,7 @@
     disabled: false,
     hidden: false,
     primaryId: '',
+    dict: window.GLOB.dict
   }
 
   UNSAFE_componentWillMount () {
@@ -108,7 +109,7 @@
    */
   actionTrigger = (triggerId, record, type, lid) => {
     const { setting, BID, btn, selectedData, LID } = this.props
-    const { loading, disabled } = this.state
+    const { loading, disabled, dict } = this.state
 
     if (loading || disabled) return
     if (triggerId && btn.uuid !== triggerId) return
@@ -119,20 +120,14 @@
     if (setting.supModule && !BID) {
       notification.warning({
         top: 92,
-        message: '闇�瑕佷笂绾т富閿�硷紒',
+        message: dict['sup_key_req'] || '闇�瑕佷笂绾т富閿�硷紒',
         duration: 5
       })
     } else if (btn.Ot === 'requiredSgl' && data.length !== 1) {
       // 闇�瑕侀�夋嫨鍗曡鏃讹紝鏍¢獙鏁版嵁
       notification.warning({
         top: 92,
-        message: '璇烽�夋嫨鍗曡鏁版嵁锛�',
-        duration: 5
-      })
-    } else if (!btn.verify || !btn.verify.sheet || !btn.verify.columns || btn.verify.columns.length === 0) {
-      notification.warning({
-        top: 92,
-        message: 'excel瀵煎叆楠岃瘉淇℃伅鏈缃紒',
+        message: dict['select_single_row'] || '璇烽�夋嫨鍗曡鏁版嵁锛�',
         duration: 5
       })
     } else {
@@ -164,16 +159,18 @@
    */
   execSuccess = (res = {}) => {
     const { btn } = this.props
+    const { dict } = this.state
 
     if (res.ErrCode === 'S' || !res.ErrCode) { // 鎵ц鎴愬姛
       notification.success({
         top: 92,
-        message: res.message || '鎵ц鎴愬姛锛�',
+        message: res.message || dict['exc_success'] || '鎵ц鎴愬姛锛�',
         duration: btn.verify && btn.verify.stime ? btn.verify.stime : 2
       })
     } else if (res.ErrCode === 'Y') { // 鎵ц鎴愬姛
       Modal.success({
-        title: res.message || '鎵ц鎴愬姛锛�'
+        title: res.message || dict['exc_success'] || '鎵ц鎴愬姛锛�',
+        okText: dict['got_it'] || '鐭ラ亾浜�',
       })
     } else if (res.ErrCode === '-1') { // 瀹屾垚鍚庝笉鎻愮ず
 
@@ -226,6 +223,7 @@
    */
   execError = (res = {}) => {
     const { btn } = this.props
+    const { dict } = this.state
 
     if (!['LoginError', 'C', '-2', 'E', 'N', 'F', 'NM'].includes(res.ErrCode)) {
       res.ErrCode = 'E'
@@ -233,23 +231,24 @@
 
     if (res.ErrCode === 'E') {
       Modal.error({
-        title: res.message || '鎵ц澶辫触锛�',
+        title: res.message || dict['exc_fail'] || '鎵ц澶辫触锛�',
+        okText: dict['got_it'] || '鐭ラ亾浜�'
       })
     } else if (res.ErrCode === 'N') {
       notification.error({
         top: 92,
-        message: res.message || '鎵ц澶辫触锛�',
+        message: res.message || dict['exc_fail'] || '鎵ц澶辫触锛�',
         duration: btn.verify && btn.verify.ntime ? btn.verify.ntime : 10
       })
     } else if (res.ErrCode === 'F') {
       notification.error({
         className: 'notification-custom-error',
         top: 92,
-        message: res.message || '鎵ц澶辫触锛�',
+        message: res.message || dict['exc_fail'] || '鎵ц澶辫触锛�',
         duration: btn.verify && btn.verify.ftime ? btn.verify.ftime : 10
       })
     } else if (res.ErrCode === 'NM') {
-      message.error(res.message || '鎵ц澶辫触锛�')
+      message.error(res.message || dict['exc_fail'] || '鎵ц澶辫触锛�')
     }
     
     this.setState({
@@ -380,8 +379,10 @@
           } else if (res.ErrCode === 'C') {
             const _this = this
             confirm({
-              title: '璇风‘璁�',
+              title: window.GLOB.dict['exec_sure'] || '璇风‘璁�',
               content: res.message,
+              okText: window.GLOB.dict['ok'] || '纭畾',
+              cancelText: window.GLOB.dict['cancel'] || '鍙栨秷',
               onOk() {
                 return new Promise(resolve => {
                   Api.genericInterface(unCheckParam).then(result => {

--
Gitblit v1.8.0