| | |
| | | userName: sessionStorage.getItem('CloudUserName'), |
| | | avatar: Utils.getrealurl(sessionStorage.getItem('CloudAvatar')), |
| | | logo: sessionStorage.getItem('CloudLogo') || MainLogo, |
| | | subLang: sessionStorage.getItem('subLangList') !== null, |
| | | visible: false, |
| | | loading: false |
| | | } |
| | | |
| | | logout = () => { |
| | | // 退出登录 |
| | | let _this = this |
| | | let that = this |
| | | confirm({ |
| | | title: '您确定要退出吗?', |
| | | content: '', |
| | | onOk() { |
| | | sessionStorage.clear() |
| | | _this.props.history.replace('/login') |
| | | that.props.history.replace('/login') |
| | | window.location.reload() |
| | | }, |
| | | onCancel() {} |
| | |
| | | trdItem.OpenType = trdItem.PageParam.OpenType |
| | | } catch (e) { |
| | | trdItem.PageParam = {OpenType: 'newtab'} |
| | | } |
| | | if (trdItem.PageParam.Template === 'RolePermission' || trdItem.PageParam.Template === 'NewPage') { |
| | | trdItem.PageParam.backend = 'level1' |
| | | } |
| | | |
| | | if (trdItem.type === 'CustomPage' && window.GLOB.memberLevel < 20) { // 会员等级大于等于20时,有编辑权限 |
| | |
| | | |
| | | render () { |
| | | const { mainMenu, editLevel } = this.props |
| | | const { menulist, visible, loading, logo, subLang } = this.state |
| | | const { menulist, visible, loading, logo } = this.state |
| | | |
| | | return ( |
| | | <header className={'sys-header-container ant-menu-dark ' + (['level2', 'level3'].includes(editLevel) ? 'mask' : '')} id="main-header-container"> |
| | |
| | | 编辑 |
| | | </Button> |
| | | </div> : null} |
| | | {window.GLOB.systemType !== 'production' && subLang ? <div className="entrance"> |
| | | {window.GLOB.systemType !== 'production' && sessionStorage.getItem('lang') !== 'zh-CN' ? <div className="entrance"> |
| | | <div className="icon"><PlusOutlined /></div> |
| | | <div className="title">菜单转换</div> |
| | | <div className="detail">可选择母语系统的菜单,快速转换到当前语言。打印模板请在HS下复制后,在此处选择指定模板进行语言转换。</div> |