| | |
| | | import antdEnUS from 'antd/es/locale/en_US' |
| | | import antdZhCN from 'antd/es/locale/zh_CN' |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | import { modifyCustomMenu } from '@/store/action' |
| | | |
| | | import './index.scss' |
| | | |
| | |
| | | _permFuncField = _permFuncField.sort() |
| | | } |
| | | |
| | | this.setState({ |
| | | config: {...this.state.config, sysRoles: _sysRoles, permFuncField: _permFuncField} |
| | | }) |
| | | let config = {...this.state.config, sysRoles: _sysRoles, permFuncField: _permFuncField} |
| | | |
| | | this.setState({config}) |
| | | this.props.modifyCustomMenu(config) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | initMenuList = (msg) => { |
| | | this.setState({ |
| | | config: {...this.state.config, ...msg} |
| | | }) |
| | | let config = {...this.state.config, ...msg} |
| | | |
| | | this.setState({config}) |
| | | this.props.modifyCustomMenu(config) |
| | | } |
| | | |
| | | editCard = (element) => { |
| | |
| | | this.setState({ |
| | | config: config |
| | | }) |
| | | |
| | | this.props.modifyCustomMenu(config) |
| | | } |
| | | |
| | | /** |
| | |
| | | config.tableFields = fields ? fields : tableFields |
| | | |
| | | this.setState({ |
| | | config: config, |
| | | tableFields: fields ? fields : tableFields |
| | | tableFields: fields ? fields : tableFields, |
| | | config |
| | | }) |
| | | } |
| | | |
| | | |
| | | this.props.modifyCustomMenu(config) |
| | | } |
| | | |
| | | render () { |
| | | const { activeKey, dict, MenuId, config } = this.state |
| | |
| | | return {} |
| | | } |
| | | |
| | | const mapDispatchToProps = () => { |
| | | return {} |
| | | const mapDispatchToProps = (dispatch) => { |
| | | return { |
| | | modifyCustomMenu: (customMenu) => dispatch(modifyCustomMenu(customMenu)) |
| | | } |
| | | } |
| | | |
| | | export default connect(mapStateToProps, mapDispatchToProps)(MenuDesign) |