| | |
| | | import { is, fromJS } from 'immutable' |
| | | import { DndProvider } from 'react-dnd' |
| | | import HTML5Backend from 'react-dnd-html5-backend' |
| | | import { notification, Modal, Button, Spin } from 'antd' |
| | | import { notification, Modal, Spin } from 'antd' |
| | | import moment from 'moment' |
| | | |
| | | import TransferForm from '@/templates/zshare/basetransferform' |
| | |
| | | }) |
| | | } |
| | | |
| | | deleteMemu = () => { |
| | | deleteMemu = (item) => { |
| | | let _this = this |
| | | confirm({ |
| | | title: this.state.dict['model.menu.close'].replace('@M', this.state.editMenu.MenuName), |
| | | title: this.state.dict['model.menu.close'].replace('@M', item.MenuName), |
| | | content: '', |
| | | okText: this.state.dict['model.confirm'], |
| | | cancelText: this.state.dict['model.cancel'], |
| | | onOk() { |
| | | let param = { |
| | | func: 'sPC_MainMenu_Del', |
| | | MenuID: _this.state.editMenu.MenuID |
| | | MenuID: item.MenuID |
| | | } |
| | | return Api.getSystemConfig(param).then(res => { |
| | | if (res.status) { |
| | | _this.setState({ |
| | | editMvisible: false, |
| | | editMenu: null, |
| | | }) |
| | | _this.props.reload() |
| | | } else { |
| | | notification.warning({ |
| | |
| | | confirm({ |
| | | title: this.state.dict['model.menu.resetorder'], |
| | | content: '', |
| | | okText: this.state.dict['model.confirm'], |
| | | cancelText: this.state.dict['model.cancel'], |
| | | onOk() { |
| | | return Api.getSystemConfig(param).then(res => { |
| | | if (res.status) { |
| | |
| | | list={this.props.menulist} |
| | | handlePreviewList={this.handlePreviewList} |
| | | handleMenu={this.editMenuModal} |
| | | deleteMemu={this.deleteMemu} |
| | | handleButton={this.handleButton} |
| | | /> |
| | | </DndProvider>} |
| | | {/* 新建菜单模态框 */} |
| | | <Modal |
| | | title={dict['model.add'] + dict['model.menu']} |
| | | okText={dict['model.confirm']} |
| | | cancelText={dict['model.cancel']} |
| | | visible={this.state.addMvisible} |
| | | onOk={this.addMemuSubmit} |
| | | confirmLoading={this.state.confirmLoading} |
| | |
| | | {/* 解除冻结菜单模态框 */} |
| | | <Modal |
| | | title={dict['model.thaw'] + dict['model.menu']} |
| | | okText={dict['model.confirm']} |
| | | cancelText={dict['model.cancel']} |
| | | visible={this.state.thawMvisible} |
| | | width={600} |
| | | onOk={this.thawMemuSubmit} |
| | | confirmLoading={this.state.confirmLoading} |
| | | onCancel={this.thawMemuCancel} |
| | | destroyOnClose |
| | | > |
| | | {!this.state.thawmenulist && <Spin style={{marginLeft: 'calc(50% - 22px)', marginTop: '70px', marginBottom: '70px'}} size="large" />} |
| | | {this.state.thawmenulist && <TransferForm ref="trawmenu" dict={dict} menulist={this.state.thawmenulist}/>} |
| | | {this.state.thawmenulist && <TransferForm ref="trawmenu" menulist={this.state.thawmenulist}/>} |
| | | </Modal> |
| | | {/* 编辑菜单模态框 */} |
| | | <Modal |
| | | title={dict['model.edit'] + dict['model.menu']} |
| | | visible={this.state.editMvisible} |
| | | footer={[ |
| | | <Button key="cancel" onClick={this.editMemuCancel}>{dict['model.cancel']}</Button>, |
| | | <Button key="confirm" type="primary" onClick={this.editMemuSubmit} loading={this.state.confirmLoading}>{dict['model.confirm']}</Button>, |
| | | <Button key="delete" type="danger" onClick={this.deleteMemu}>{dict['model.delete']}</Button> |
| | | ]} |
| | | onOk={this.editMemuSubmit} |
| | | confirmLoading={this.state.confirmLoading} |
| | | onCancel={this.editMemuCancel} |
| | | destroyOnClose |
| | | > |