| | |
| | | |
| | | 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' |
| | | |
| | |
| | | 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', |
| | |
| | | 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 |
| | | }) |
| | | |
| | |
| | | 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 |
| | |
| | | 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 |
| | |
| | | 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) { |
| | |
| | | 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 { |
| | |
| | | } |
| | | |
| | | render () { |
| | | const { dict } = this.state |
| | | return ( |
| | | <div className="third-edit-box"> |
| | | {!this.state.tabview ? |
| | |
| | | <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> |
| | |
| | | <Preview cancel={this.cancelPrePicture} preview={this.state.preview} template={this.state.pretemplate} confirm={this.useTemplate}/> |
| | | {/* 解冻菜单模态框 */} |
| | | <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} |
| | |
| | | </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} |
| | |
| | | > |
| | | <MenuForm |
| | | menu={this.state.sysMenu} |
| | | dict={this.state.dict} |
| | | dict={dict} |
| | | wrappedComponentRef={(inst) => this.menuFormRef = inst} |
| | | /> |
| | | </Modal> |