From 58a28e1faa15f638a136fefdcfcd0b3106c1fa16 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 24 六月 2020 10:18:54 +0800 Subject: [PATCH] 2020-06-24 --- src/templates/menuconfig/editthdmenu/index.jsx | 49 +++++++++++++++++++++++++------------------------ 1 files changed, 25 insertions(+), 24 deletions(-) diff --git a/src/templates/menuconfig/editthdmenu/index.jsx b/src/templates/menuconfig/editthdmenu/index.jsx index 8d088a2..99a7f89 100644 --- a/src/templates/menuconfig/editthdmenu/index.jsx +++ b/src/templates/menuconfig/editthdmenu/index.jsx @@ -8,8 +8,8 @@ import Api from '@/api' import { sysTemps } from '@/utils/option.js' -import zhCN from '@/locales/zh-CN/header.js' -import enUS from '@/locales/en-US/header.js' +import zhCN from '@/locales/zh-CN/model.js' +import enUS from '@/locales/en-US/model.js' import mainsubtable from '@/assets/img/mainsubtable.jpg' import treepage from '@/assets/img/treepage.jpg' @@ -104,15 +104,15 @@ if (!is(fromJS(this.props.menulist), fromJS(this.state.menulist))) { notification.warning({ top: 92, - message: this.state.dict['header.menu.presave'], + message: this.state.dict['model.menu.presave'], duration: 5 }) } else if (menu.type === 'close') { confirm({ - title: this.state.dict['header.menu.close'].replace('@M', menu.card.text), + title: this.state.dict['model.menu.close'].replace('@M', menu.card.text), content: '', - okText: this.state.dict['header.confirm'], - cancelText: this.state.dict['header.cancel'], + okText: this.state.dict['model.confirm'], + cancelText: this.state.dict['model.cancel'], onOk() { let param = { func: 'sPC_MainMenu_Del', @@ -200,7 +200,7 @@ if (_Template.length === 0) { notification.warning({ top: 92, - message: this.state.dict['header.menu.template.empty'], + message: this.state.dict['model.menu.template.empty'], duration: 5 }) @@ -250,7 +250,7 @@ if (!is(fromJS(this.props.menulist), fromJS(this.state.menulist))) { notification.warning({ top: 92, - message: this.state.dict['header.menu.presave'], + message: this.state.dict['model.menu.presave'], duration: 5 }) return @@ -288,7 +288,7 @@ if (!is(fromJS(this.props.menulist), fromJS(this.state.menulist))) { notification.warning({ top: 92, - message: this.state.dict['header.menu.presave'], + message: this.state.dict['model.menu.presave'], duration: 5 }) return @@ -334,10 +334,10 @@ param.secretkey = Utils.encrypt(param.LText, param.timestamp) // md5瀵嗛挜 confirm({ - title: this.state.dict['header.menu.resetorder'], + title: this.state.dict['model.menu.resetorder'], content: '', - okText: this.state.dict['header.confirm'], - cancelText: this.state.dict['header.cancel'], + okText: this.state.dict['model.confirm'], + cancelText: this.state.dict['model.cancel'], onOk() { return Api.getSystemConfig(param).then(res => { if (res.status) { @@ -366,7 +366,7 @@ if (this.refs.trawmenu.state.targetKeys.length === 0) { notification.warning({ top: 92, - message: this.state.dict['header.menu.thawmenu.select'], + message: this.state.dict['form.required.select'] + this.state.dict['model.menu'], duration: 5 }) } else { @@ -748,6 +748,7 @@ } render () { + const { dict } = this.state return ( <div className="third-edit-box"> {!this.state.tabview ? @@ -787,14 +788,14 @@ <Icon type="plus" /> </div> <div className="menu-btn"> - <Button type="primary" onClick={() => {this.handleSubBtn('thaw')}}>{this.state.dict['header.thawmenu']}</Button> - <Button type="primary" onClick={() => {this.handleSubBtn('confirm')}}>{this.state.dict['header.confirm']}</Button> - <Button onClick={() => {this.handleSubBtn('close')}}>{this.state.dict['header.close']}</Button> + <Button type="primary" onClick={() => {this.handleSubBtn('thaw')}}>{dict['model.thaw'] + dict['model.menu']}</Button> + <Button type="primary" onClick={() => {this.handleSubBtn('confirm')}}>{dict['model.confirm']}</Button> + <Button onClick={() => {this.handleSubBtn('close')}}>{dict['model.close']}</Button> </div> {this.state.tabview === 'template' ? <div className="editboard"> <div className="workplace"> - <Button className="top-btn mk-yellow" onClick={this.exittabview}>{this.state.dict['header.cancel']}</Button> + <Button className="top-btn mk-yellow" onClick={this.exittabview}>{dict['model.cancel']}</Button> {this.state.tabview === 'template' && <Tabs defaultActiveKey="1"> <TabPane tab="绯荤粺妯℃澘" key="1"> <Row> @@ -902,9 +903,9 @@ <Preview cancel={this.cancelPrePicture} preview={this.state.preview} template={this.state.pretemplate} confirm={this.useTemplate}/> {/* 瑙e喕鑿滃崟妯℃�佹 */} <Modal - title={this.state.dict['header.thawmenu']} - okText={this.state.dict['header.confirm']} - cancelText={this.state.dict['header.cancel']} + title={dict['model.thaw'] + dict['model.menu']} + okText={dict['model.confirm']} + cancelText={dict['model.cancel']} visible={this.state.thawMvisible} onOk={this.thawMemuSubmit} confirmLoading={this.state.confirmLoading} @@ -916,9 +917,9 @@ </Modal> {/* 娣诲姞绯荤粺鑿滃崟 */} <Modal - title={this.state.sysMenu && this.state.sysMenu.isSystem ? this.state.dict['header.menu.tadd'] : this.state.dict['header.menu.tupdate']} - okText={this.state.dict['header.confirm']} - cancelText={this.state.dict['header.cancel']} + title={this.state.sysMenu && this.state.sysMenu.isSystem ? dict['model.add'] + dict['model.menu'] : dict['model.update'] + dict['model.menu']} + okText={dict['model.confirm']} + cancelText={dict['model.cancel']} visible={this.state.handleMVisible} onOk={this.memuSubmit} confirmLoading={this.state.confirmLoading} @@ -927,7 +928,7 @@ > <MenuForm menu={this.state.sysMenu} - dict={this.state.dict} + dict={dict} wrappedComponentRef={(inst) => this.menuFormRef = inst} /> </Modal> -- Gitblit v1.8.0