| | |
| | | import antdEnUS from 'antd/es/locale/en_US' |
| | | import antdZhCN from 'antd/es/locale/zh_CN' |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | import { modifyCustomMenu, initPermission } from '@/store/action' |
| | | import { modifyCustomMenu } from '@/store/action' |
| | | |
| | | import './index.scss' |
| | | |
| | |
| | | closeView = () => { |
| | | const { oriConfig, config } = this.state |
| | | |
| | | if (!config) { |
| | | window.close() |
| | | return |
| | | } |
| | | |
| | | let _config = fromJS(config).toJS() |
| | | delete _config.fstMenuList |
| | | delete _config.permFuncField |
| | | delete _config.sysRoles |
| | | delete _config.tableFields |
| | | |
| | | if (!is(fromJS(oriConfig), fromJS(_config))) { |
| | |
| | | |
| | | let _config = fromJS(config).toJS() |
| | | delete _config.fstMenuList |
| | | delete _config.permFuncField |
| | | delete _config.sysRoles |
| | | delete _config.tableFields |
| | | |
| | | let param = { |
| | |
| | | _permFuncField = _permFuncField.sort() |
| | | } |
| | | |
| | | let config = {...this.state.config, sysRoles: _sysRoles, permFuncField: _permFuncField} |
| | | |
| | | this.setState({config}) |
| | | this.props.modifyCustomMenu(config) |
| | | sessionStorage.setItem('sysRoles', JSON.stringify(_sysRoles)) |
| | | sessionStorage.setItem('permFuncField', JSON.stringify(_permFuncField)) |
| | | } |
| | | }) |
| | | } |
| | |
| | | |
| | | const mapDispatchToProps = (dispatch) => { |
| | | return { |
| | | modifyCustomMenu: (customMenu) => dispatch(modifyCustomMenu(customMenu)), |
| | | initPermission: (sysRoles, permFuncField) => dispatch(initPermission(sysRoles, permFuncField)) |
| | | modifyCustomMenu: (customMenu) => dispatch(modifyCustomMenu(customMenu)) |
| | | } |
| | | } |
| | | |