| | |
| | | visible: false, // 修改密码模态框 |
| | | dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, |
| | | confirmLoading: false, |
| | | userName: sessionStorage.getItem('User_Name'), |
| | | userName: '', |
| | | fullName: '', |
| | | logourl: window.GLOB.mainlogo, |
| | | appVersion: window.GLOB.appVersion, |
| | | loginVisible: false, |
| | |
| | | UNSAFE_componentWillMount () { |
| | | // 组件加载时,获取菜单数据 |
| | | this.getRolesMenu() |
| | | |
| | | let fullName = sessionStorage.getItem('Full_Name') || '' |
| | | let userName = sessionStorage.getItem('User_Name') || '' |
| | | |
| | | if (fullName.toLowerCase() === userName.toLowerCase()) { |
| | | userName = '' |
| | | } |
| | | |
| | | this.setState({fullName, userName}) |
| | | } |
| | | |
| | | componentDidMount () { |
| | |
| | | <div> |
| | | <img src={this.state.avatar || avatar} alt=""/> |
| | | <span> |
| | | <span className="username">{this.state.userName}</span> <DownOutlined /> |
| | | <span className="username"><span>{this.state.fullName}</span>{this.state.userName ? <span>{this.state.userName}</span> : null}</span> <DownOutlined /> |
| | | </span> |
| | | </div> |
| | | </Dropdown> |