From d5e92a5383860b5fcd449507028b84bddf3a41f2 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 14 四月 2020 17:32:52 +0800 Subject: [PATCH] 2020-04-14 --- src/components/header/index.jsx | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 57 insertions(+), 1 deletions(-) diff --git a/src/components/header/index.jsx b/src/components/header/index.jsx index 761bfd3..0ddce70 100644 --- a/src/components/header/index.jsx +++ b/src/components/header/index.jsx @@ -146,6 +146,7 @@ return } if (value.PageParam.OpenType === 'menu') { + console.log(value) this.props.modifyMainMenu(value) } else { window.open('#/' + value.PageParam.linkUrl + '/') @@ -300,6 +301,13 @@ } changeEditState = (state) => { + const { menulist } = this.state + + if (!state) { // 閫�鍑虹紪杈戯紝椤甸潰鍒锋柊 + window.location.reload() + return + } + // 淇敼缂栬緫鐘舵�� let UserID = sessionStorage.getItem('CloudUserID') let LoginUID = sessionStorage.getItem('CloudLoginUID') @@ -323,6 +331,32 @@ _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, @@ -333,7 +367,7 @@ 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 = [] @@ -384,6 +418,23 @@ _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, @@ -428,6 +479,11 @@ * @description 閫�鍑虹鐞嗙晫闈㈣彍鍗� */ exitManage = () => { + if (window.GLOB.systemType === 'official') { // 姝e紡绯荤粺鐗堟湰鍗囩骇鍚庯紝椤甸潰鍒锋柊 + window.location.reload() + return + } + this.props.resetEditState(true) this.props.resetEditLevel(false) this.reload() -- Gitblit v1.8.0