| | |
| | | import {connect} from 'react-redux' |
| | | import { is, fromJS } from 'immutable' |
| | | import moment from 'moment' |
| | | import {Dropdown, Menu, Icon, Modal, Form, notification, Switch } from 'antd' |
| | | import {Dropdown, Menu, Icon, Modal, Form, notification, Switch, Button } from 'antd' |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | import { |
| | | toggleCollapse, |
| | |
| | | // 进入编辑状态 |
| | | this.props.resetEditLevel('level1') |
| | | } |
| | | |
| | | enterEditManage = () => { |
| | | const { editLevel } = this.props |
| | | |
| | | if (editLevel === 'level4') return |
| | | |
| | | this.props.resetEditLevel('level4') |
| | | this.props.modifyMainMenu({ |
| | | MenuID: 'systemManageView' |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * @description 退出管理界面菜单 |
| | | */ |
| | | exitManage = () => { |
| | | this.props.resetEditState(true) |
| | | this.props.resetEditLevel(false) |
| | | this.reload() |
| | | } |
| | | |
| | | exitEdit = () => { |
| | | // 退出编辑状态 |
| | |
| | | </div> |
| | | {/* 正常菜单 */} |
| | | {this.props.editLevel !== 'level1' && this.state.menulist && |
| | | <ul className="header-menu">{ |
| | | <ul className={'header-menu ' + this.props.editLevel}>{ |
| | | this.state.menulist.map(item => { |
| | | return ( |
| | | <li key={item.MenuID} onClick={() => {this.changeMenu(item)}} className={this.props.selectmenu.MenuID === item.MenuID ? 'active' : ''}> |
| | |
| | | </li> |
| | | ) |
| | | })} |
| | | {this.props.editState && (!this.props.editLevel || this.props.editLevel === 'level4') ? |
| | | <li key="HS" onClick={this.enterEditManage} className={this.props.editLevel === 'level4' ? 'active' : ''}> |
| | | <span>HS</span> |
| | | </li> : null |
| | | } |
| | | </ul>} |
| | | {this.props.editLevel === 'level4' ? <Button className="level4-close" type="primary" onClick={this.exitManage}>退出</Button> : null} |
| | | {/* 进入编辑按钮 */} |
| | | {this.props.editState && !this.props.editLevel && <Icon onClick={this.enterEdit} className="edit-check" type="edit" />} |
| | | {/* 编辑菜单 */} |