| | |
| | | return |
| | | } |
| | | if (value.PageParam.OpenType === 'menu') { |
| | | console.log(value) |
| | | this.props.modifyMainMenu(value) |
| | | } else { |
| | | window.open('#/' + value.PageParam.linkUrl + '/') |
| | |
| | | } |
| | | |
| | | changeEditState = (state) => { |
| | | const { menulist } = this.state |
| | | |
| | | if (!state) { // 退出编辑,页面刷新 |
| | | window.location.reload() |
| | | return |
| | | } |
| | | |
| | | // 修改编辑状态 |
| | | let UserID = sessionStorage.getItem('CloudUserID') |
| | | let LoginUID = sessionStorage.getItem('CloudLoginUID') |
| | |
| | | _userName = sessionStorage.getItem('CloudUserName') |
| | | } |
| | | |
| | | if (window.GLOB.systemType === 'official' && state) { |
| | | this.props.resetEditLevel('level4') |
| | | this.props.modifyMainMenu({ |
| | | MenuID: 'systemManageView' |
| | | }) |
| | | |
| | | this.setState({ |
| | | userName: _userName, |
| | | avatar: _avatar |
| | | }) |
| | | this.props.resetEditState(state) |
| | | |
| | | return |
| | | } else if (window.GLOB.systemType === 'official' && !state) { |
| | | this.props.resetEditLevel(false) |
| | | this.props.modifyMainMenu(menulist[0] || '') |
| | | |
| | | this.setState({ |
| | | userName: _userName, |
| | | avatar: _avatar |
| | | }) |
| | | this.props.resetEditState(state) |
| | | |
| | | return |
| | | } |
| | | |
| | | this.setState({ |
| | | menulist: null, |
| | | userName: _userName, |
| | |
| | | this.props.resetEditState(state) |
| | | } |
| | | |
| | | if (state && this.props.sysRoles.length === 0 && this.props.permFuncField.length === 0) { |
| | | if (state && this.props.sysRoles.length === 0 && this.props.permFuncField.length === 0 && window.GLOB.systemType !== 'official') { |
| | | Api.getSystemConfig({func: 'sPC_Get_Roles_sModular'}).then(res => { |
| | | if (res.status) { |
| | | let _permFuncField = [] |
| | |
| | | _avatar = Utils.getrealurl(res.icon) // 头像 |
| | | } |
| | | |
| | | if (window.GLOB.systemType === 'official') { |
| | | this.props.resetEditLevel('level4') |
| | | this.props.modifyMainMenu({ |
| | | MenuID: 'systemManageView' |
| | | }) |
| | | |
| | | this.setState({ |
| | | loginVisible: false, |
| | | loginLoading: false, |
| | | userName: res.UserName, |
| | | avatar: _avatar |
| | | }) |
| | | this.props.resetEditState(true) |
| | | |
| | | return |
| | | } |
| | | |
| | | this.setState({ |
| | | menulist: null, |
| | | loginVisible: false, |
| | |
| | | * @description 退出管理界面菜单 |
| | | */ |
| | | exitManage = () => { |
| | | if (window.GLOB.systemType === 'official') { // 正式系统版本升级后,页面刷新 |
| | | window.location.reload() |
| | | return |
| | | } |
| | | |
| | | this.props.resetEditState(true) |
| | | this.props.resetEditLevel(false) |
| | | this.reload() |