| | |
| | | } from '@/store/action' |
| | | import Api from '@/api' |
| | | import options from '@/store/options.js' |
| | | import zhCN from '@/locales/zh-CN/header.js' |
| | | import enUS from '@/locales/en-US/header.js' |
| | | import zhCN from '@/locales/zh-CN/main.js' |
| | | import enUS from '@/locales/en-US/main.js' |
| | | import Utils from '@/utils/utils.js' |
| | | import avatar from '@/assets/img/avatar.jpg' |
| | | import Resetpwd from './resetpwd' |
| | |
| | | }) |
| | | notification.success({ |
| | | top: 92, |
| | | message: this.state.dict['header.password.resetsuccess'], |
| | | message: this.state.dict['main.password.resetsuccess'], |
| | | duration: 2 |
| | | }) |
| | | } else { |
| | |
| | | // 退出登录 |
| | | let _this = this |
| | | confirm({ |
| | | title: this.state.dict['header.logout.hint'], |
| | | title: this.state.dict['main.logout.hint'], |
| | | content: '', |
| | | okText: this.state.dict['header.confirm'], |
| | | cancelText: this.state.dict['header.cancel'], |
| | | okText: this.state.dict['main.confirm'], |
| | | cancelText: this.state.dict['main.cancel'], |
| | | onOk() { |
| | | sessionStorage.clear() |
| | | _this.props.logout() |
| | |
| | | const menu = ( |
| | | <Menu overlayclassname="header-dropdown"> |
| | | {this.props.debug && <Menu.Item key="0"> |
| | | {this.state.dict['header.edit']} |
| | | {this.state.dict['main.edit']} |
| | | <Switch size="small" className="edit-switch" disabled={!!this.props.editLevel} checked={this.props.editState} onChange={this.changeEditState} /> |
| | | </Menu.Item>} |
| | | {!this.props.editState ? <Menu.Item key="1" onClick={this.changePassword}>{this.state.dict['header.password']}</Menu.Item> : null} |
| | | {!this.props.editState ? <Menu.Item key="1" onClick={this.changePassword}>{this.state.dict['main.password']}</Menu.Item> : null} |
| | | {/* {this.state.systems.length > 0 ? <Menu.SubMenu title="切换系统"> |
| | | {this.state.systems.map((system, index) => ( |
| | | <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['header.logout']}</Menu.Item> |
| | | <Menu.Item key="2" onClick={this.logout}>{this.state.dict['main.logout']}</Menu.Item> |
| | | </Menu> |
| | | ) |
| | | |
| | |
| | | } |
| | | {/* 修改密码 */} |
| | | <Modal |
| | | title={this.state.dict['header.password']} |
| | | okText={this.state.dict['header.confirm']} |
| | | cancelText={this.state.dict['header.cancel']} |
| | | title={this.state.dict['main.password']} |
| | | okText={this.state.dict['main.confirm']} |
| | | cancelText={this.state.dict['main.cancel']} |
| | | visible={this.state.visible} |
| | | onOk={this.resetPwdSubmit} |
| | | confirmLoading={this.state.confirmLoading} |
| | |
| | | </Modal> |
| | | {/* 编辑状态登录 */} |
| | | <Modal |
| | | title={this.state.dict['header.login.develop']} |
| | | okText={this.state.dict['header.confirm']} |
| | | cancelText={this.state.dict['header.cancel']} |
| | | title={this.state.dict['main.login.develop']} |
| | | okText={this.state.dict['main.confirm']} |
| | | cancelText={this.state.dict['main.cancel']} |
| | | visible={this.state.loginVisible} |
| | | onOk={this.loginSubmit} |
| | | width={'430px'} |