| | |
| | | import React, {Component} from 'react' |
| | | import { connect } from 'react-redux' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Menu, Popover, Modal, notification } from 'antd' |
| | | import { EditOutlined, PlusOutlined, SettingOutlined } from '@ant-design/icons' |
| | | import moment from 'moment' |
| | | |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | import { resetEditLevel } from '@/store/action' |
| | | import Utils from '@/utils/utils.js' |
| | | import Api from '@/api' |
| | | import MKEmitter from '@/utils/events.js' |
| | |
| | | } |
| | | _param = window.btoa(window.encodeURIComponent(JSON.stringify(_param))) |
| | | window.open(`#/menudesign/${_param}`) |
| | | } else if (['CommonTable', 'TreePage', 'CalendarPage'].includes(cell.type)) { |
| | | } else if (['CommonTable', 'TreePage'].includes(cell.type)) { |
| | | sessionStorage.setItem('menuTree', JSON.stringify(this.props.menuTree)) |
| | | let _param = window.btoa(window.encodeURIComponent(JSON.stringify(cell))) |
| | | |
| | |
| | | this.setState({ |
| | | loading: true |
| | | }) |
| | | Api.getSystemConfig(param).then(res => { |
| | | Api.getCloudConfig(param).then(res => { |
| | | if (res.status) { |
| | | this.setState({ |
| | | loading: false, |
| | |
| | | loading: true |
| | | }) |
| | | |
| | | Api.getSystemConfig(param).then(response => { |
| | | Api.getCloudConfig(param).then(response => { |
| | | if (response.status) { |
| | | this.setState({ |
| | | loading: false, |
| | |
| | | menulist={this.state.editMenu.children} |
| | | supMenuList={mainMenu.children} |
| | | supMenu={this.state.editMenu} |
| | | menuTree={this.props.menuTree} |
| | | exitEdit={this.exitEdit} |
| | | /> : null |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | const mapStateToProps = (state) => { |
| | | return { |
| | | mainMenu: state.mainMenu, |
| | | menuTree: state.menuTree, |
| | | editLevel: state.editLevel |
| | | } |
| | | } |
| | | |
| | | const mapDispatchToProps = (dispatch) => { |
| | | return { |
| | | resetEditLevel: (level) => dispatch(resetEditLevel(level)) |
| | | } |
| | | } |
| | | |
| | | export default connect(mapStateToProps, mapDispatchToProps)(Sidemenu) |
| | | export default Sidemenu |