| | |
| | | MKEmitter.emit('modifyTabs', menu, 'plus') |
| | | } |
| | | |
| | | componentDidMount () { |
| | | window.addEventListener('storage', (e) => { |
| | | if (e.key !== 'menuUpdate') return |
| | | this.reload() |
| | | }) |
| | | } |
| | | |
| | | UNSAFE_componentWillReceiveProps (nextProps) { |
| | | if (!is(fromJS(this.props.mainMenu), fromJS(nextProps.mainMenu)) && nextProps.mainMenu && nextProps.mainMenu.MenuID === 'systemManageView') { |
| | | this.enterManageView() |
| | |
| | | if (!res) return |
| | | |
| | | if (res.status) { |
| | | if (MenuType !== 'billPrint') { // 基本信息改变时,通知菜单列表更新 |
| | | let ori = this.state.oriConfig |
| | | if (config.MenuName !== ori.MenuName || config.MenuNo !== ori.MenuNo || config.parentId !== ori.parentId) { |
| | | localStorage.setItem('menuUpdate', new Date().getTime()) |
| | | } |
| | | } |
| | | config.open_edition = res.open_edition || '' |
| | | this.setState({ |
| | | config, |