From 1779677cece5864b62a65df4b01a4a69496e149a Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 13 五月 2025 20:51:15 +0800 Subject: [PATCH] Merge branch 'master' into positec --- src/tabviews/zshare/settingcomponent/editTable/index.jsx | 31 ++++++++++++++----------------- 1 files changed, 14 insertions(+), 17 deletions(-) diff --git a/src/tabviews/zshare/settingcomponent/editTable/index.jsx b/src/tabviews/zshare/settingcomponent/editTable/index.jsx index 818744c..2dad740 100644 --- a/src/tabviews/zshare/settingcomponent/editTable/index.jsx +++ b/src/tabviews/zshare/settingcomponent/editTable/index.jsx @@ -3,11 +3,8 @@ import { Table, Form, Select, Cascader } from 'antd' import { EditOutlined } from '@ant-design/icons' -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' import './index.scss' -let eTDict = sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS const EditableContext = React.createContext() const shortkeycode = { 65: 'A', 66: 'B', 67: 'C', 68: 'D', 69: 'E', 70: 'F', 71: 'G', 72: 'H', 73: 'I', 74: 'J', 75: 'K', 76: 'L', 77: 'M', @@ -70,32 +67,32 @@ 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, options: [], width: '25%', - render: (text, record) => { + render: (text) => { if (!text) return '' 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) => { + render: (_, record) => { const { editingKey } = this.state const editable = this.isEditing(record) return editable ? ( @@ -103,11 +100,11 @@ <EditableContext.Consumer> {form => ( <span onClick={() => this.save(form, record.uuid)} style={{ marginRight: 8 , color: '#1890ff', cursor: 'pointer'}}> - {eTDict['model.save']} + {window.GLOB.dict['save'] || '淇濆瓨'} </span> )} </EditableContext.Consumer> - <span style={{ color: '#1890ff', cursor: 'pointer'}} onClick={() => this.cancel(record.uuid)}>{eTDict['model.cancel']}</span> + <span style={{ color: '#1890ff', cursor: 'pointer'}} onClick={() => this.cancel(record.uuid)}>{window.GLOB.dict['cancel'] || '鍙栨秷'}</span> </div> ) : ( <div className={'edit-operation-btn' + (editingKey !== '' ? ' disabled' : '')} style={{minWidth: '110px'}}> @@ -118,22 +115,22 @@ }], printTypeColumns: [ { - title: '鎵撳嵃绫诲瀷', + title: window.GLOB.dict['print_type'] || '鎵撳嵃绫诲瀷', dataIndex: 'Text', 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) => { + render: (_, record) => { const { editingKey } = this.state const editable = this.isEditing(record) return editable ? ( @@ -141,11 +138,11 @@ <EditableContext.Consumer> {form => ( <span onClick={() => this.save(form, record.uuid, record.parentId)} style={{ marginRight: 8 , color: '#1890ff', cursor: 'pointer'}}> - {eTDict['model.save']} + {window.GLOB.dict['save'] || '淇濆瓨'} </span> )} </EditableContext.Consumer> - <span style={{ color: '#1890ff', cursor: 'pointer'}} onClick={() => this.cancel(record.uuid)}>{eTDict['model.cancel']}</span> + <span style={{ color: '#1890ff', cursor: 'pointer'}} onClick={() => this.cancel(record.uuid)}>{window.GLOB.dict['cancel'] || '鍙栨秷'}</span> </div> ) : ( <div className={'edit-operation-btn' + (editingKey !== '' ? ' disabled' : '')} style={{minWidth: '110px'}}> -- Gitblit v1.8.0