king
2021-10-14 44fa8b4f4b4c4ae93570b14b9835b2d61552cb95
src/components/header/index.jsx
@@ -38,6 +38,7 @@
    confirmLoading: false,
    userName: sessionStorage.getItem('User_Name'),
    logourl: window.GLOB.mainlogo,
    appVersion: window.GLOB.appVersion,
    loginVisible: false,
    loginLoading: false,
    avatar: Utils.getrealurl(sessionStorage.getItem('avatar')),
@@ -621,7 +622,7 @@
  verup = () => {
    confirm({
      title: '版本升级',
      title: '页面更新',
      content: '重新加载应用信息',
      onOk() {
        return new Promise(resolve => {
@@ -649,10 +650,15 @@
    })
  }
  about = () => {
    Modal.success({
      title: '系统版本v' + this.state.appVersion
    })
  }
  render () {
    const { mainMenu, collapse } = this.props
    const { thdMenuList, searchkey, debug, menulist, navBar, menuType } = this.state
    const { thdMenuList, searchkey, debug, menulist, navBar, menuType, appVersion } = this.state
    const menu = (
      <Menu className="header-dropdown">
@@ -668,8 +674,11 @@
        </Menu.SubMenu> : null}
        <Menu.Item key="doc" onClick={this.gotoDoc}>{this.state.dict['main.doc']}</Menu.Item>
        <Menu.Item key="verup" onClick={this.verup}>
          版本升级
          页面更新
        </Menu.Item>
        {appVersion ? <Menu.Item key="version" onClick={this.about}>
          关于
        </Menu.Item> : null}
        <Menu.Item key="logout" onClick={this.logout}>{this.state.dict['main.logout']}</Menu.Item>
      </Menu>
    )