king
2020-04-14 d5e92a5383860b5fcd449507028b84bddf3a41f2
2020-04-14
5个文件已修改
1个文件已添加
97 ■■■■■ 已修改文件
public/options.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/options.text 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/header/index.jsx 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/sidemenu/config.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/sidemenu/index.jsx 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/index.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/options.js
@@ -3,6 +3,7 @@
  appId: '201912040924165801464FF1788654BC5AC73',
  appkey: '20191106103859640976D6E924E464D029CF0',
  mainSystemApi: 'http://cloud.mk9h.cn/webapi/dostars',
  systemType: 'test',
  platTitle: '',
  platName: '',
  favicon: '',
public/options.text
New file
@@ -0,0 +1,18 @@
service       -- 服务名
appId         -- 云端生成的应用ID
appkey        -- 云端生成的应用密钥
mainSystemApi -- sso系统的接口路径,注:业务系统需要填写,且值为通用接口的完整路径
systemType    -- 业务系统使用此参数,判断系统为测试或正式(test、official),正式系统开发权限只有系统升级
platTitle     -- 系统标题栏标题
platName      -- 系统名称
favicon       -- 系统标题栏图标
loginlogo     -- 登录页logo
mainlogo      -- 主页logo
bgImage       -- 登录页背景图
copyRight     -- 公司版权及名称等信息
ICP           -- icp备案信息
lineColor     -- 分割线颜色
webSite       -- 公司网址
doclogo       -- 文档管理logo
style         -- 页面风格
filter        -- 页面滤镜,值为'true'时,页面显示为黑白色
src/components/header/index.jsx
@@ -146,6 +146,7 @@
      return
    }
    if (value.PageParam.OpenType === 'menu') {
      console.log(value)
      this.props.modifyMainMenu(value)
    } else {
      window.open('#/' + value.PageParam.linkUrl + '/')
@@ -300,6 +301,13 @@
  }
  changeEditState = (state) => {
    const { menulist } = this.state
    if (!state) { // 退出编辑,页面刷新
      window.location.reload()
      return
    }
    // 修改编辑状态
    let UserID = sessionStorage.getItem('CloudUserID')
    let LoginUID = sessionStorage.getItem('CloudLoginUID')
@@ -323,6 +331,32 @@
        _userName = sessionStorage.getItem('CloudUserName')
      }
      if (window.GLOB.systemType === 'official' && state) {
        this.props.resetEditLevel('level4')
        this.props.modifyMainMenu({
          MenuID: 'systemManageView'
        })
        this.setState({
          userName: _userName,
          avatar: _avatar
        })
        this.props.resetEditState(state)
        return
      } else if (window.GLOB.systemType === 'official' && !state) {
        this.props.resetEditLevel(false)
        this.props.modifyMainMenu(menulist[0] || '')
        this.setState({
          userName: _userName,
          avatar: _avatar
        })
        this.props.resetEditState(state)
        return
      }
      this.setState({
        menulist: null,
        userName: _userName,
@@ -333,7 +367,7 @@
      this.props.resetEditState(state)
    }
    if (state && this.props.sysRoles.length === 0 && this.props.permFuncField.length === 0) {
    if (state && this.props.sysRoles.length === 0 && this.props.permFuncField.length === 0 && window.GLOB.systemType !== 'official') {
      Api.getSystemConfig({func: 'sPC_Get_Roles_sModular'}).then(res => {
        if (res.status) {
          let _permFuncField = []
@@ -384,6 +418,23 @@
            _avatar = Utils.getrealurl(res.icon) // 头像
          }
          if (window.GLOB.systemType === 'official') {
            this.props.resetEditLevel('level4')
            this.props.modifyMainMenu({
              MenuID: 'systemManageView'
            })
            this.setState({
              loginVisible: false,
              loginLoading: false,
              userName: res.UserName,
              avatar: _avatar
            })
            this.props.resetEditState(true)
            return
          }
          this.setState({
            menulist: null,
            loginVisible: false,
@@ -428,6 +479,11 @@
   * @description 退出管理界面菜单
   */
  exitManage = () => {
    if (window.GLOB.systemType === 'official') { // 正式系统版本升级后,页面刷新
      window.location.reload()
      return
    }
    this.props.resetEditState(true)
    this.props.resetEditLevel(false)
    this.reload()
src/components/sidemenu/config.js
@@ -30,6 +30,7 @@
      text: '传输号查询'
    }, {
      src: '',
      systems: ['official'],
      PageParam: {OpenType: 'newtab', Template: 'VerupTable'},
      type: 'VerupTable',
      MenuID: '1583979633842550imkchl4qt4qppsiv',
src/components/sidemenu/index.jsx
@@ -173,9 +173,17 @@
  enterManageView = (type) => {
    let menulist = SySMenuList[type]
    menulist.forEach(menu => {
      menu.children = menu.children.filter(item => !item.systems || item.systems.includes(options.systemType))
    })
    if (window.GLOB.systemType === 'official') {
      menulist.forEach(menu => {
        menu.children = menu.children.filter(item => item.systems && item.systems.includes(window.GLOB.systemType))
      })
      menulist = menulist.filter(menu => menu.children.length > 0)
    } else {
      menulist.forEach(menu => {
        menu.children = menu.children.filter(item => !item.systems || item.systems.includes(options.systemType))
      })
    }
    this.setState({
      subMenulist: menulist,
src/index.js
@@ -4,6 +4,7 @@
import {Provider} from 'react-redux'
import store from '@/store'
import * as serviceWorker from './serviceWorker'
import options from '@/store/options.js'
import '@/assets/css/main.scss'
import '@/assets/css/action.scss'
import '@/assets/css/minkeicon.css'
@@ -24,6 +25,10 @@
window.GLOB = window.GLOB || {}
if (!(options.systemType === 'local' && window.GLOB.systemType === 'official')) {
  window.GLOB.systemType = 'test'
}
let _systemMsg = localStorage.getItem(window.location.href.split('#')[0] + 'system')
if (_systemMsg) {