king
2020-02-25 0c86e5e2eaf907dfcb63aea13e6efac3ccc52cce
src/components/header/index.jsx
@@ -4,7 +4,7 @@
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,
@@ -320,6 +320,26 @@
    // 进入编辑状态
    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 = () => {
    // 退出编辑状态
@@ -378,7 +398,7 @@
        </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' : ''}>
@@ -386,7 +406,13 @@
              </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" />}
        {/* 编辑菜单 */}