king
2020-11-20 6e106eb13ce404d9955d6c9045d21050d3e08294
src/components/header/index.jsx
@@ -193,7 +193,7 @@
          }
          return item
        }),
        systems: result.Systems.filter(sys => sys.LinkUrl1 && sys.AppKey !== window.GLOB.appkey)
        systems: sessionStorage.getItem('isEditState') === 'true' ? [] : result.Systems.filter(sys => sys.LinkUrl1 && sys.AppName && sys.AppKey !== window.GLOB.appkey)
      })
    } else {
      notification.error({
@@ -275,10 +275,10 @@
          })
        }
        resolve({permAction: _permAction})
        resolve(_permAction)
      })
    })
    // 获取主菜单参数
    let promiseMenu = new Promise(resolve => {
      let _param = {func: 'sPC_Get_MainMenu', systemType: options.sysType}
@@ -314,7 +314,7 @@
              }
              return item
            }),
            systems: result.Systems.filter(sys => sys.LinkUrl1 && sys.AppKey !== window.GLOB.appkey)
            systems: result.Systems.filter(sys => sys.LinkUrl1 && sys.AppName && sys.AppKey !== window.GLOB.appkey)
          })
        } else if (result) {
          notification.error({
@@ -333,9 +333,9 @@
      this.props.modifyMainMenu(_mainMenu)
    }
    let _role = await promiseRole
    let permAction = await promiseRole
    this.props.initActionPermission(_role.permAction)
    this.props.initActionPermission(permAction)
  }
  reload = () => {
@@ -547,11 +547,18 @@
  }
  changeSystem = (system) => {
    window.location.href = system.LinkUrl1 + '#/ssologin/' + window.btoa(window.encodeURIComponent(JSON.stringify({
    let href = system.LinkUrl1 + 'index.html#/ssologin/' + window.btoa(window.encodeURIComponent(JSON.stringify({
      UserID: sessionStorage.getItem('UserID'),
      LoginUID: sessionStorage.getItem('LoginUID'),
      User_Name: sessionStorage.getItem('User_Name')
      User_Name: sessionStorage.getItem('User_Name'),
      Full_Name: sessionStorage.getItem('Full_Name'),
      avatar: sessionStorage.getItem('avatar'),
      dataM: system.dataM ? 'true' : '',
      debug: system.debug || '',
      role_id: system.role_id || ''
    })))
    window.open(href)
  }
  dropdownMenuChange = (visible) => {
@@ -677,11 +684,11 @@
          <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="password" onClick={this.changePassword}>{this.state.dict['main.password']}</Menu.Item> : null}
        {/* {this.state.systems.length > 0 ? <Menu.SubMenu title="切换系统">
        {this.state.systems.length > 0 ? <Menu.SubMenu className="header-subSystem-box" 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.SubMenu> : null}
        <Menu.Item key="doc" onClick={this.gotoDoc}>{this.state.dict['main.doc']}</Menu.Item>
        {oriVersion ? <Menu.Item key="verup" onClick={this.verup}>
          <Badge dot={oriVersion !== newVersion}>{this.state.dict['main.verup']}</Badge>