From e8edfdadb561cd83bf6e1c3e00d55b8cc2aee6d5 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 17 十月 2022 17:57:34 +0800 Subject: [PATCH] 2022-10-17 --- src/templates/formtabconfig/index.jsx | 56 +++++++++++++++++++++++--------------------------------- 1 files changed, 23 insertions(+), 33 deletions(-) diff --git a/src/templates/formtabconfig/index.jsx b/src/templates/formtabconfig/index.jsx index 3717e24..e32a9bf 100644 --- a/src/templates/formtabconfig/index.jsx +++ b/src/templates/formtabconfig/index.jsx @@ -8,8 +8,6 @@ import { QuestionCircleOutlined, RedoOutlined, SettingOutlined, PlusOutlined, DeleteOutlined, EditOutlined, SnippetsOutlined } from '@ant-design/icons' import Api from '@/api' -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' import Utils, { FuncUtils } from '@/utils/utils.js' import { getModalForm, getActionForm } from '@/templates/zshare/formconfig' import { queryTableSql } from '@/utils/option.js' @@ -43,7 +41,6 @@ } state = { - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, // 瀛楀吀 config: null, // 椤甸潰閰嶇疆 modaltype: '', // 妯℃�佹绫诲瀷锛屾帶鍒舵ā鎬佹鏄剧ず tableColumns: [], // 琛ㄦ牸鏄剧ず鍒� @@ -142,7 +139,7 @@ { type: 'text', key: 'menuName', - label: this.state.dict['model.menu'] + this.state.dict['model.name'], + label: '鑿滃崟鍚嶇О', initVal: menu.MenuName, readonly: true }, @@ -1062,7 +1059,7 @@ }, () => { notification.warning({ top: 92, - message: this.state.dict['model.menu.basemsg'], + message: '璇峰畬鍠勮彍鍗曞熀鏈俊鎭紒', duration: 5 }) }) @@ -1530,16 +1527,15 @@ <div className="tools"> <Collapse accordion defaultActiveKey={activeKey} bordered={false} onChange={(key) => this.setState({activeKey: key})}> {/* 鍩烘湰淇℃伅 */} - <Panel forceRender={true} header={this.state.dict['header.menu.basedata']} key="0" id="common-basedata"> + <Panel forceRender={true} header="鍩烘湰淇℃伅" key="0" id="common-basedata"> {/* 鑿滃崟淇℃伅 */} <MenuForm - dict={this.state.dict} formlist={this.state.menuformlist} wrappedComponentRef={(inst) => this.menuformRef = inst} /> </Panel> {/* 鎼滅储鏉′欢娣诲姞 */} - <Panel header={this.state.dict['header.menu.form']} key="1"> + <Panel header="琛ㄥ崟" key="1"> <div className="search-element"> {Source.searchItems.map((item, index) => { return (<SourceElement key={index} content={item}/>) @@ -1547,7 +1543,7 @@ </div> </Panel> {/* 鎸夐挳娣诲姞 */} - <Panel header={this.state.dict['header.menu.action']} key="2"> + <Panel header="鎸夐挳" key="2"> <div className="search-element"> {Source.actionItems.map((item, index) => { return (<SourceElement key={index} content={item}/>) @@ -1555,7 +1551,7 @@ </div> </Panel> {/* 娣诲姞鏍囩 */} - <Panel header={this.state.dict['header.menu.tab']} key="4"> + <Panel header="鏍囩椤�" key="4"> <div className="search-element"> {Source.tabItems.map((item, index) => { return (<SourceElement key={index} content={item}/>) @@ -1593,8 +1589,8 @@ } bordered={false} extra={ <div> <Switch className="big" checkedChildren="鍚�" unCheckedChildren="鍋�" checked={this.state.config.enabled} onChange={this.onEnabledChange} /> - <Button type="primary" onClick={this.submitConfig} loading={this.state.menuloading}>{this.state.dict['model.save']}</Button> - <Button onClick={this.cancelConfig}>{this.state.dict['model.back']}</Button> + <Button type="primary" onClick={this.submitConfig} loading={this.state.menuloading}>淇濆瓨</Button> + <Button onClick={this.cancelConfig}>杩斿洖</Button> </div> } style={{ width: '100%' }}> <SettingOutlined onClick={this.changeSetting} /> @@ -1617,7 +1613,7 @@ <EditOutlined onClick={() => { this.handleGroup(group) }}/> </span> )}> - {group.isDefault ? <SnippetsOutlined title={this.state.dict['header.form.paste']} onClick={() => {this.setState({pasteVisible: true})}} /> : null} + {group.isDefault ? <SnippetsOutlined title="绮樿创" onClick={() => {this.setState({pasteVisible: true})}} /> : null} <DragElement type="search" groupId={group.uuid} @@ -1665,7 +1661,6 @@ destroyOnClose > <ModalForm - dict={this.state.dict} card={this.state.card} formlist={this.state.formlist} inputSubmit={this.handleSubmit} @@ -1674,21 +1669,20 @@ </Modal> {/* 缂栬緫鎸夐挳锛氬鍒躲�佺紪杈� */} <Modal - title={this.state.dict['model.action'] + '-' + this.state.dict['model.edit']} + title="鎸夐挳缂栬緫" visible={modaltype === 'actionEdit'} width={920} maskClosable={false} onCancel={this.editModalCancel} footer={[ this.state.card && this.state.card.btnType !== 'cancel' ? - <CreateFunc key="create" dict={this.state.dict} ref="btnCreatFunc" trigger={this.creatFunc}/> : null, - <Button key="cancel" onClick={this.editModalCancel}>{this.state.dict['model.cancel']}</Button>, - <Button key="confirm" type="primary" onClick={this.handleSubmit}>{this.state.dict['model.confirm']}</Button> + <CreateFunc key="create" ref="btnCreatFunc" trigger={this.creatFunc}/> : null, + <Button key="cancel" onClick={this.editModalCancel}>鍙栨秷</Button>, + <Button key="confirm" type="primary" onClick={this.handleSubmit}>纭畾</Button> ]} destroyOnClose > <ActionForm - dict={this.state.dict} card={this.state.card} tabs={this.state.tabviews} formlist={this.state.formlist} @@ -1702,7 +1696,7 @@ visible={this.state.profileVisible} width={'90vw'} maskClosable={false} - okText={this.state.dict['model.submit']} + okText="鎻愪氦" onOk={this.verifySubmit} onCancel={() => { if (this.verifyRef.handleCancel) { @@ -1721,12 +1715,11 @@ config={this.state.config} columns={this.state.columns} wrappedComponentRef={(inst) => this.verifyRef = inst} - dict={this.state.dict} /> </Modal> {/* 璁剧疆鍏ㄥ眬閰嶇疆鍙婂垪琛ㄦ暟鎹簮 */} <Modal - title={this.state.dict['model.edit']} + title="缂栬緫" visible={this.state.settingVisible} width={700} maskClosable={false} @@ -1736,14 +1729,13 @@ }) }} footer={[ - <CreateFunc key="create" dict={this.state.dict} ref="tableCreatFunc" trigger={this.tableCreatFunc}/>, - <Button key="cancel" onClick={() => { this.setState({ settingVisible: false }) }}>{this.state.dict['model.cancel']}</Button>, - <Button key="confirm" type="primary" loading={this.state.sqlVerifing} onClick={this.settingSave}>{this.state.dict['model.confirm']}</Button> + <CreateFunc key="create" ref="tableCreatFunc" trigger={this.tableCreatFunc}/>, + <Button key="cancel" onClick={() => { this.setState({ settingVisible: false }) }}>鍙栨秷</Button>, + <Button key="confirm" type="primary" loading={this.state.sqlVerifing} onClick={this.settingSave}>纭畾</Button> ]} destroyOnClose > <SettingForm - dict={this.state.dict} menu={this.props.menu} config={this.state.config} inputSubmit={this.settingSave} @@ -1757,13 +1749,13 @@ visible={this.state.closeVisible} onCancel={() => { this.setState({closeVisible: false}) }} footer={[ - <Button key="save" className="mk-btn mk-green" loading={this.state.menucloseloading} onClick={this.submitConfig}>{this.state.dict['model.save']}</Button>, - <Button key="confirm" className="mk-btn mk-yellow" onClick={this.handleViewBack}>{this.state.dict['model.notsave']}</Button>, - <Button key="cancel" onClick={() => { this.setState({closeVisible: false}) }}>{this.state.dict['model.cancel']}</Button> + <Button key="save" className="mk-btn mk-green" loading={this.state.menucloseloading} onClick={this.submitConfig}>淇濆瓨</Button>, + <Button key="confirm" className="mk-btn mk-yellow" onClick={this.handleViewBack}>涓嶄繚瀛�</Button>, + <Button key="cancel" onClick={() => { this.setState({closeVisible: false}) }}>鍙栨秷</Button> ]} destroyOnClose > - {this.state.dict['header.menu.config.placeholder']} + 閰嶇疆宸蹭慨鏀癸紝鏄惁淇濆瓨閰嶇疆淇℃伅锛� </Modal> <Modal title="鍒嗙粍绠$悊" @@ -1776,7 +1768,6 @@ > <GroupForm groups={config.groups} - dict={this.state.dict} group={this.state.editgroup} inputSubmit={this.handleGroupSave} wrappedComponentRef={(inst) => this.groupRef = inst} @@ -1784,7 +1775,7 @@ </Modal> {/* 鎸夐挳閰嶇疆淇℃伅绮樿创澶嶅埗 */} <Modal - title={this.state.dict['header.form.paste']} + title="绮樿创" visible={this.state.pasteVisible} width={600} maskClosable={false} @@ -1793,7 +1784,6 @@ destroyOnClose > <PasteForm - dict={this.state.dict} wrappedComponentRef={(inst) => this.pasteFormRef = inst} inputSubmit={this.pasteSubmit} /> -- Gitblit v1.8.0