| | |
| | | import {modifyTabview, resetEditLevel} from '@/store/action' |
| | | import zhCN from '@/locales/zh-CN/header.js' |
| | | import enUS from '@/locales/en-US/header.js' |
| | | import Utils from '@/utils/utils.js' |
| | | import Api from '@/api' |
| | | import './index.scss' |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | enterManageView = () => { |
| | | let menulist = [{ |
| | | MenuID: Utils.getuuid(), |
| | | text: '配置', |
| | | PageParam: {Icon: 'folder'}, |
| | | children: [{ |
| | | src: '', |
| | | PageParam: {OpenType: 'newtab', Template: 'ManageTable'}, |
| | | type: 'ManageTable', |
| | | MenuID: '1581067625930haged11ieaivpavv77k', |
| | | MenuNo: 'sDatasM', |
| | | MenuName: '数据字典', |
| | | text: '数据字典' |
| | | }] |
| | | }] |
| | | this.setState({ |
| | | subMenulist: menulist, |
| | | rootSubmenuKeys: menulist.map(item => item.MenuID), |
| | | openKeys: this.props.collapse ? [] : [menulist[0].MenuID] |
| | | }) |
| | | } |
| | | |
| | | changemenu(e) { |
| | | if (this.props.editState) { |
| | | if (this.props.editState && this.props.editLevel !== 'level4') { |
| | | e.preventDefault() |
| | | return |
| | | } |
| | |
| | | } |
| | | |
| | | UNSAFE_componentWillReceiveProps (nextProps) { |
| | | if (!is(fromJS(this.props.mainMenu), fromJS(nextProps.mainMenu))) { |
| | | if (nextProps.mainMenu && nextProps.mainMenu.MenuID === 'systemManageView') { |
| | | this.enterManageView() |
| | | } else if (!is(fromJS(this.props.mainMenu), fromJS(nextProps.mainMenu))) { |
| | | // 主菜单切换,请求2、3级菜单数据 |
| | | this.loadsubmenu(nextProps.mainMenu) |
| | | } else if (nextProps.collapse && this.props.collapse !== nextProps.collapse) { |