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/modalconfig/index.jsx | 43 +++++++++++++++++-------------------------- 1 files changed, 17 insertions(+), 26 deletions(-) diff --git a/src/templates/modalconfig/index.jsx b/src/templates/modalconfig/index.jsx index f21d14e..97c1bdd 100644 --- a/src/templates/modalconfig/index.jsx +++ b/src/templates/modalconfig/index.jsx @@ -9,8 +9,6 @@ import Api from '@/api' import Utils from '@/utils/utils.js' -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' import { getModalForm } from '@/templates/zshare/formconfig' import SourceElement from './dragelement/source' @@ -24,7 +22,6 @@ const { Panel } = Collapse const { confirm } = Modal -const CommonDict = sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS const Versions = asyncComponent(() => import('@/menu/versions')) const ReplaceField = asyncComponent(() => import('@/menu/replaceField')) @@ -51,7 +48,6 @@ state = { menu: null, // 涓婄骇鑿滃崟锛屼笁绾ц彍鍗曟垨鏍囩 - dict: CommonDict, // 瀛楀吀 config: null, // 椤甸潰閰嶇疆锛屽寘鎷ā鏉跨被鍨嬨�佹ā鎬佹璁剧疆銆佹坊鍔犺〃鍚嶃�佽〃鍗曞垪琛� visible: false, // 琛ㄥ崟缂栬緫妯℃�佹锛屾樉绀烘帶鍒� modalformlist: null, // 鍩烘湰淇℃伅琛ㄥ崟瀛楁 @@ -112,7 +108,7 @@ { type: 'text', key: 'supMenu', - label: this.state.dict['model.super'] + this.state.dict['model.menu'], + label: '涓婄骇鑿滃崟', initVal: _menu.MenuName, required: true, readonly: true @@ -751,7 +747,7 @@ render () { const { editAction } = this.props - const { config, dict, openEdition } = this.state + const { config, openEdition } = this.state if (!config) return null @@ -760,11 +756,8 @@ <DndProvider backend={HTML5Backend}> <div className="tools"> <Collapse accordion defaultActiveKey="1" bordered={false}> - <Panel forceRender={true} header={dict['header.menu.basedata']} key="0" id="modal-basedata"> - <MenuForm - dict={dict} - formlist={this.state.modalformlist} - /> + <Panel forceRender={true} header="鍩烘湰淇℃伅" key="0" id="modal-basedata"> + <MenuForm formlist={this.state.modalformlist}/> {/* 琛ㄥ悕娣诲姞 */} <TableComponent config={config} @@ -772,7 +765,7 @@ updatetable={this.updateconfig} /> </Panel> - <Panel header={dict['header.menu.form']} key="1"> + <Panel header="琛ㄥ崟" key="1"> <div className="search-element"> {SearchItems.map((item, index) => { return (<SourceElement key={index} content={item}/>) @@ -788,9 +781,9 @@ <Button type="danger" onClick={this.clearConfig}>娓呯┖</Button> <Versions MenuId={editAction.uuid} open_edition={openEdition} updateConfig={this.refreshConfig}/> <ReplaceField type="form" config={config} updateConfig={this.updateconfig}/> - <EditComponent dict={dict} options={['form']} config={this.state.config} plusFields={this.plusFields}/> - <Button type="primary" id="save-config" onClick={this.submitConfig} loading={this.state.menuloading}>{dict['model.save']}</Button> - <Button onClick={this.cancelConfig}>{dict['model.back']}</Button> + <EditComponent options={['form']} config={this.state.config} plusFields={this.plusFields}/> + <Button type="primary" id="save-config" onClick={this.submitConfig} loading={this.state.menuloading}>淇濆瓨</Button> + <Button onClick={this.cancelConfig}>杩斿洖</Button> </div> } style={{ width: '100%' }}> <SettingOutlined onClick={this.changeSetting} /> @@ -801,7 +794,7 @@ <Button className="mk-cols-change" onClick={() => this.changecols(2)}>2鍒�</Button> <Button className="mk-cols-change" onClick={() => this.changecols(3)}>3鍒�</Button> <Button className="mk-cols-change" onClick={() => this.changecols(4)}>4鍒�</Button> - <Switch checkedChildren={dict['model.switch.open']} unCheckedChildren={dict['model.switch.close']} defaultChecked={this.state.showField} onChange={(val) => this.setState({showField: val})} /> + <Switch checkedChildren="寮�" unCheckedChildren="鍏�" defaultChecked={this.state.showField} onChange={(val) => this.setState({showField: val})} /> </div> <div className="ant-modal-body"> <div className="modal-form"> @@ -809,7 +802,6 @@ list={config.fields} setting={config.setting} showField={this.state.showField} - placeholder={dict['header.form.modal.placeholder']} handleList={this.handleList} handleForm={this.handleForm} closeForm={this.closeForm} @@ -819,10 +811,10 @@ <div className="ant-modal-footer"> <div> <button type="button" className="ant-btn"> - <span>{dict['model.cancel']}</span> + <span>鍙栨秷</span> </button> <button type="button" className="ant-btn ant-btn-primary"> - <span>{dict['model.confirm']}</span> + <span>纭畾</span> </button> </div> <div className="action-mask"></div> @@ -832,7 +824,7 @@ </div> </DndProvider> <Modal - title={dict['model.edit']} + title="缂栬緫" visible={this.state.visible} width={950} maskClosable={false} @@ -842,7 +834,6 @@ destroyOnClose > <ModalForm - dict={dict} card={this.state.card} formlist={this.state.formlist} inputSubmit={this.handleSubmit} @@ -851,7 +842,7 @@ /> </Modal> <Modal - title={dict['model.edit']} + title="缂栬緫" visible={this.state.settingVisible} width={900} maskClosable={false} @@ -873,13 +864,13 @@ visible={this.state.closeVisible} onCancel={() => { this.setState({closeVisible: false}) }} footer={[ - <Button key="save" className="mk-btn mk-green" loading={this.state.closeloading} onClick={this.submitConfig}>{dict['model.save']}</Button>, - <Button key="confirm" className="mk-btn mk-yellow" onClick={this.handleViewBack}>{dict['model.notsave']}</Button>, - <Button key="cancel" onClick={() => { this.setState({closeVisible: false}) }}>{dict['model.cancel']}</Button> + <Button key="save" className="mk-btn mk-green" loading={this.state.closeloading} 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 > - {dict['header.menu.config.placeholder']} + 閰嶇疆宸蹭慨鏀癸紝鏄惁淇濆瓨閰嶇疆淇℃伅锛� </Modal> <StyleController /> </div> -- Gitblit v1.8.0