From e71e42f89047ca9ac063ed3b790c074a91a04dd0 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 22 四月 2025 17:41:59 +0800
Subject: [PATCH] 2025-04-22

---
 src/tabviews/zshare/settingcomponent/editTable/index.jsx |   12 ++++++------
 src/utils/utils-custom.js                                |    9 +++++++++
 src/tabviews/zshare/settingcomponent/index.jsx           |   16 +++++++++-------
 3 files changed, 24 insertions(+), 13 deletions(-)

diff --git a/src/tabviews/zshare/settingcomponent/editTable/index.jsx b/src/tabviews/zshare/settingcomponent/editTable/index.jsx
index 4596721..b0a64e2 100644
--- a/src/tabviews/zshare/settingcomponent/editTable/index.jsx
+++ b/src/tabviews/zshare/settingcomponent/editTable/index.jsx
@@ -67,11 +67,11 @@
     editingKey: '',
     visible: false,
     columns: [{
-      title: '鍚嶇О',
+      title: window.GLOB.dict['name'] || '鍚嶇О',
       dataIndex: 'label',
       width: '25%'
     }, {
-      title: '蹇嵎閿�',
+      title: window.GLOB.dict['shortcut'] || '蹇嵎閿�',
       dataIndex: 'shortcut',
       inputType: 'cascader',
       editable: true,
@@ -82,14 +82,14 @@
         return text[0] + '+' + shortkeycode[text[1]]
       }
     }, {
-      title: '鎵撳嵃鏈�',
+      title: window.GLOB.dict['printer'] || '鎵撳嵃鏈�',
       dataIndex: 'printer',
       inputType: 'select',
       editable: true,
       options: [],
       width: '25%'
     }, {
-      title: '鎿嶄綔',
+      title: window.GLOB.dict['operation'] || '鎿嶄綔',
       dataIndex: 'operation',
       width: '140px',
       render: (text, record) => {
@@ -120,14 +120,14 @@
         width: '26.1%'
       },
       {
-        title: '鎵撳嵃鏈�',
+        title: window.GLOB.dict['printer'] || '鎵撳嵃鏈�',
         dataIndex: 'printer',
         inputType: 'select',
         editable: true,
         options: [],
       },
       {
-        title: '鎿嶄綔',
+        title: window.GLOB.dict['operation'] || '鎿嶄綔',
         dataIndex: 'operation',
         width: '153px',
         render: (text, record) => {
diff --git a/src/tabviews/zshare/settingcomponent/index.jsx b/src/tabviews/zshare/settingcomponent/index.jsx
index dd87d2c..f2e08de 100644
--- a/src/tabviews/zshare/settingcomponent/index.jsx
+++ b/src/tabviews/zshare/settingcomponent/index.jsx
@@ -22,6 +22,8 @@
     components: null,      // 缁勪欢闆嗗悎
     revertLoading: false,  // 鎭㈠榛樿璁剧疆
     confirmLoading: false, // 鑷畾涔夎缃ā鎬佹鍔犺浇涓�
+    dict: window.GLOB.dict,
+    lang: sessionStorage.getItem('lang')
   }
 
   shouldComponentUpdate (nextProps, nextState) {
@@ -531,30 +533,30 @@
   }
 
   render() {
-    const { components, visible } = this.state
+    const { components, visible, dict, lang } = this.state
 
     if (window.GLOB.mkHS || window.GLOB.sysType !== 'local') return null
 
     return (
       <div className="tool-wrap">
-        <Tooltip placement="left" title="鑷畾涔夎缃�">
+        <Tooltip placement="left" title={dict['custom_settings'] || '鑷畾涔夎缃�'}>
           <Button icon="setting" shape="circle" onClick={this.trigger}/>
         </Tooltip>
         <Modal
           wrapClassName="custom-setting-modal"
-          title="鑷畾涔夎缃�"
+          title={dict['custom_settings'] || '鑷畾涔夎缃�'}
           maskClosable={false}
           width={950}
           visible={visible}
           onCancel={() => { this.setState({ visible: false }) }}
           footer={[
-            <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>
+            <Button key="revert" type="danger" loading={this.state.revertLoading} onClick={this.settingRevert}>{dict['restore_default'] || '鎭㈠榛樿璁剧疆'}</Button>,
+            <Button key="cancel" onClick={() => { this.setState({ visible: false }) }}>{dict['cancel'] || '鍙栨秷'}</Button>,
+            <Button key="confirm" type="primary" loading={this.state.confirmLoading} onClick={this.settingSubmit}>{dict['submit'] || '鎻愪氦'}</Button>
           ]}
           destroyOnClose
         >
-          <div className="tip">娉細琛岀骇鎸夐挳蹇嵎閿缃棤鏁堛��</div>
+          {lang !== 'en-US' ? <div className="tip">娉細琛岀骇鎸夐挳蹇嵎閿缃棤鏁堛��</div> : null}
           {components && components.length > 0 ? components.map(item => (
             <div key={item.uuid}>
               <p className="component-title">{item.title}</p>
diff --git a/src/utils/utils-custom.js b/src/utils/utils-custom.js
index d51b230..3cda7e8 100644
--- a/src/utils/utils-custom.js
+++ b/src/utils/utils-custom.js
@@ -2528,6 +2528,10 @@
       } else if (item.type === 'group') {
         traversal(item.components)
       } else {
+        if (item.wrap && item.wrap.title) {
+          sql.push(item.wrap.title)
+        }
+        
         if (item.setting && (!item.wrap || !item.wrap.datatype || item.wrap.datatype === 'dynamic')) {
           if (item.setting.interType === 'system') {
             filterSql(item.setting.dataresource)
@@ -2970,6 +2974,11 @@
       } else if (item.type === 'group') {
         traversal(item.components)
       } else {
+        if (item.wrap && item.wrap.title) {
+          if (titDict[item.wrap.title]) {
+            item.wrap.title = titDict[item.wrap.title]
+          }
+        }
         if (item.wrap && (item.wrap.click === 'menu' || item.wrap.click === 'menus')) {
           if (item.wrap.click === 'menu') {
             resetMenu(item.wrap)

--
Gitblit v1.8.0