From d70c5b0eee48808b9a42d1f7685640f5bafc2ad3 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 13 三月 2023 10:03:53 +0800
Subject: [PATCH] 2023-03-13

---
 src/tabviews/formtab/index.jsx                                        |    2 
 src/locales/zh-CN/main.js                                             |   26 --------
 src/tabviews/formtab/actionList/index.jsx                             |    2 
 src/tabviews/zshare/pageMessage/index.jsx                             |    5 -
 src/locales/en-US/main.js                                             |   26 --------
 src/tabviews/commontable/index.jsx                                    |   13 +---
 src/tabviews/zshare/normalTable/index.jsx                             |    3 
 src/tabviews/zshare/settingcomponent/index.jsx                        |    7 +-
 src/utils/utils.js                                                    |   39 ++++++------
 src/tabviews/custom/components/table/edit-table/normalTable/index.jsx |    2 
 src/tabviews/zshare/actionList/excelInbutton/index.jsx                |    2 
 src/tabviews/zshare/actionList/printbutton/index.jsx                  |    2 
 12 files changed, 33 insertions(+), 96 deletions(-)

diff --git a/src/locales/en-US/main.js b/src/locales/en-US/main.js
index 1b18f24..c979dee 100644
--- a/src/locales/en-US/main.js
+++ b/src/locales/en-US/main.js
@@ -6,37 +6,11 @@
   'main.return': 'Return',
   'main.close': 'Close',
   'main.cancel': 'Cancel',
-  'main.revert.default': 'Restore default Settings',
-  'main.copy.success': 'Copy success',
-  'main.pagination.of': 'of',
-  'main.pagination.items': 'items',
-  'main.page.settingerror': '椤甸潰閰嶇疆閿欒锛�',
-  'main.datasource.settingerror': '鏁版嵁婧愰厤缃敊璇紒',
-  'main.action.settingerror': 'Button setting error!',
   '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.action.primarykey.required': 'Primary key not set!',
-  'main.action.primarykey.repetition': 'There are multiple primary keys!',
-  'main.action.primarykey.repetitionbid': 'There are multiple BID!',
   'main.view.unenabled': '鎶辨瓑锛屾偍璁块棶鐨勯〉闈㈡湭鍚敤锛岃鑱旂郴绠$悊鍛樸��',
-  'main.excel.line': 'line',
-  'main.excel.column': 'column',
-  'main.excel.includekey': ' Contain keywords ',
-  'main.excel.content.emptyerror': '鍐呭涓嶅彲涓虹┖',
-  'main.excel.content.typeerror': '鍐呭搴斾负鏁板��',
-  'main.excel.content.interror': '鍐呭搴斾负鏁存暟',
-  'main.excel.content.floaterror': '鍐呭搴斾负娴偣鏁�',
-  'main.excel.content.floatIntover': '鏁存暟浣嶈秴鍑鸿寖鍥�',
-  'main.excel.content.floatPointover': '灏忔暟浣嶈秴鍑鸿寖鍥�',
-  'main.excel.content.date.over': '鏃堕棿涓鸿礋鍊兼垨澶ぇ',
-  'main.excel.content.date.formatError': '鏃堕棿鏍煎紡閿欒',
-  'main.excel.content.maxlimit': '鍐呭瓒呴暱',
-  'main.excel.content.limitmin': '灏忎簬鏈�灏忓��',
-  'main.excel.content.limitmax': '澶т簬鏈�澶у��',
-  'main.form.link.error': '鑱斿姩鑿滃崟璁剧疆閿欒锛�',
-  'main.form.picture.check': '鏌ョ湅鍥剧墖',
   'main.role.title': 'The role list',
   'form.required.input': 'Please enter the ',
   'form.required.select': 'Please select a '
diff --git a/src/locales/zh-CN/main.js b/src/locales/zh-CN/main.js
index cf33d24..5fc8412 100644
--- a/src/locales/zh-CN/main.js
+++ b/src/locales/zh-CN/main.js
@@ -6,37 +6,11 @@
   'main.return': '杩斿洖',
   'main.close': '鍏抽棴',
   'main.cancel': '鍙栨秷',
-  'main.revert.default': '鎭㈠榛樿璁剧疆',
-  'main.copy.success': '澶嶅埗鎴愬姛',
-  'main.pagination.of': '鍏�',
-  'main.pagination.items': '鏉�',
-  'main.page.settingerror': '椤甸潰閰嶇疆閿欒锛�',
-  'main.datasource.settingerror': '鏁版嵁婧愰厤缃敊璇紒',
-  'main.action.settingerror': '鎸夐挳璁剧疆閿欒锛�',
   'main.action.confirm.tip': '纭畾瑕佹墽琛屽悧?',
   'main.action.confirm.success': '鎵ц鎴愬姛锛�',
   'main.action.confirm.selectline': '璇烽�夋嫨琛岋紒',
   'main.action.confirm.selectSingleLine': '璇烽�夋嫨鍗曡鏁版嵁锛�',
-  'main.action.primarykey.required': '鏈缃富閿紒',
-  'main.action.primarykey.repetition': '瀛樺湪澶氫釜涓婚敭锛�',
-  'main.action.primarykey.repetitionbid': '瀛樺湪澶氫釜BID锛�',
   'main.view.unenabled': '鎶辨瓑锛屾偍璁块棶鐨勯〉闈㈡湭鍚敤锛岃鑱旂郴绠$悊鍛樸��',
-  'main.excel.line': '琛�',
-  'main.excel.column': '鍒�',
-  'main.excel.includekey': '鍚湁鍏抽敭瀛�',
-  'main.excel.content.emptyerror': '鍐呭涓嶅彲涓虹┖',
-  'main.excel.content.typeerror': '鍐呭搴斾负鏁板��',
-  'main.excel.content.interror': '鍐呭搴斾负鏁存暟',
-  'main.excel.content.floaterror': '鍐呭搴斾负娴偣鏁�',
-  'main.excel.content.floatIntover': '鏁存暟浣嶈秴鍑鸿寖鍥�',
-  'main.excel.content.floatPointover': '灏忔暟浣嶈秴鍑鸿寖鍥�',
-  'main.excel.content.date.over': '鏃堕棿涓鸿礋鍊兼垨澶ぇ',
-  'main.excel.content.date.formatError': '鏃堕棿鏍煎紡閿欒',
-  'main.excel.content.maxlimit': '鍐呭瓒呴暱',
-  'main.excel.content.limitmin': '灏忎簬鏈�灏忓��',
-  'main.excel.content.limitmax': '澶т簬鏈�澶у��',
-  'main.form.link.error': '鑱斿姩鑿滃崟璁剧疆閿欒锛�',
-  'main.form.picture.check': '鏌ョ湅鍥剧墖',
   'main.role.title': '瑙掕壊鍒楄〃',
   'form.required.input': '璇疯緭鍏�',
   'form.required.select': '璇烽�夋嫨'
diff --git a/src/tabviews/commontable/index.jsx b/src/tabviews/commontable/index.jsx
index a1c9987..f1a4fa3 100644
--- a/src/tabviews/commontable/index.jsx
+++ b/src/tabviews/commontable/index.jsx
@@ -4,8 +4,6 @@
 import { notification, Spin, Tabs, Switch, 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 options from '@/store/options.js'
 import UtilsDM from '@/utils/utils-datamanage.js'
@@ -41,7 +39,6 @@
   }
 
   state = {
-    dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
     ContainerId: Utils.getuuid(), // 鑿滃崟澶栧眰html Id
     BID: null,            // 椤甸潰璺宠浆鏃舵惡甯D
     loadingview: true,    // 椤甸潰鍔犺浇涓�
@@ -111,7 +108,7 @@
         this.setState({
           loadingview: false,
           viewlost: true,
-          lostmsg: this.state.dict['main.view.unenabled']
+          lostmsg: '鎶辨瓑锛屾偍璁块棶鐨勯〉闈㈡湭鍚敤锛岃鑱旂郴绠$悊鍛樸��'
         })
         return
       }
@@ -1198,7 +1195,6 @@
                       setting={setting}
                       actions={actions}
                       columns={columns}
-                      dict={this.state.dict}
                       MenuID={MenuID}
                       selectedData={selectedData}
                     />
@@ -1214,7 +1210,6 @@
                       setting={setting}
                       columns={columns}
                       pageSize={pageSize}
-                      dict={this.state.dict}
                       data={this.state.data}
                       total={this.state.total}
                       loading={this.state.loading}
@@ -1262,7 +1257,6 @@
               setting={setting}
               actions={actions}
               columns={columns}
-              dict={this.state.dict}
               MenuID={MenuID}
               selectedData={selectedData}
             />
@@ -1278,7 +1272,6 @@
               setting={setting}
               columns={columns}
               pageSize={pageSize}
-              dict={this.state.dict}
               data={this.state.data}
               total={this.state.total}
               loading={this.state.loading}
@@ -1313,8 +1306,8 @@
         }
         {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} dict={this.state.dict} /> : null}
-        {!window.GLOB.mkHS && setting ? <SettingComponent config={config} dict={this.state.dict} shortcuts={shortcuts || []}/> : 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/components/table/edit-table/normalTable/index.jsx b/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx
index 8c85c47..3aea5ea 100644
--- a/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx
+++ b/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx
@@ -1995,7 +1995,7 @@
         pageSizeOptions: pageOptions,
         showSizeChanger: true,
         total: this.props.total || 0,
-        showTotal: (total, range) => `${range[0]}-${range[1]} ${this.state.dict['main.pagination.of']} ${total} ${this.state.dict['main.pagination.items']}`
+        showTotal: (total, range) => `${range[0]}-${range[1]} 鍏� ${total} 鏉
       }
     }
 
diff --git a/src/tabviews/formtab/actionList/index.jsx b/src/tabviews/formtab/actionList/index.jsx
index 87e516a..9b97235 100644
--- a/src/tabviews/formtab/actionList/index.jsx
+++ b/src/tabviews/formtab/actionList/index.jsx
@@ -327,7 +327,7 @@
   actionSettingError = () => {
     notification.warning({
       top: 92,
-      message: this.props.dict['main.action.settingerror'],
+      message: '鎸夐挳璁剧疆閿欒锛�',
       duration: 5
     })
   }
diff --git a/src/tabviews/formtab/index.jsx b/src/tabviews/formtab/index.jsx
index 98691d1..dcc0d1d 100644
--- a/src/tabviews/formtab/index.jsx
+++ b/src/tabviews/formtab/index.jsx
@@ -224,7 +224,7 @@
         } else if (item.resourceType === '1' && !item.dataSource) {
           notification.warning({
             top: 92,
-            message: item.label + ': ' + this.state.dict['main.datasource.settingerror'],
+            message: item.label + ': 鏁版嵁婧愰厤缃敊璇紒',
             duration: 5
           })
         }
diff --git a/src/tabviews/zshare/actionList/excelInbutton/index.jsx b/src/tabviews/zshare/actionList/excelInbutton/index.jsx
index b632588..9623d2d 100644
--- a/src/tabviews/zshare/actionList/excelInbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/excelInbutton/index.jsx
@@ -296,7 +296,7 @@
       })
     }
 
-    let result = getExcelInSql(btn, data, this.state.dict, (this.props.BID || ''), this.state.primaryId)
+    let result = getExcelInSql(btn, data, (this.props.BID || ''), this.state.primaryId)
 
     if (result.errors) {
       notification.warning({
diff --git a/src/tabviews/zshare/actionList/printbutton/index.jsx b/src/tabviews/zshare/actionList/printbutton/index.jsx
index c8302d8..8983ccf 100644
--- a/src/tabviews/zshare/actionList/printbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/printbutton/index.jsx
@@ -1967,7 +1967,7 @@
   actionSettingError = () => {
     notification.warning({
       top: 92,
-      message: this.state.dict['main.action.settingerror'],
+      message: '鎸夐挳璁剧疆閿欒锛�',
       duration: 5
     })
   }
diff --git a/src/tabviews/zshare/normalTable/index.jsx b/src/tabviews/zshare/normalTable/index.jsx
index e08b2cb..2f6d9ab 100644
--- a/src/tabviews/zshare/normalTable/index.jsx
+++ b/src/tabviews/zshare/normalTable/index.jsx
@@ -42,7 +42,6 @@
     tableId: PropTypes.string,       // 鍒楄〃Id
     statFValue: PropTypes.any,       // 鍚堣瀛楁鏁版嵁
     pageSize: PropTypes.any,         // 姣忛〉鏁版嵁
-    dict: PropTypes.object,          // 瀛楀吀椤�
     MenuID: PropTypes.string,        // 鑿滃崟Id
     setting: PropTypes.object,       // 琛ㄦ牸鍏ㄥ眬璁剧疆锛歵ableType锛堣〃鏍兼槸鍚﹀彲閫夈�佸崟閫夈�佸閫夛級銆乧olumnfixed锛堝垪鍥哄畾锛夈�乤ctionfixed锛堟寜閽浐瀹氾級
     pickup: PropTypes.any,           // 鏁版嵁鏀惰捣
@@ -1251,7 +1250,7 @@
         pageSizeOptions: pageOptions,
         showSizeChanger: true,
         total: this.props.total || 0,
-        showTotal: (total, range) => `${range[0]}-${range[1]} ${this.props.dict['main.pagination.of']} ${total} ${this.props.dict['main.pagination.items']}`
+        showTotal: (total, range) => `${range[0]}-${range[1]} 鍏� ${total} 鏉
       }
     }
 
diff --git a/src/tabviews/zshare/pageMessage/index.jsx b/src/tabviews/zshare/pageMessage/index.jsx
index 60db458..4ca2a3b 100644
--- a/src/tabviews/zshare/pageMessage/index.jsx
+++ b/src/tabviews/zshare/pageMessage/index.jsx
@@ -15,7 +15,6 @@
 class PageMessage extends Component {
   static propTpyes = {
     BID: PropTypes.any,          // 鐖剁骇Id锛岀敤浜庢煡璇笅鎷夐�夋嫨椤�
-    dict: PropTypes.object,      // 瀛楀吀
   }
 
   state = {
@@ -314,7 +313,7 @@
 
 
   render() {
-    const { menu, dict } = this.props
+    const { menu } = this.props
     const { debug, visible, data } = this.state
 
     return (
@@ -333,7 +332,7 @@
           visible={visible}
           onCancel={() => this.setState({visible: false})}
           footer={[
-            <Button key="close" onClick={() => this.setState({visible: false})}>{dict['main.close']}</Button>
+            <Button key="close" onClick={() => this.setState({visible: false})}>鍏抽棴</Button>
           ]}
           destroyOnClose
         >
diff --git a/src/tabviews/zshare/settingcomponent/index.jsx b/src/tabviews/zshare/settingcomponent/index.jsx
index 2f137ee..70fbc77 100644
--- a/src/tabviews/zshare/settingcomponent/index.jsx
+++ b/src/tabviews/zshare/settingcomponent/index.jsx
@@ -14,7 +14,6 @@
 
 class CustomSetting extends Component {
   static propTpyes = {
-    dict: PropTypes.object,           // 瀛楀吀琛�
     config: PropTypes.object,         // 椤甸潰閰嶇疆淇℃伅
     shortcuts: PropTypes.any,         // 鑷畾涔夎缃�
   }
@@ -525,9 +524,9 @@
           visible={visible}
           onCancel={() => { this.setState({ visible: false }) }}
           footer={[
-            <Button key="revert" type="danger" loading={this.state.revertLoading} onClick={this.settingRevert}>{this.props.dict['main.revert.default']}</Button>,
-            <Button key="cancel" onClick={() => { this.setState({ visible: false }) }}>{this.props.dict['main.cancel']}</Button>,
-            <Button key="confirm" type="primary" loading={this.state.confirmLoading} onClick={this.settingSubmit}>{this.props.dict['main.submit']}</Button>
+            <Button key="revert" type="danger" loading={this.state.revertLoading} onClick={this.settingRevert}>鎭㈠榛樿璁剧疆</Button>,
+            <Button key="cancel" onClick={() => { this.setState({ visible: false }) }}>鍙栨秷</Button>,
+            <Button key="confirm" type="primary" loading={this.state.confirmLoading} onClick={this.settingSubmit}>鎻愪氦</Button>
           ]}
           destroyOnClose
         >
diff --git a/src/utils/utils.js b/src/utils/utils.js
index 09aede5..4431f93 100644
--- a/src/utils/utils.js
+++ b/src/utils/utils.js
@@ -856,10 +856,9 @@
  * @description 鑾峰彇excel瀵煎叆鍙傛暟
  * @return {Object} item   鎸夐挳淇℃伅
  * @return {Array}  data   excel鏁版嵁
- * @return {Object} dict   瀛楀吀椤�
  * @return {String} BID    涓婄骇Id
  */
-export function getExcelInSql (item, data, dict, BID, primaryId) {
+export function getExcelInSql (item, data, BID, primaryId) {
   let btn = item.verify
   let keys = ['delete', 'drop', 'insert', 'truncate', 'update']
   let userName = sessionStorage.getItem('User_Name') || ''
@@ -956,7 +955,7 @@
 
       let val = item[col.Column] !== undefined ? item[col.Column] : ''
       let _colindex = cols[cindex] || (cindex + 1)
-      let _position = (_topline + lindex + 1) + dict['main.excel.line'] + ' ' + _colindex + dict['main.excel.column']  + ' '
+      let _position = (_topline + lindex + 1) + '琛� ' + _colindex + '鍒� '
 
       if (/^Nvarchar/ig.test(col.type)) {
         if (typeof(val) === 'number') {
@@ -966,54 +965,54 @@
         val = val.replace(/(^\s*$)|\t*|\v*|'*/ig, '')
 
         if (!val && col.required === 'true') {            // 蹇呭~鏍¢獙
-          errors.push(_position + dict['main.excel.content.emptyerror'])
+          errors.push(_position + '鍐呭涓嶅彲涓虹┖')
         } else if (col.limit && val.length > col.limit) { // 闀垮害鏍¢獙
-          errors.push(_position + dict['main.excel.content.maxlimit'])
+          errors.push(_position + '鍐呭瓒呴暱')
         } else {                                          // 鍏抽敭瀛楁牎楠�
           keys.forEach(key => {
             let _patten = new RegExp('(^' + key + '\\s+)|(\\s+' + key + '\\s+)', 'ig')
             if (_patten.test(val)) {
-              errors.push(_position + dict['main.excel.includekey'] + key)
+              errors.push(_position + '鍚湁鍏抽敭瀛�' + key)
             }
           })
         }
       } else if (/^int/ig.test(col.type)) {
         if (!val && val !== 0) {
-          errors.push(_position + dict['main.excel.content.emptyerror'])
+          errors.push(_position + '鍐呭涓嶅彲涓虹┖')
         } else {
           let _val = val + ''
 
           if (!/^(([^0][0-9]+|0)$)|^(([1-9]+)$)/.test(_val)) {               // 妫�楠屾槸鍚︿负鏁存暟
-            errors.push(_position + dict['main.excel.content.interror'])
+            errors.push(_position + '鍐呭搴斾负鏁存暟')
           } else if ((col.min || col.min === 0) && val < col.min) {          // 鏈�灏忓�兼楠�
-            errors.push(_position + dict['main.excel.content.limitmin'])
+            errors.push(_position + '灏忎簬鏈�灏忓��')
           } else if ((col.max || col.max === 0) && val > col.max) {          // 鏈�澶у�兼楠�
-            errors.push(_position + dict['main.excel.content.limitmax'])
+            errors.push(_position + '澶т簬鏈�澶у��')
           }
         }
       } else if (/^Decimal/ig.test(col.type)) {
         if (!val && val !== 0) {
-          errors.push(_position + dict['main.excel.content.emptyerror'])
+          errors.push(_position + '鍐呭涓嶅彲涓虹┖')
         } else {
           let _val = val + ''
           let _vals = _val.split('.')
 
           if (!/^(([^0][0-9]+|0)\.([0-9]+)$)|^(([^0][0-9]+|0)$)|^(([1-9]+)\.([0-9]+)$)|^(([1-9]+)$)/.test(_val)) {                           // 妫�楠屾槸鍚︿负娴偣鏁�
-            errors.push(_position + dict['main.excel.content.floaterror'])
+            errors.push(_position + '鍐呭搴斾负娴偣鏁�')
           } else if (_vals[0].length > 18) {                          // 妫�楠屾暣鏁颁綅
-            errors.push(_position + dict['main.excel.content.floatIntover'])
+            errors.push(_position + '鏁存暟浣嶈秴鍑鸿寖鍥�')
           } else if (_vals[1] && _vals[1].length > col.limit) {       // 鏈�灏忓�兼楠�
-            errors.push(_position + dict['main.excel.content.floatPointover'])
+            errors.push(_position + '灏忔暟浣嶈秴鍑鸿寖鍥�')
           } else if ((col.min || col.min === 0) && val < col.min) {   // 鏈�灏忓�兼楠�
-            errors.push(_position + dict['main.excel.content.limitmin'])
+            errors.push(_position + '灏忎簬鏈�灏忓��')
           } else if ((col.max || col.max === 0) && val > col.max) {   // 鏈�澶у�兼楠�
-            errors.push(_position + dict['main.excel.content.limitmax'])
+            errors.push(_position + '澶т簬鏈�澶у��')
           }
         }
       } else if (col.type === 'date') {
         if (typeof(val) === 'number') {
           if (val > 2958465 || val <= 0) {                 // 鏃堕棿杩囧ぇ鎴栧皬浜庣瓑浜�0
-            errors.push(_position + dict['main.excel.content.date.over'])
+            errors.push(_position + '鏃堕棿涓鸿礋鍊兼垨澶ぇ')
           } else {                                         // 鏃堕棿鏍煎紡鍖�
             if (val < 60) {                                // 1900-2-29锛宔xcel涓瓨鍦紝瀹為檯涓嶅瓨鍦�
               val++
@@ -1023,12 +1022,12 @@
         } else if (typeof(val) === 'string') {
           val = val.replace(/(^\s*$)|\t*|\v*/ig, '')
           if (!val && col.required === 'true') {           // 鏃堕棿蹇呭~鏍¢獙
-            errors.push(_position + dict['main.excel.content.emptyerror'])
+            errors.push(_position + '鍐呭涓嶅彲涓虹┖')
           } else if (val && !/^[1-9][0-9]{3}/.test(val)) { // 鏃堕棿姝e垯鏍¢獙
-            errors.push(_position + dict['main.excel.content.date.formatError'])
+            errors.push(_position + '鏃堕棿鏍煎紡閿欒')
           }
         } else {                                           // 鏃堕棿鏍煎紡閿欒
-          errors.push(_position + dict['main.excel.content.date.formatError'])
+          errors.push(_position + '鏃堕棿鏍煎紡閿欒')
         }
       }
 

--
Gitblit v1.8.0