From b5c32333ac9cebee515171f4ad68e6e5e73ebf1f Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 02 八月 2023 14:37:15 +0800
Subject: [PATCH] 2023-08-02

---
 src/tabviews/treepage/index.jsx                           |   12 --
 src/tabviews/zshare/actionList/tabbutton/index.jsx        |    5 -
 src/tabviews/zshare/actionList/popupbutton/index.jsx      |    5 -
 src/tabviews/zshare/actionList/excelInbutton/index.jsx    |   31 ++++---
 src/tabviews/zshare/actionList/printbutton/index.jsx      |   47 ++++-------
 src/tabviews/zshare/actionList/exceloutbutton/index.jsx   |   35 ++++----
 /dev/null                                                 |   17 ----
 src/tabviews/custom/popview/index.jsx                     |    5 -
 src/tabviews/basetable/index.jsx                          |    7 -
 src/tabviews/custom/index.jsx                             |    7 -
 src/tabviews/zshare/actionList/newpagebutton/index.jsx    |    7 -
 src/views/billprint/index.jsx                             |    5 -
 src/tabviews/subtable/index.jsx                           |    7 -
 src/tabviews/subtabtable/index.jsx                        |    7 -
 src/tabviews/commontable/index.jsx                        |    4 -
 src/tabviews/zshare/actionList/normalbutton/index.jsx     |   19 ++--
 src/tabviews/zshare/actionList/changeuserbutton/index.jsx |    9 -
 17 files changed, 80 insertions(+), 149 deletions(-)

diff --git a/src/locales/en-US/main.js b/src/locales/en-US/main.js
deleted file mode 100644
index c979dee..0000000
--- a/src/locales/en-US/main.js
+++ /dev/null
@@ -1,17 +0,0 @@
-export default {
-  'main.search': 'Search',
-  'main.reset': 'Reset',
-  'main.confirm': 'OK',
-  'main.submit': 'Submit',
-  'main.return': 'Return',
-  'main.close': 'Close',
-  'main.cancel': 'Cancel',
-  'main.action.confirm.tip': 'Do you want to execute?',
-  'main.action.confirm.success': 'Execute successfully!',
-  'main.action.confirm.selectline': 'Please select a line!',
-  'main.action.confirm.selectSingleLine': 'Please select a single row of data!',
-  'main.view.unenabled': '鎶辨瓑锛屾偍璁块棶鐨勯〉闈㈡湭鍚敤锛岃鑱旂郴绠$悊鍛樸��',
-  'main.role.title': 'The role list',
-  'form.required.input': 'Please enter the ',
-  'form.required.select': 'Please select a '
-}
\ No newline at end of file
diff --git a/src/locales/zh-CN/main.js b/src/locales/zh-CN/main.js
deleted file mode 100644
index 5fc8412..0000000
--- a/src/locales/zh-CN/main.js
+++ /dev/null
@@ -1,17 +0,0 @@
-export default {
-  'main.search': '鎼滅储',
-  'main.reset': '閲嶇疆',
-  'main.confirm': '纭畾',
-  'main.submit': '鎻愪氦',
-  'main.return': '杩斿洖',
-  'main.close': '鍏抽棴',
-  'main.cancel': '鍙栨秷',
-  'main.action.confirm.tip': '纭畾瑕佹墽琛屽悧?',
-  'main.action.confirm.success': '鎵ц鎴愬姛锛�',
-  'main.action.confirm.selectline': '璇烽�夋嫨琛岋紒',
-  'main.action.confirm.selectSingleLine': '璇烽�夋嫨鍗曡鏁版嵁锛�',
-  'main.view.unenabled': '鎶辨瓑锛屾偍璁块棶鐨勯〉闈㈡湭鍚敤锛岃鑱旂郴绠$悊鍛樸��',
-  'main.role.title': '瑙掕壊鍒楄〃',
-  'form.required.input': '璇疯緭鍏�',
-  'form.required.select': '璇烽�夋嫨'
-}
\ No newline at end of file
diff --git a/src/tabviews/basetable/index.jsx b/src/tabviews/basetable/index.jsx
index b84ae2e..cb0262b 100644
--- a/src/tabviews/basetable/index.jsx
+++ b/src/tabviews/basetable/index.jsx
@@ -4,8 +4,6 @@
 import { notification, Spin, Row, Col } from 'antd'
 
 import Api from '@/api'
-import zhCN from '@/locales/zh-CN/main.js'
-import enUS from '@/locales/en-US/main.js'
 import Utils from '@/utils/utils.js'
 import asyncComponent from '@/utils/asyncComponent'
 import MKEmitter from '@/utils/events.js'
@@ -30,7 +28,6 @@
   }
 
   state = {
-    dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
     ContainerId: Utils.getuuid(), // 鑿滃崟澶栧眰html Id
     BID: '',              // 椤甸潰璺宠浆鏃舵惡甯D
     loadingview: true,    // 椤甸潰鍔犺浇涓�
@@ -86,7 +83,7 @@
         this.setState({
           viewlost: true,
           loadingview: false,
-          lostmsg: this.state.dict['main.view.unenabled']
+          lostmsg: '鎶辨瓑锛屾偍璁块棶鐨勯〉闈㈡湭鍚敤锛岃鑱旂郴绠$悊鍛樸��'
         })
         return
       }
@@ -697,7 +694,7 @@
         {config && window.GLOB.breakpoint ? <DebugTable /> : null}
         {!window.GLOB.mkHS && config && autoMatic ? <AutoMatic autoMatic={autoMatic} tabId={config.MenuID} config={config.components[0]} /> : null}
         {!window.GLOB.mkHS && window.GLOB.systemType !== 'production' ? <TableNodes config={config} /> : null}
-        {!window.GLOB.mkHS && config ? <SettingComponent config={config} dict={this.state.dict} shortcuts={shortcuts || []}/> : null}
+        {!window.GLOB.mkHS && config ? <SettingComponent config={config} shortcuts={shortcuts || []}/> : null}
         {viewlost ? <NotFount msg={this.state.lostmsg} /> : null}
       </div>
     )
diff --git a/src/tabviews/commontable/index.jsx b/src/tabviews/commontable/index.jsx
index 4945a41..362273d 100644
--- a/src/tabviews/commontable/index.jsx
+++ b/src/tabviews/commontable/index.jsx
@@ -22,8 +22,6 @@
 const SubTable = asyncSpinComponent(() => import('@/tabviews/subtable'))
 const CardComponent = asyncSpinComponent(() => import('@/tabviews/zshare/cardcomponent'))
 const ChartComponent = asyncSpinComponent(() => import('@/tabviews/zshare/chartcomponent'))
-// const PagemsgComponent = asyncComponent(() => import('@/tabviews/zshare/pageMessage'))
-// const AutoMatic = asyncComponent(() => import('@/tabviews/zshare/automatic'))
 const DebugTable = asyncComponent(() => import('@/tabviews/debugtable'))
 
 const { TabPane } = Tabs
@@ -1134,8 +1132,6 @@
           </Tabs>))
         }
         {setting && window.GLOB.breakpoint ? <DebugTable /> : null}
-        {/* {!window.GLOB.mkHS && autoMatic ? <AutoMatic autoMatic={autoMatic} config={config} /> : null} */}
-        {/* {!window.GLOB.mkHS && window.GLOB.systemType !== 'production' ? <PagemsgComponent menu={{MenuName: this.props.MenuName, MenuNo: this.props.MenuNo}} config={config}/> : null} */}
         {!window.GLOB.mkHS && setting ? <SettingComponent config={config} shortcuts={shortcuts || []}/> : null}
         {viewlost ? <NotFount msg={this.state.lostmsg} /> : null}
       </div>
diff --git a/src/tabviews/custom/index.jsx b/src/tabviews/custom/index.jsx
index df8dd2c..136d9d5 100644
--- a/src/tabviews/custom/index.jsx
+++ b/src/tabviews/custom/index.jsx
@@ -4,8 +4,6 @@
 import { notification, Spin, Row, Col, Modal } from 'antd'
 
 import Api from '@/api'
-import zhCN from '@/locales/zh-CN/main.js'
-import enUS from '@/locales/en-US/main.js'
 import Utils from '@/utils/utils.js'
 import { getStructuredParams, getStructDefaultParam } from '@/utils/utils-datamanage.js'
 import asyncComponent from '@/utils/asyncComponent'
@@ -59,7 +57,6 @@
   }
 
   state = {
-    dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
     ContainerId: Utils.getuuid(), // 鑿滃崟澶栧眰html Id
     BID: '',              // 椤甸潰璺宠浆鏃舵惡甯D
     loadingview: true,    // 椤甸潰鍔犺浇涓�
@@ -117,7 +114,7 @@
         this.setState({
           viewlost: true,
           loadingview: false,
-          lostmsg: this.state.dict['main.view.unenabled']
+          lostmsg: '鎶辨瓑锛屾偍璁块棶鐨勯〉闈㈡湭鍚敤锛岃鑱旂郴绠$悊鍛樸��'
         })
         return
       }
@@ -1531,7 +1528,7 @@
         {config && config.interfaces.length > 0 ? <MkInterfaces BID={BID} interfaces={config.interfaces}/> : null}
         {config && window.GLOB.breakpoint ? <DebugTable /> : null}
         {!window.GLOB.mkHS && window.GLOB.systemType !== 'production' ? <TableNodes config={config} /> : null}
-        {!window.GLOB.mkHS && config ? <SettingComponent config={config} dict={this.state.dict} shortcuts={shortcuts || []}/> : null}
+        {!window.GLOB.mkHS && config ? <SettingComponent config={config} shortcuts={shortcuts || []}/> : null}
         {viewlost ? <NotFount msg={this.state.lostmsg} /> : null}
       </div>
     )
diff --git a/src/tabviews/custom/popview/index.jsx b/src/tabviews/custom/popview/index.jsx
index 502f9b9..260b28f 100644
--- a/src/tabviews/custom/popview/index.jsx
+++ b/src/tabviews/custom/popview/index.jsx
@@ -4,8 +4,6 @@
 import { notification, Spin, Row, Col, Modal } from 'antd'
 
 import Api from '@/api'
-import zhCN from '@/locales/zh-CN/main.js'
-import enUS from '@/locales/en-US/main.js'
 import Utils from '@/utils/utils.js'
 import { getStructuredParams, getStructDefaultParam } from '@/utils/utils-datamanage.js'
 import MKEmitter from '@/utils/events.js'
@@ -52,7 +50,6 @@
   }
 
   state = {
-    dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
     BID: '',              // 椤甸潰璺宠浆鏃舵惡甯D
     viewlost: false,      // 椤甸潰涓㈠け锛�1銆佹湭鑾峰彇鍒伴厤缃�-椤甸潰涓㈠け锛�2銆侀〉闈㈡湭鍚敤
     lostmsg: '',          // 椤甸潰涓㈠け鏃剁殑鎻愮ず淇℃伅
@@ -91,7 +88,7 @@
     if (!config.enabled) {
       this.setState({
         viewlost: true,
-        lostmsg: this.state.dict['main.view.unenabled']
+        lostmsg: '鎶辨瓑锛屾偍璁块棶鐨勯〉闈㈡湭鍚敤锛岃鑱旂郴绠$悊鍛樸��'
       })
       return
     }
diff --git a/src/tabviews/subtable/index.jsx b/src/tabviews/subtable/index.jsx
index 0da04de..d23475a 100644
--- a/src/tabviews/subtable/index.jsx
+++ b/src/tabviews/subtable/index.jsx
@@ -4,8 +4,6 @@
 import { notification, Spin, Switch, Row, Col, Tabs, Modal } from 'antd'
 
 import Api from '@/api'
-import zhCN from '@/locales/zh-CN/main.js'
-import enUS from '@/locales/en-US/main.js'
 import Utils from '@/utils/utils.js'
 import UtilsDM from '@/utils/utils-datamanage.js'
 import { updateSubTable } from '@/utils/utils-update.js'
@@ -35,7 +33,6 @@
   }
 
   state = {
-    dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
     loadingview: true,    // 椤甸潰鍔犺浇涓�
     viewlost: false,      // 椤甸潰涓㈠け锛�1銆佹湭鑾峰彇鍒伴厤缃�-椤甸潰涓㈠け锛�2銆侀〉闈㈡湭鍚敤
     lostmsg: '',          // 椤甸潰涓㈠け鏃剁殑鎻愮ず淇℃伅
@@ -114,7 +111,7 @@
         this.setState({
           loadingview: false,
           viewlost: true,
-          lostmsg: this.state.dict['main.view.unenabled']
+          lostmsg: '鎶辨瓑锛屾偍璁块棶鐨勯〉闈㈡湭鍚敤锛岃鑱旂郴绠$悊鍛樸��'
         })
         return
       }
@@ -880,7 +877,6 @@
                       setting={setting}
                       columns={columns}
                       pageSize={pageSize}
-                      dict={this.state.dict}
                       data={this.state.data}
                       total={this.state.total}
                       MenuID={this.props.MenuID}
@@ -946,7 +942,6 @@
               setting={setting}
               columns={columns}
               pageSize={pageSize}
-              dict={this.state.dict}
               data={this.state.data}
               total={this.state.total}
               MenuID={this.props.MenuID}
diff --git a/src/tabviews/subtabtable/index.jsx b/src/tabviews/subtabtable/index.jsx
index dfaae0f..50fe403 100644
--- a/src/tabviews/subtabtable/index.jsx
+++ b/src/tabviews/subtabtable/index.jsx
@@ -4,8 +4,6 @@
 import { notification, Spin, Modal } from 'antd'
 
 import Api from '@/api'
-import zhCN from '@/locales/zh-CN/main.js'
-import enUS from '@/locales/en-US/main.js'
 import Utils from '@/utils/utils.js'
 import UtilsDM from '@/utils/utils-datamanage.js'
 import { updateSubTabTable } from '@/utils/utils-update.js'
@@ -30,7 +28,6 @@
   }
 
   state = {
-    dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
     loadingview: true,    // 椤甸潰鍔犺浇涓�
     viewlost: false,      // 椤甸潰涓㈠け锛�1銆佹湭鑾峰彇鍒伴厤缃�-椤甸潰涓㈠け锛�2銆侀〉闈㈡湭鍚敤
     lostmsg: '',          // 椤甸潰涓㈠け鏃剁殑鎻愮ず淇℃伅
@@ -89,7 +86,7 @@
         this.setState({
           loadingview: false,
           viewlost: true,
-          lostmsg: this.state.dict['main.view.unenabled']
+          lostmsg: '鎶辨瓑锛屾偍璁块棶鐨勯〉闈㈡湭鍚敤锛岃鑱旂郴绠$悊鍛樸��'
         })
         return
       }
@@ -701,7 +698,6 @@
             actions={actions}
             columns={columns}
             BID={this.props.BID}
-            dict={this.state.dict}
             BData={this.props.BData}
             selectedData={selectedData}
             MenuID={this.props.SupMenuID}
@@ -713,7 +709,6 @@
           columns={columns}
           pageSize={pageSize}
           data={this.state.data}
-          dict={this.state.dict}
           BData={this.props.BData}
           total={this.state.total}
           MenuID={this.props.MenuID}
diff --git a/src/tabviews/treepage/index.jsx b/src/tabviews/treepage/index.jsx
index cbe188e..d21411c 100644
--- a/src/tabviews/treepage/index.jsx
+++ b/src/tabviews/treepage/index.jsx
@@ -5,20 +5,15 @@
 import { FolderOpenOutlined, FolderOutlined, FileOutlined } from '@ant-design/icons'
 
 import Api from '@/api'
-import zhCN from '@/locales/zh-CN/main.js'
-import enUS from '@/locales/en-US/main.js'
 import Utils from '@/utils/utils.js'
 import UtilsDM from '@/utils/utils-datamanage.js'
 import MKEmitter from '@/utils/events.js'
-import asyncComponent from '@/utils/asyncComponent'
 import asyncSpinComponent from '@/utils/asyncSpinComponent'
 import MkIcon from '@/components/mk-icon'
 import NotFount from '@/components/404'
 import './index.scss'
 
 const SubTable = asyncSpinComponent(() => import('@/tabviews/subtable'))
-const SettingComponent = asyncComponent(() => import('@/tabviews/zshare/settingcomponent'))
-const PagemsgComponent = asyncComponent(() => import('@/tabviews/zshare/pageMessage'))
 
 const { TabPane } = Tabs
 const { TreeNode } = Tree
@@ -33,7 +28,6 @@
   }
 
   state = {
-    dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
     ContainerId: Utils.getuuid(), // 鑿滃崟澶栧眰html Id
     loadingview: true,    // 椤甸潰鍔犺浇涓�
     BID: null,            // 椤甸潰璺宠浆鏃舵惡甯D
@@ -108,7 +102,7 @@
         this.setState({
           loadingview: false,
           viewlost: true,
-          lostmsg: this.state.dict['main.view.unenabled']
+          lostmsg: '鎶辨瓑锛屾偍璁块棶鐨勯〉闈㈡湭鍚敤锛岃鑱旂郴绠$悊鍛樸��'
         })
         return
       }
@@ -573,7 +567,7 @@
   }
 
   render() {
-    const { setting, loadingview, viewlost, config, tabgroups, treeNodes, treedata, expandedKeys, selectedKeys, shortcuts } = this.state
+    const { setting, loadingview, viewlost, tabgroups, treeNodes, treedata, expandedKeys, selectedKeys } = this.state
 
     return (
       <div className="tree-page" id={this.state.ContainerId}>
@@ -635,8 +629,6 @@
             )}
           </Col>
         </Row> : null}
-        {!window.GLOB.mkHS && window.GLOB.systemType !== 'production' ? <PagemsgComponent menu={{MenuName: this.props.MenuName, MenuNo: this.props.MenuNo}} config={config} dict={this.state.dict} /> : null}
-        {!window.GLOB.mkHS && shortcuts ? <SettingComponent config={config} dict={this.state.dict} shortcuts={shortcuts}/> : null}
         {viewlost ? <NotFount msg={this.state.lostmsg} /> : null}
       </div>
     )
diff --git a/src/tabviews/zshare/actionList/changeuserbutton/index.jsx b/src/tabviews/zshare/actionList/changeuserbutton/index.jsx
index 4935f6f..323c29c 100644
--- a/src/tabviews/zshare/actionList/changeuserbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/changeuserbutton/index.jsx
@@ -4,8 +4,6 @@
 import { Button, notification, Modal } from 'antd'
 
 import Api from '@/api'
-import zhCN from '@/locales/zh-CN/main.js'
-import enUS from '@/locales/en-US/main.js'
 import MKEmitter from '@/utils/events.js'
 import MkIcon from '@/components/mk-icon'
 // import './index.scss'
@@ -24,7 +22,6 @@
   }
 
   state = {
-    dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
     disabled: false,
     hidden: false,
     loading: false
@@ -129,7 +126,7 @@
       // 闇�瑕侀�夋嫨鍗曡鏃讹紝鏍¢獙鏁版嵁
       notification.warning({
         top: 92,
-        message: this.state.dict['main.action.confirm.selectSingleLine'],
+        message: '璇烽�夋嫨鍗曡鏁版嵁锛�',
         duration: 5
       })
       return
@@ -174,7 +171,7 @@
     param[setting.primaryKey] = primaryId
 
     confirm({
-      title: this.state.dict['main.action.confirm.tip'],
+      title: '纭畾瑕佹墽琛屽悧?',
       onOk() {
         return new Promise(resolve => {
           Api.genericInterface(param).then(res => {
@@ -210,7 +207,7 @@
             } else {
               notification.error({
                 top: 92,
-                message: res.message || res.ErrMesg,
+                message: res.message || '鎵ц澶辫触锛�',
                 duration: btn.verify && btn.verify.ntime ? btn.verify.ntime : 10
               })
               _this.setState({loading: false})
diff --git a/src/tabviews/zshare/actionList/excelInbutton/index.jsx b/src/tabviews/zshare/actionList/excelInbutton/index.jsx
index d81a1b1..545ba1d 100644
--- a/src/tabviews/zshare/actionList/excelInbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/excelInbutton/index.jsx
@@ -8,8 +8,6 @@
 import Utils, { getExcelInSql } from '@/utils/utils.js'
 import options from '@/store/options.js'
 import Api from '@/api'
-import zhCN from '@/locales/zh-CN/main.js'
-import enUS from '@/locales/en-US/main.js'
 import MKEmitter from '@/utils/events.js'
 import MkIcon from '@/components/mk-icon'
 // import './index.scss'
@@ -27,7 +25,6 @@
   }
 
   state = {
-    dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
     loading: false,
     selines: null,
     disabled: false,
@@ -134,7 +131,7 @@
       // 闇�瑕侀�夋嫨鍗曡鏃讹紝鏍¢獙鏁版嵁
       notification.warning({
         top: 92,
-        message: this.state.dict['main.action.confirm.selectSingleLine'],
+        message: '璇烽�夋嫨鍗曡鏁版嵁锛�',
         duration: 5
       })
       return
@@ -172,20 +169,20 @@
    * 4銆佹ā鎬佹鎵ц鎴愬姛鍚庢槸鍚﹀叧闂�
    * 5銆侀�氱煡涓诲垪琛ㄥ埛鏂�
    */
-  execSuccess = (res) => {
+  execSuccess = (res = {}) => {
     const { btn } = this.props
 
-    if (res && (res.ErrCode === 'S' || !res.ErrCode)) { // 鎵ц鎴愬姛
+    if (res.ErrCode === 'S' || !res.ErrCode) { // 鎵ц鎴愬姛
       notification.success({
         top: 92,
-        message: res.ErrMesg || this.state.dict['main.action.confirm.success'],
+        message: res.message || '鎵ц鎴愬姛锛�',
         duration: btn.verify && btn.verify.stime ? btn.verify.stime : 2
       })
-    } else if (res && res.ErrCode === 'Y') { // 鎵ц鎴愬姛
+    } else if (res.ErrCode === 'Y') { // 鎵ц鎴愬姛
       Modal.success({
-        title: res.ErrMesg || this.state.dict['main.action.confirm.success']
+        title: res.message || '鎵ц鎴愬姛锛�'
       })
-    } else if (res && res.ErrCode === '-1') { // 瀹屾垚鍚庝笉鎻愮ず
+    } else if (res.ErrCode === '-1') { // 瀹屾垚鍚庝笉鎻愮ず
 
     }
 
@@ -228,28 +225,32 @@
    * 2銆乪xcel瀵煎嚭锛屽け璐ュ悗鍙栨秷瀵煎嚭鎸夐挳鍔犺浇涓姸鎬�
    * 3銆侀�氱煡涓诲垪琛ㄥ埛鏂�
    */
-  execError = (res) => {
+  execError = (res = {}) => {
     const { btn } = this.props
+
+    if (!['LoginError', 'C', '-2', 'E', 'N', 'F', 'NM'].includes(res.ErrCode)) {
+      res.ErrCode = 'E'
+    }
 
     if (res.ErrCode === 'E') {
       Modal.error({
-        title: res.message || res.ErrMesg,
+        title: res.message || '鎵ц澶辫触锛�',
       })
     } else if (res.ErrCode === 'N') {
       notification.error({
         top: 92,
-        message: res.message || res.ErrMesg,
+        message: res.message || '鎵ц澶辫触锛�',
         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 || res.ErrMesg,
+        message: res.message || '鎵ц澶辫触锛�',
         duration: btn.verify && btn.verify.ftime ? btn.verify.ftime : 10
       })
     } else if (res.ErrCode === 'NM') {
-      message.error(res.message || res.ErrMesg)
+      message.error(res.message || '鎵ц澶辫触锛�')
     }
     
     this.setState({
diff --git a/src/tabviews/zshare/actionList/exceloutbutton/index.jsx b/src/tabviews/zshare/actionList/exceloutbutton/index.jsx
index c24ba02..9dd06cc 100644
--- a/src/tabviews/zshare/actionList/exceloutbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/exceloutbutton/index.jsx
@@ -8,8 +8,6 @@
 import Utils from '@/utils/utils.js'
 import options from '@/store/options.js'
 import Api from '@/api'
-import zhCN from '@/locales/zh-CN/main.js'
-import enUS from '@/locales/en-US/main.js'
 import MKEmitter from '@/utils/events.js'
 import MkIcon from '@/components/mk-icon'
 // import './index.scss'
@@ -26,7 +24,6 @@
   }
 
   state = {
-    dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
     excelName: '',  // 鏂囦欢鍚�
     search: '',     // 鎼滅储鏉′欢
     loading: false, // 瀵煎嚭涓�
@@ -627,7 +624,7 @@
         if (btn.verify.enable === 'true' && btn.verify.script) {
           this.execCustomScript()
         } else {
-          this.execSuccess({ErrCode: 'S', ErrMesg: '瀵煎嚭鎴愬姛锛�'})
+          this.execSuccess({ErrCode: 'S', message: '瀵煎嚭鎴愬姛锛�'})
         }
       } else {
         let letters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
@@ -768,7 +765,7 @@
         if (btn.verify.enable === 'true' && btn.verify.script) {
           this.execCustomScript()
         } else {
-          this.execSuccess({ErrCode: 'S', ErrMesg: '瀵煎嚭鎴愬姛锛�'})
+          this.execSuccess({ErrCode: 'S', message: '瀵煎嚭鎴愬姛锛�'})
         }
       }
     } catch (e) {
@@ -867,7 +864,7 @@
 
     Api.genericInterface(param).then((res) => {
       if (res.status) {
-        this.execSuccess({ErrCode: 'S', ErrMesg: '瀵煎嚭鎴愬姛锛�'})
+        this.execSuccess({ErrCode: 'S', message: '瀵煎嚭鎴愬姛锛�'})
       } else {
         this.execError(res)
       }
@@ -1119,20 +1116,20 @@
    * 4銆佹ā鎬佹鎵ц鎴愬姛鍚庢槸鍚﹀叧闂�
    * 5銆侀�氱煡涓诲垪琛ㄥ埛鏂�
    */
-  execSuccess = (res) => {
+  execSuccess = (res = {}) => {
     const { btn } = this.props
 
-    if (res && (res.ErrCode === 'S' || !res.ErrCode)) { // 鎵ц鎴愬姛
+    if (res.ErrCode === 'S' || !res.ErrCode) { // 鎵ц鎴愬姛
       notification.success({
         top: 92,
-        message: res.ErrMesg || this.state.dict['main.action.confirm.success'],
+        message: res.message || '鎵ц鎴愬姛锛�',
         duration: btn.verify && btn.verify.stime ? btn.verify.stime : 2
       })
-    } else if (res && res.ErrCode === 'Y') { // 鎵ц鎴愬姛
+    } else if (res.ErrCode === 'Y') { // 鎵ц鎴愬姛
       Modal.success({
-        title: res.ErrMesg || this.state.dict['main.action.confirm.success']
+        title: res.message || '鎵ц鎴愬姛锛�'
       })
-    } else if (res && res.ErrCode === '-1') { // 瀹屾垚鍚庝笉鎻愮ず
+    } else if (res.ErrCode === '-1') { // 瀹屾垚鍚庝笉鎻愮ず
 
     }
     
@@ -1175,28 +1172,32 @@
    * 2銆乪xcel瀵煎嚭锛屽け璐ュ悗鍙栨秷瀵煎嚭鎸夐挳鍔犺浇涓姸鎬�
    * 3銆侀�氱煡涓诲垪琛ㄥ埛鏂�
    */
-  execError = (res) => {
+  execError = (res = {}) => {
     const { btn } = this.props
+
+    if (!['LoginError', 'C', '-2', 'E', 'N', 'F', 'NM'].includes(res.ErrCode)) {
+      res.ErrCode = 'E'
+    }
 
     if (res.ErrCode === 'E') {
       Modal.error({
-        title: res.message || res.ErrMesg,
+        title: res.message || '鎵ц澶辫触锛�',
       })
     } else if (res.ErrCode === 'N') {
       notification.error({
         top: 92,
-        message: res.message || res.ErrMesg,
+        message: res.message || '鎵ц澶辫触锛�',
         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 || res.ErrMesg,
+        message: res.message || '鎵ц澶辫触锛�',
         duration: btn.verify && btn.verify.ftime ? btn.verify.ftime : 10
       })
     } else if (res.ErrCode === 'NM') {
-      message.error(res.message || res.ErrMesg)
+      message.error(res.message || '鎵ц澶辫触锛�')
     }
     
     this.setState({
diff --git a/src/tabviews/zshare/actionList/newpagebutton/index.jsx b/src/tabviews/zshare/actionList/newpagebutton/index.jsx
index 93c97c4..1d3ae5e 100644
--- a/src/tabviews/zshare/actionList/newpagebutton/index.jsx
+++ b/src/tabviews/zshare/actionList/newpagebutton/index.jsx
@@ -3,8 +3,6 @@
 import { is, fromJS } from 'immutable'
 import { Button, notification, Modal } from 'antd'
 
-import zhCN from '@/locales/zh-CN/main.js'
-import enUS from '@/locales/en-US/main.js'
 import MKEmitter from '@/utils/events.js'
 import MkIcon from '@/components/mk-icon'
 import './index.scss'
@@ -21,7 +19,6 @@
   }
 
   state = {
-    dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
     disabled: false,
     hidden: false,
     visible: false
@@ -119,7 +116,7 @@
       // 闇�瑕侀�夋嫨琛屾椂锛屾牎楠屾暟鎹�
       notification.warning({
         top: 92,
-        message: this.state.dict['main.action.confirm.selectline'],
+        message: '璇烽�夋嫨琛岋紒',
         duration: 5
       })
       return
@@ -127,7 +124,7 @@
       // 闇�瑕侀�夋嫨鍗曡鏃讹紝鏍¢獙鏁版嵁
       notification.warning({
         top: 92,
-        message: this.state.dict['main.action.confirm.selectSingleLine'],
+        message: '璇烽�夋嫨鍗曡鏁版嵁锛�',
         duration: 5
       })
       return
diff --git a/src/tabviews/zshare/actionList/normalbutton/index.jsx b/src/tabviews/zshare/actionList/normalbutton/index.jsx
index 78522ba..26625f1 100644
--- a/src/tabviews/zshare/actionList/normalbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/normalbutton/index.jsx
@@ -9,8 +9,6 @@
 import Api from '@/api'
 import Utils, { getSysDefaultSql } from '@/utils/utils.js'
 import options from '@/store/options.js'
-import zhCN from '@/locales/zh-CN/main.js'
-import enUS from '@/locales/en-US/main.js'
 import asyncSpinComponent from '@/utils/asyncSpinComponent'
 import { updateForm } from '@/utils/utils-update.js'
 import MKEmitter from '@/utils/events.js'
@@ -34,7 +32,6 @@
   }
 
   state = {
-    dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
     visible: false,
     formdata: null,
     selines: null,
@@ -260,7 +257,7 @@
       // 闇�瑕侀�夋嫨琛屾椂锛屾牎楠屾暟鎹�
       notification.warning({
         top: 92,
-        message: this.state.dict['main.action.confirm.selectline'],
+        message: '璇烽�夋嫨琛岋紒',
         duration: 5
       })
       return
@@ -268,7 +265,7 @@
       // 闇�瑕侀�夋嫨鍗曡鏃讹紝鏍¢獙鏁版嵁
       notification.warning({
         top: 92,
-        message: this.state.dict['main.action.confirm.selectSingleLine'],
+        message: '璇烽�夋嫨鍗曡鏁版嵁锛�',
         duration: 5
       })
       return
@@ -355,7 +352,7 @@
     } else if (btn.OpenType === 'prompt') {
       this.setState({loading: true})
       confirm({
-        title: btn.tipTitle || this.state.dict['main.action.confirm.tip'],
+        title: btn.tipTitle || '纭畾瑕佹墽琛屽悧?',
         onOk() {
           return new Promise(resolve => {
             _this.execSubmit(data, resolve)
@@ -2523,6 +2520,10 @@
     const { btn } = this.props
     const { btnconfig, autoMatic } = this.state
 
+    if (!['LoginError', 'C', '-2', 'E', 'N', 'F', 'NM'].includes(res.ErrCode)) {
+      res.ErrCode = 'E'
+    }
+    
     let sign = ''
     if (/^@speak@/i.test(res.message)) {
       res.message = res.message.replace(/^@speak@/i, '')
@@ -2867,7 +2868,7 @@
       this.execSubmit(selines, () => {}, result)
     } else {
       confirm({
-        title: btn.tipTitle || this.state.dict['main.action.confirm.tip'],
+        title: btn.tipTitle || '纭畾瑕佹墽琛屽悧?',
         onOk() {
           return new Promise(resolve => {
             _this.execSubmit(selines, resolve, result)
@@ -3019,7 +3020,7 @@
       // 闇�瑕侀�夋嫨琛屾椂锛屾牎楠屾暟鎹�
       notification.warning({
         top: 92,
-        message: this.state.dict['main.action.confirm.selectline'],
+        message: '璇烽�夋嫨琛岋紒',
         duration: 5
       })
       return
@@ -3027,7 +3028,7 @@
       // 闇�瑕侀�夋嫨鍗曡鏃讹紝鏍¢獙鏁版嵁
       notification.warning({
         top: 92,
-        message: this.state.dict['main.action.confirm.selectSingleLine'],
+        message: '璇烽�夋嫨鍗曡鏁版嵁锛�',
         duration: 5
       })
       return
diff --git a/src/tabviews/zshare/actionList/popupbutton/index.jsx b/src/tabviews/zshare/actionList/popupbutton/index.jsx
index a472218..24fbe8c 100644
--- a/src/tabviews/zshare/actionList/popupbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/popupbutton/index.jsx
@@ -4,8 +4,6 @@
 import { Button, Modal, notification, Drawer } from 'antd'
 
 import asyncSpinComponent from '@/utils/asyncSpinComponent'
-import zhCN from '@/locales/zh-CN/main.js'
-import enUS from '@/locales/en-US/main.js'
 import MKEmitter from '@/utils/events.js'
 import MkIcon from '@/components/mk-icon'
 import './index.scss'
@@ -26,7 +24,6 @@
   }
 
   state = {
-    dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
     visible: false,
     popData: null,
     primaryId: '',
@@ -255,7 +252,7 @@
         visible={visible}
         onCancel={this.popclose}
         footer={[
-          <Button key="close" onClick={this.popclose}>{this.state.dict['main.close']}</Button>
+          <Button key="close" onClick={this.popclose}>鍏抽棴</Button>
         ]}
         destroyOnClose
       >
diff --git a/src/tabviews/zshare/actionList/printbutton/index.jsx b/src/tabviews/zshare/actionList/printbutton/index.jsx
index 93bf150..fbbaa99 100644
--- a/src/tabviews/zshare/actionList/printbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/printbutton/index.jsx
@@ -7,8 +7,6 @@
 import Api from '@/api'
 import Utils from '@/utils/utils.js'
 import options from '@/store/options.js'
-import zhCN from '@/locales/zh-CN/main.js'
-import enUS from '@/locales/en-US/main.js'
 import asyncSpinComponent from '@/utils/asyncSpinComponent'
 import { updateForm } from '@/utils/utils-update.js'
 import MKEmitter from '@/utils/events.js'
@@ -32,7 +30,6 @@
   }
 
   state = {
-    dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
     visible: false,
     formdata: null,
     selines: null,
@@ -161,7 +158,7 @@
       // 闇�瑕侀�夋嫨琛屾椂锛屾牎楠屾暟鎹�
       notification.warning({
         top: 92,
-        message: this.state.dict['main.action.confirm.selectline'],
+        message: '璇烽�夋嫨琛岋紒',
         duration: 5
       })
       return
@@ -169,7 +166,7 @@
       // 闇�瑕侀�夋嫨鍗曡鏃讹紝鏍¢獙鏁版嵁
       notification.warning({
         top: 92,
-        message: this.state.dict['main.action.confirm.selectSingleLine'],
+        message: '璇烽�夋嫨鍗曡鏁版嵁锛�',
         duration: 5
       })
       return
@@ -212,7 +209,7 @@
     } else if (btn.execMode === 'prompt') {
       this.setState({ loading: true })
       confirm({
-        title: this.state.dict['main.action.confirm.tip'],
+        title: '纭畾瑕佹墽琛屽悧?',
         onOk() {
           _this.triggerPrint(data)
         },
@@ -576,7 +573,6 @@
     this.execSuccess({
       ErrCode: '-1',
       message: '',
-      ErrMesg: '',
       status: true
     })
 
@@ -1614,7 +1610,7 @@
     Api.postekPrint(param).then(res => {
       if (res.retval === '0') {
         if (params.length === 0) {
-          this.execSuccess({ ErrCode: 'S', message: '', ErrMesg: '鎵撳嵃璇锋眰宸插彂鍑恒��', status: true })
+          this.execSuccess({ ErrCode: 'S', message: '鎵撳嵃璇锋眰宸插彂鍑恒��', status: true })
         } else {
           setTimeout(() => {
             this.loopRFIDPrint(params)
@@ -1733,14 +1729,12 @@
         this.execSuccess({
           ErrCode: '-1',
           message: '鏈幏鍙栧埌鎵撳嵃淇℃伅锛�',
-          ErrMesg: '',
           status: true
         })
       } else {
         this.execError({
           ErrCode: 'N',
           message: '鏈幏鍙栧埌鎵撳嵃淇℃伅锛�',
-          ErrMesg: '',
           status: false
         })
       }
@@ -1770,7 +1764,6 @@
       this.execError({
         ErrCode: 'N',
         message: msg.join(' ; ') + ' !',
-        ErrMesg: '',
         status: false
       })
       return
@@ -1783,8 +1776,7 @@
 
       this.execSuccess({
         ErrCode: 'S',
-        message: '',
-        ErrMesg: '鎵撳嵃璇锋眰宸插彂鍑恒��',
+        message: '鎵撳嵃璇锋眰宸插彂鍑恒��',
         status: true
       })
     }
@@ -1795,8 +1787,7 @@
 
       this.execSuccess({
         ErrCode: 'S',
-        message: '',
-        ErrMesg: '鎵撳嵃璇锋眰宸插彂鍑恒��',
+        message: '鎵撳嵃璇锋眰宸插彂鍑恒��',
         status: true
       })
     }
@@ -1811,7 +1802,6 @@
           this.execError({
             ErrCode: 'N',
             message: event.data,
-            ErrMesg: '',
             status: false
           })
 
@@ -1831,8 +1821,7 @@
 
       //   this.execSuccess({
       //     ErrCode: 'S',
-      //     message: '',
-      //     ErrMesg: '鎵撳嵃璇锋眰宸插彂鍑恒��',
+      //     message: '鎵撳嵃璇锋眰宸插彂鍑恒��',
       //     status: true
       //   })
       // } else if (data && data.message && !data.status) {
@@ -1840,7 +1829,6 @@
         this.execError({
           ErrCode: 'N',
           message: data.message,
-          ErrMesg: '',
           status: false
         })
       }
@@ -1850,7 +1838,6 @@
       this.execError({
         ErrCode: 'N',
         message: '鏃犳硶杩炴帴鍒�:' + btn.verify.linkUrl,
-        ErrMesg: '',
         status: false
       })
     }
@@ -1875,19 +1862,19 @@
    * 4銆佹ā鎬佹鎵ц鎴愬姛鍚庢槸鍚﹀叧闂�
    * 5銆侀�氱煡涓诲垪琛ㄥ埛鏂�
    */
-  execSuccess = (res) => {
+  execSuccess = (res = {}) => {
     const { btn } = this.props
     const { autoMatic, btnconfig } = this.state
 
     if ((res.ErrCode === 'S' || !res.ErrCode) || autoMatic) { // 鎵ц鎴愬姛
       notification.success({
         top: 92,
-        message: res.ErrMesg || this.state.dict['main.action.confirm.success'],
+        message: res.message || '鎵ц鎴愬姛锛�',
         duration: btn.verify && btn.verify.stime ? btn.verify.stime : 2
       })
     } else if (res.ErrCode === 'Y') { // 鎵ц鎴愬姛
       Modal.success({
-        title: res.ErrMesg || this.state.dict['main.action.confirm.success']
+        title: res.message || '鎵ц鎴愬姛锛�'
       })
     } else if (res.ErrCode === '-1') { // 瀹屾垚鍚庝笉鎻愮ず
 
@@ -1928,25 +1915,29 @@
     const { btn } = this.props
     const { btnconfig, autoMatic } = this.state
 
+    if (!['LoginError', 'C', '-2', 'E', 'N', 'F', 'NM'].includes(res.ErrCode)) {
+      res.ErrCode = 'E'
+    }
+
     if (res.ErrCode === 'E' && !autoMatic) {
       Modal.error({
-        title: res.message || res.ErrMesg,
+        title: res.message || '鎵ц澶辫触锛�',
       })
     } else if (res.ErrCode === 'N' || autoMatic) {
       notification.error({
         top: 92,
-        message: res.message || res.ErrMesg,
+        message: res.message || '鎵ц澶辫触锛�',
         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 || res.ErrMesg,
+        message: res.message || '鎵ц澶辫触锛�',
         duration: btn.verify && btn.verify.ftime ? btn.verify.ftime : 10
       })
     } else if (res.ErrCode === 'NM') {
-      message.error(res.message || res.ErrMesg)
+      message.error(res.message || '鎵ц澶辫触锛�')
     }
     
     this.setState({
@@ -2220,7 +2211,7 @@
       this.execSubmit(selines, () => {}, result)
     } else {
       confirm({
-        title: this.state.dict['main.action.confirm.tip'],
+        title: '纭畾瑕佹墽琛屽悧?',
         onOk() {
           _this.triggerPrint(selines, result)
         },
diff --git a/src/tabviews/zshare/actionList/tabbutton/index.jsx b/src/tabviews/zshare/actionList/tabbutton/index.jsx
index 7a7fee1..184f2c8 100644
--- a/src/tabviews/zshare/actionList/tabbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/tabbutton/index.jsx
@@ -3,8 +3,6 @@
 import { is, fromJS } from 'immutable'
 import { Button, notification } from 'antd'
 
-import zhCN from '@/locales/zh-CN/main.js'
-import enUS from '@/locales/en-US/main.js'
 import MKEmitter from '@/utils/events.js'
 import MkIcon from '@/components/mk-icon'
 // import './index.scss'
@@ -20,7 +18,6 @@
   }
 
   state = {
-    dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
     disabled: false,
     hidden: false,
     primaryId: ''
@@ -118,7 +115,7 @@
       // 闇�瑕侀�夋嫨鍗曡鏃讹紝鏍¢獙鏁版嵁
       notification.warning({
         top: 92,
-        message: this.state.dict['main.action.confirm.selectSingleLine'],
+        message: '璇烽�夋嫨鍗曡鏁版嵁锛�',
         duration: 5
       })
       return
diff --git a/src/views/billprint/index.jsx b/src/views/billprint/index.jsx
index fbcc397..023cfb2 100644
--- a/src/views/billprint/index.jsx
+++ b/src/views/billprint/index.jsx
@@ -6,8 +6,6 @@
 import Api from '@/api'
 import Utils from '@/utils/utils.js'
 import options, { styles } from '@/store/options.js'
-import zhCN from '@/locales/zh-CN/main.js'
-import enUS from '@/locales/en-US/main.js'
 import UtilsDM from '@/utils/utils-datamanage.js'
 import NotFount from '@/components/404'
 import asyncComponent from '@/utils/asyncComponent'
@@ -34,7 +32,6 @@
 
 class BillPrint extends Component {
   state = {
-    dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
     loadingview: true,
     printing: false,
     pages: null,
@@ -231,7 +228,7 @@
           this.setState({
             viewlost: true,
             loadingview: false,
-            lostmsg: this.state.dict['main.view.unenabled']
+            lostmsg: '鎶辨瓑锛屾偍璁块棶鐨勯〉闈㈡湭鍚敤锛岃鑱旂郴绠$悊鍛樸��'
           })
           return
         }

--
Gitblit v1.8.0