| | |
| | | if (sessionStorage.getItem('isEditState') === 'true') { // 编辑状态时,获取一级菜单,增加参数debug |
| | | _param.debug = 'Y' |
| | | } |
| | | if (options.sysType !== 'cloud' && window.GLOB.systemType !== 'official') { |
| | | if (options.sysType !== 'cloud' && window.GLOB.systemType !== 'production') { |
| | | _param.linkurl = window.GLOB.linkurl |
| | | } |
| | | |
| | |
| | | // 获取主菜单参数 |
| | | let promiseMenu = new Promise(resolve => { |
| | | let _param = {func: 'sPC_Get_MainMenu', systemType: options.sysType} |
| | | if (options.sysType !== 'cloud' && window.GLOB.systemType !== 'official') { |
| | | if (options.sysType !== 'cloud' && window.GLOB.systemType !== 'production') { |
| | | _param.linkurl = window.GLOB.linkurl |
| | | } |
| | | |
| | |
| | | _userName = sessionStorage.getItem('CloudUserName') |
| | | } |
| | | |
| | | if (window.GLOB.systemType === 'official' && state) { |
| | | if (window.GLOB.systemType === 'production' && state) { |
| | | this.props.resetEditLevel('HS') |
| | | this.props.modifyMainMenu({ |
| | | MenuID: 'systemManageView' |
| | |
| | | this.props.resetEditState(state) |
| | | |
| | | return |
| | | } else if (window.GLOB.systemType === 'official' && !state) { |
| | | } else if (window.GLOB.systemType === 'production' && !state) { |
| | | this.props.resetEditLevel(false) |
| | | this.props.modifyMainMenu(menulist[0] || '') |
| | | |
| | |
| | | this.props.resetEditState(state) |
| | | } |
| | | |
| | | if (state && this.props.sysRoles.length === 0 && this.props.permFuncField.length === 0 && window.GLOB.systemType !== 'official') { |
| | | if (state && this.props.sysRoles.length === 0 && this.props.permFuncField.length === 0 && window.GLOB.systemType !== 'production') { |
| | | Api.getSystemConfig({func: 'sPC_Get_Roles_sModular'}).then(res => { |
| | | if (res.status) { |
| | | let _permFuncField = [] |
| | |
| | | _avatar = Utils.getrealurl(res.icon) // 头像 |
| | | } |
| | | |
| | | if (window.GLOB.systemType === 'official') { |
| | | if (window.GLOB.systemType === 'production') { |
| | | this.props.resetEditLevel('HS') |
| | | this.props.modifyMainMenu({ |
| | | MenuID: 'systemManageView' |
| | |
| | | * @description 退出管理界面菜单 |
| | | */ |
| | | exitManage = () => { |
| | | if (window.GLOB.systemType === 'official') { // 正式系统版本升级后,页面刷新 |
| | | if (window.GLOB.systemType === 'production') { // 正式系统版本升级后,页面刷新 |
| | | window.location.reload() |
| | | return |
| | | } |
| | |
| | | return !is(fromJS(this.props), fromJS(nextProps)) || !is(fromJS(this.state), fromJS(nextState)) |
| | | } |
| | | |
| | | gotoDoc = () => { |
| | | if (options.sysType === 'local' && window.GLOB.mainSystemApi) { |
| | | let ssodomain = window.GLOB.mainSystemApi.replace('/webapi/dostars', '') |
| | | let url = `${ssodomain}/doc/index.html#?appkey=${window.GLOB.appkey}&LoginUID=${sessionStorage.getItem('LoginUID')}` |
| | | window.open(url) |
| | | } else if (options.sysType === 'SSO' || options.sysType === 'cloud') { |
| | | window.open(`${window.location.href.replace(/\/index.html(.*)|\/#(.*)/ig, '')}/doc/index.html#?appkey=${window.GLOB.appkey}&LoginUID=${sessionStorage.getItem('LoginUID')}`) |
| | | } |
| | | } |
| | | |
| | | render () { |
| | | const { thdMenuList, searchkey } = this.state |
| | | |
| | |
| | | <Menu.Item className="header-subSystem" key={'sub' + index} onClick={() => {this.changeSystem(system)}}> {system.AppName} </Menu.Item> |
| | | ))} |
| | | </Menu.SubMenu> : null} */} |
| | | <Menu.Item key="2" onClick={this.logout}>{this.state.dict['main.logout']}</Menu.Item> |
| | | <Menu.Item key="2" onClick={this.gotoDoc}>{this.state.dict['main.doc']}</Menu.Item> |
| | | <Menu.Item key="3" onClick={this.logout}>{this.state.dict['main.logout']}</Menu.Item> |
| | | </Menu> |
| | | ) |
| | | |
| | |
| | | {this.props.editLevel === 'HS' ? <Button className="level4-close" type="primary" onClick={this.exitManage}>退出</Button> : null} |
| | | {/* 进入编辑按钮 */} |
| | | {this.props.editState && !this.props.editLevel ? <Icon onClick={this.enterEdit} className="edit-check" type="edit" /> : null} |
| | | {/* {this.props.editState && !this.props.editLevel && options.sysType === 'local' && window.GLOB.systemType !== 'official' ? |
| | | {/* {this.props.editState && !this.props.editLevel && options.sysType === 'local' && window.GLOB.systemType !== 'production' ? |
| | | <a href="#/mobmanage" target="_blank" className="mobile" type="edit"> 应用管理 <Icon type="arrow-right" /></a> : null |
| | | } */} |
| | | {/* 编辑菜单 */} |