king
2020-03-18 cb4c8706eb48183ac8875d92d4a950ad6b6675a2
src/components/sidemenu/index.jsx
@@ -4,11 +4,12 @@
import {connect} from 'react-redux'
import { is, fromJS } from 'immutable'
import { Menu, Icon, notification } from 'antd'
import asyncComponent from '@/utils/asyncComponent'
import {modifyTabview, resetEditLevel} from '@/store/action'
import { SySMenuList } from './config.js'
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'
@@ -168,82 +169,9 @@
    }
  }
  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: '数据字典'
      }, {
        src: '',
        PageParam: {OpenType: 'newtab', Template: 'ManageTable'},
        type: 'ManageTable',
        MenuID: '1581734956310scks442ul2d955g9tu5',
        MenuNo: 'sVersionM',
        MenuName: '传输号管理',
        text: '传输号管理'
      }, {
        src: '',
        PageParam: {OpenType: 'newtab', Template: 'ManageTable'},
        type: 'ManageTable',
        MenuID: '1583991994144ndddg0bhh0is6shi0v1',
        MenuNo: 'sVersionQueryM',
        MenuName: '传输号查询',
        text: '传输号查询'
      }, {
        src: '',
        PageParam: {OpenType: 'newtab', Template: 'ManageTable'},
        type: 'ManageTable',
        MenuID: '1583979633842550imkchl4qt4qppsiv',
        MenuNo: 'sVersionMUpgrade',
        MenuName: '版本升级',
        text: '版本升级'
      }, {
        src: '',
        PageParam: {OpenType: 'newtab', Template: 'ManageTable'},
        type: 'ManageTable',
        MenuID: '1578900109100np8aqd0a77q3na46oas',
        MenuNo: 'sPrintTemplateM',
        MenuName: '打印模板',
        text: '打印模板'
      }]
    }, {
      MenuID: Utils.getuuid(),
      text: '接口',
      PageParam: {Icon: 'folder'},
      children: [{
        src: '',
        PageParam: {OpenType: 'newtab', Template: 'ManageTable'},
        type: 'ManageTable',
        MenuID: '1582771068837vsv54a089lgp45migbg',
        MenuNo: 'KUNTitleM',
        MenuName: '接口主数据',
        text: '接口主数据'
      }, {
        src: '',
        PageParam: {OpenType: 'newtab', Template: 'ManageTable'},
        type: 'ManageTable',
        MenuID: '1582777675954ifu05upurs465omoth7',
        MenuNo: 'KUNMainM',
        MenuName: '查询接口',
        text: '查询接口'
      }, {
        src: '',
        PageParam: {OpenType: 'newtab', Template: 'ManageTable'},
        type: 'ManageTable',
        MenuID: '158294809668898cklbv6c5bou8e1fpu',
        MenuNo: 'KUNMainMOut_advanced',
        MenuName: '高阶查询',
        text: '高阶查询'
      }]
    }]
  enterManageView = (type) => {
    let menulist = SySMenuList[type]
    this.setState({
      subMenulist: menulist,
      rootSubmenuKeys: menulist.map(item => item.MenuID),
@@ -279,7 +207,7 @@
  UNSAFE_componentWillReceiveProps (nextProps) {
    if (!is(fromJS(this.props.mainMenu), fromJS(nextProps.mainMenu)) && nextProps.mainMenu && nextProps.mainMenu.MenuID === 'systemManageView') {
      this.enterManageView()
      this.enterManageView(nextProps.mainMenu.MenuID)
    } else if (!is(fromJS(this.props.mainMenu), fromJS(nextProps.mainMenu))) {
      // 主菜单切换,请求2、3级菜单数据
      this.loadsubmenu(nextProps.mainMenu)