king
2021-09-17 c95918fb0fffb61b1117fbf4cd429e291b9594d0
2021-09-17
22个文件已修改
793 ■■■■ 已修改文件
src/components/header/index.jsx 46 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/sidemenu/index.jsx 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/tabview/index.jsx 195 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/store/action-type.js 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/store/action.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/store/reducer.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/cardItem/index.jsx 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/table-card/index.jsx 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/carousel/cardItem/index.jsx 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/carousel/data-card/index.jsx 83 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/carousel/prop-card/index.jsx 82 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/chart/antv-pie/index.jsx 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/form/normal-form/index.jsx 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/form/tab-form/index.jsx 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/share/normalTable/index.jsx 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/formtab/index.jsx 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/actionList/tabbutton/index.jsx 37 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/normalTable/index.jsx 40 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/option.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/design/header/index.jsx 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/design/index.scss 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/design/sidemenu/index.jsx 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/header/index.jsx
@@ -10,7 +10,6 @@
  toggleCollapse,
  modifyMenuTree,
  modifyMainMenu,
  modifyTabview,
  initActionPermission,
  initMenuPermission,
  logout
@@ -221,21 +220,12 @@
    
    Promise.all([roledefer, menudefer]).then(response => {
      if (response[1]) {
        let tabs = fromJS(this.props.tabviews).toJS()
        let menu = fromJS(response[1]).toJS()
        if (this.state.navBar === 'topmenu' && this.state.menuType !== 'menu_board_navigation') {
          menu.selected = true
          this.props.modifyTabview([menu])
          MKEmitter.emit('modifyTabs', menu, 'replace')
        } else {
          tabs = tabs.map(tab => {
            tab.selected = false
            return tab
          })
          menu.selected = true
          tabs.push(menu)
          this.props.modifyTabview(tabs)
          MKEmitter.emit('modifyTabs', menu, 'plus')
        }
      }
    })
@@ -384,10 +374,6 @@
      sessionStorage.setItem('dataM', sessionStorage.getItem('cloudDataM'))
      sessionStorage.setItem('isEditState', 'true')
      this.props.modifyMenuTree([])
      this.props.modifyMainMenu(null)
      this.props.modifyTabview([])
      this.props.history.replace('/design')
    }
  }
@@ -412,10 +398,6 @@
          sessionStorage.setItem('isEditState', 'true')
          this.setSystemFuncs()
          this.props.modifyMenuTree([])
          this.props.modifyMainMenu(null)
          this.props.modifyTabview([])
          this.props.history.replace('/design')
        } else {
@@ -632,27 +614,11 @@
      if (menu.OpenType === 'newpage' || menu.OpenType === 'NewPage') { // NewPage为打开外部页面地址,newpage为打开系统菜单
        window.open(menu.src)
      } else if (menu.OpenType === 'blank') {
        menu.selected = true
        this.props.modifyTabview([menu])
        MKEmitter.emit('modifyTabs', menu, 'replace')
      } else if (this.state.navBar === 'topmenu' && this.state.menuType !== 'menu_board_navigation') {
        menu.selected = true
        this.props.modifyTabview([menu])
        MKEmitter.emit('modifyTabs', menu, 'replace')
      } else {
        let tabs = fromJS(this.props.tabviews).toJS()
        tabs = tabs.filter(tab => {
          tab.selected = false
          return tab.MenuID !== menu.MenuID
        })
        if (this.props.tabviews.length > tabs.length) {
          this.props.modifyTabview(fromJS(tabs).toJS())
        }
        this.setState({}, () => {
          menu.selected = true
          tabs.push(menu)
          this.props.modifyTabview(tabs)
        })
        MKEmitter.emit('modifyTabs', menu, 'plus')
      }
  
      if (window.GLOB.systemType === 'production') {
@@ -890,7 +856,6 @@
const mapStateToProps = (state) => {
  return {
    tabviews: state.tabviews,
    collapse: state.collapse,
    menuTree: state.menuTree,
    mainMenu: state.mainMenu,
@@ -901,7 +866,6 @@
const mapDispatchToProps = (dispatch) => {
  return {
    toggleCollapse: (collapse) => dispatch(toggleCollapse(collapse)),
    modifyTabview: (tabviews) => dispatch(modifyTabview(tabviews)),
    modifyMenuTree: (menuTree) => dispatch(modifyMenuTree(menuTree)),
    modifyMainMenu: (mainMenu) => dispatch(modifyMainMenu(mainMenu)),
    initActionPermission: (permAction) => dispatch(initActionPermission(permAction)),
src/components/sidemenu/index.jsx
@@ -4,7 +4,6 @@
import { is, fromJS } from 'immutable'
import { Menu, Icon } from 'antd'
import { modifyTabview } from '@/store/action'
import MKEmitter from '@/utils/events.js'
import zhCN from '@/locales/zh-CN/main.js'
import enUS from '@/locales/en-US/main.js'
@@ -55,24 +54,9 @@
    if (menu.OpenType === 'newpage' || menu.OpenType === 'NewPage') {
      window.open(menu.src)
    } else if (menu.OpenType === 'blank') {
      menu.selected = true
      this.props.modifyTabview([menu])
      MKEmitter.emit('modifyTabs', menu, 'replace')
    } else {
      let tabs = fromJS(this.props.tabviews).toJS()
      tabs = tabs.filter(tab => {
        tab.selected = false
        return tab.MenuID !== menu.MenuID
      })
      if (this.props.tabviews.length > tabs.length) {
        this.props.modifyTabview(fromJS(tabs).toJS())
      }
      this.setState({}, () => {
        menu.selected = true
        tabs.push(menu)
        this.props.modifyTabview(tabs)
      })
      MKEmitter.emit('modifyTabs', menu, 'plus')
    }
    if (window.GLOB.systemType === 'production') {
@@ -144,7 +128,6 @@
const mapStateToProps = (state) => {
  return {
    tabviews: state.tabviews,
    collapse: state.collapse,
    isiframe: state.isiframe,
    mainMenu: state.mainMenu,
@@ -153,9 +136,7 @@
}
const mapDispatchToProps = (dispatch) => {
  return {
    modifyTabview: (tabviews) => dispatch(modifyTabview(tabviews)),
  }
  return {}
}
export default connect(mapStateToProps, mapDispatchToProps)(Sidemenu)
src/components/tabview/index.jsx
@@ -1,12 +1,12 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import {connect} from 'react-redux'
import { is, fromJS } from 'immutable'
import { fromJS } from 'immutable'
import {Tabs, Icon, BackTop, notification} from 'antd'
import moment from 'moment'
import 'moment/locale/zh-cn'
import { modifyTabview, toggleIsiframe, initActionPermission } from '@/store/action'
import { toggleIsiframe, initActionPermission } from '@/store/action'
import asyncComponent from '@/utils/asyncLoadComponent'
import NotFount from '@/components/404'
import options from '@/store/options.js'
@@ -38,49 +38,21 @@
class TabViews extends Component {
  static propTpyes = {
    collapse: PropTypes.bool,
    tabviews: PropTypes.array // 标签页数组
    collapse: PropTypes.bool
  }
  state = {
    activeId: '',
    // tabviews: [{
    //   MenuID: 'home_page_id',
    //   MenuName: '首页',
    //   selected: true,
    //   type: 'Home'
    // }], // 标签集
    tabviews: null, // 标签集
    iFrameHeight: 0,
    dict: sessionStorage.getItem('lang') !== 'en-US' ? mzhCN : menUS,
  }
  // 关闭tab页,重新选择显示页
  handleTabview = (e, menu, index) => {
    e.stopPropagation()
    let tabs = fromJS(this.state.tabviews).toJS()
    tabs = tabs.filter(tab => {
      return tab.MenuID !== menu.MenuID
    })
    if (menu.selected && tabs[index - 1]) {
      tabs[index - 1].selected = true
      this.setState({
        activeId: tabs[index - 1].MenuID || ''
      })
      if (this.props.isiframe) {
        this.props.toggleIsiframe(false)
      }
    }
    this.props.modifyTabview(tabs)
  }
  // 关闭tab页,重新选择显示页
  closeTabView = (id) => {
    let tabs = fromJS(this.state.tabviews).toJS()
    let index = 0
    let index = -1
    tabs = tabs.filter((tab, i) => {
      if (tab.MenuID === id) {
        index = i
@@ -90,18 +62,28 @@
      }
    })
    
    if (tabs[index - 1]) {
      tabs[index - 1].selected = true
    if (index > -1) {
      let activeId = ''
      if (index > 0) {
        activeId = tabs[index - 1].MenuID || ''
      } else if (tabs[index]) {
        activeId = tabs[index].MenuID || ''
      }
      this.setState({
        activeId: tabs[index - 1].MenuID || ''
        activeId,
        tabviews: tabs
      })
      if (this.props.isiframe) {
        this.props.toggleIsiframe(false)
      }
    }
    this.props.modifyTabview(tabs)
      let node = document.getElementById('root').parentNode.parentNode
      if (node) {
        node.scrollTop = 0
      }
    }
  }
  refreshTabview = (e, menu) => {
@@ -156,47 +138,58 @@
    }
  }
  // modifyTabs = (tab, type) => {
  modifyTabs = (tab, type) => {
    const { tabviews } = this.state
  // }
    if (type === 'plus') {
      if (tabviews.findIndex(item => item.MenuID === tab.MenuID) > -1) {
        let _tabs = tabviews.filter(item => item.MenuID !== tab.MenuID)
        this.setState({
          tabviews: _tabs
        }, () => {
          this.setState({
            tabviews: [..._tabs, tab],
            activeId: tab.MenuID
          })
        })
      } else {
        this.setState({
          tabviews: [...tabviews, tab],
          activeId: tab.MenuID
        })
      }
    } else if (type === 'replace') {
      this.setState({
        tabviews: tab ? [tab] : [],
        activeId: tab ? tab.MenuID : ''
      })
    }
    let node = document.getElementById('root').parentNode.parentNode
    if (node) {
      node.scrollTop = 0
    }
  }
  changeTab = (e, menu) => {
    e.stopPropagation()
    // 窗口切换
    let tabs = fromJS(this.state.tabviews).toJS()
    tabs = tabs.map(tab => {
      tab.selected = false
    let _isiframe = this.props.isiframe
    if (menu.type === 'iframe') {
      _isiframe = true
    } else {
      _isiframe = false
    }
      if (tab.MenuID === menu.MenuID) {
        tab.selected = true
      }
      return tab
    })
    if (menu) {
      let _isiframe = this.props.isiframe
      if (menu.type === 'iframe') {
        _isiframe = true
      } else {
        _isiframe = false
      }
      if (_isiframe !== this.props.isiframe) {
        this.props.toggleIsiframe(_isiframe)
      }
    if (_isiframe !== this.props.isiframe) {
      this.props.toggleIsiframe(_isiframe)
    }
    
    this.setState({
      tabviews: tabs,
      activeId: menu.MenuID || ''
    }, () => {
      if (menu.MenuID) {
        MKEmitter.emit('resetActiveMenu', menu.MenuID)
      }
      MKEmitter.emit('resetActiveMenu', menu.MenuID || '')
    })
    this.props.modifyTabview(tabs)
  }
  selectcomponent = (view) => {
@@ -236,57 +229,31 @@
    } else {
      moment.locale('en')
    }
    this.setState({
      tabviews: this.props.tabviews
    })
    if (sessionStorage.getItem('isEditState') !== 'true') {
      this.setState({
        activeId: 'home_page_id',
        tabviews: [{
          MenuID: 'home_page_id',
          MenuName: '首页',
          type: 'Home'
        }]
      })
    } else {
      this.setState({
        activeId: '',
        tabviews: []
      })
    }
  }
  componentDidMount () {
    if (sessionStorage.getItem('isEditState') !== 'true') {
      let home = {
        MenuID: 'home_page_id',
        MenuName: '首页',
        selected: true,
        type: 'Home'
      }
      this.props.modifyTabview([home])
    }
    // MKEmitter.addListener('modifyTabs', this.modifyTabs)
    MKEmitter.addListener('modifyTabs', this.modifyTabs)
    MKEmitter.addListener('closeTabView', this.closeTabView)
  }
  UNSAFE_componentWillReceiveProps (nextProps) {
    if (nextProps.tabviews && !is(fromJS(this.state.tabviews), fromJS(nextProps.tabviews))) {
      let view = nextProps.tabviews.filter(tab => tab.selected)[0]
      // 窗口在iframe与普通页面切换时,修改左侧菜单栏样式
      let activeId = ''
      if (view) {
        let _isiframe = this.props.isiframe
        if (view.type === 'iframe') {
          _isiframe = true
        } else {
          _isiframe = false
        }
        if (_isiframe !== this.props.isiframe) {
          this.props.toggleIsiframe(_isiframe)
        }
        activeId = view.MenuID
      }
      // 保存修改标签集
      this.setState({
        tabviews: nextProps.tabviews,
        activeId
      })
      let node = document.getElementById('root').parentNode.parentNode
      if (node) {
        node.scrollTop = 0
      }
    }
  }
  /**
@@ -296,7 +263,7 @@
    this.setState = () => {
      return
    }
    // MKEmitter.removeListener('modifyTabs', this.modifyTabs)
    MKEmitter.removeListener('modifyTabs', this.modifyTabs)
    MKEmitter.removeListener('closeTabView', this.closeTabView)
  }
@@ -318,7 +285,7 @@
                          {view.MenuName}
                        </span>
                        {view.type !== 'Home' ?
                          <Icon type="close" onClick={(e) => {this.handleTabview(e, view, index)}}/> : null
                          <Icon type="close" onClick={(e) => {e.stopPropagation();this.closeTabView(view.MenuID)}}/> : null
                        }
                      </span>
                    }
@@ -346,7 +313,6 @@
const mapStateToProps = (state) => {
  return {
    tabviews: state.tabviews,
    collapse: state.collapse,
    isiframe: state.isiframe
  }
@@ -354,7 +320,6 @@
const mapDispatchToProps = (dispatch) => {
  return {
    modifyTabview: (tabviews) => dispatch(modifyTabview(tabviews)),
    initActionPermission: (permAction) => dispatch(initActionPermission(permAction)),
    toggleIsiframe: (isiframe) => dispatch(toggleIsiframe(isiframe))
  }
src/store/action-type.js
@@ -7,9 +7,6 @@
// 展开合并菜单栏
export const Toggle_COLLAPSE = 'Toggle_COLLAPSE'
// 修改导航栏菜单
export const MODIFY_TABVIEW = 'MODIFY_TABVIEW'
// 修改窗口样式,区分iframe与正常页面
export const TOGGLE_ISIFRAME = 'TOGGLE_ISIFRAME'
src/store/action.js
@@ -24,14 +24,6 @@
  }
}
// 修改导航栏菜单
export const modifyTabview = (tabviews) => {
  return {
    type: user.MODIFY_TABVIEW,
    tabviews
  }
}
// 修改窗口样式,区分iframe与正常页面
export const toggleIsiframe = (isiframe) => {
  return {
src/store/reducer.js
@@ -24,7 +24,6 @@
let defaultState = {
  menuTree: null,       // 菜单结构树
  mainMenu: _mainMenu,  // 已选主菜单
  tabviews: [],         // 导航栏
  collapse: _collapse,  // 是否收起侧边栏导航
  isiframe: false,      // 是否为iframe窗口
  editLevel: null,      // 编辑菜单级别,值为level1、level2、level3、HS
@@ -53,12 +52,6 @@
      return {
        ...state,
        mainMenu: action.mainMenu
      }
    case Type.MODIFY_TABVIEW:
    // tab页改变
      return {
        ...state,
        tabviews: action.tabviews
      }
    case Type.TOGGLE_ISIFRAME:
    // 切换是否为iframe状态
@@ -94,7 +87,6 @@
      return {
        menuTree: null,
        mainMenu: null,
        tabviews: [],
        collapse: localStorage.getItem('collapse') === 'true',
        isiframe: false,
        editLevel: null,
src/tabviews/custom/components/card/cardItem/index.jsx
@@ -5,7 +5,6 @@
import { notification } from 'antd'
import asyncComponent from '@/utils/asyncComponent'
import { modifyTabview } from '@/store/action'
import MKEmitter from '@/utils/events.js'
import './index.scss'
@@ -80,21 +79,9 @@
      }
      if (['linkage_navigation', 'linkage', 'menu_board'].includes(window.GLOB.navBar)) {
        this.props.modifyTabview([newtab])
        MKEmitter.emit('modifyTabs', newtab, 'replace')
      } else {
        let tabs = this.props.tabviews.filter((tab, i) => {
          tab.selected = false
          return tab.MenuID !== newtab.MenuID
        })
        if (this.props.tabviews.length > tabs.length) {
          this.props.modifyTabview(fromJS(tabs).toJS())
        }
        this.setState({}, () => {
          tabs.push(newtab)
          this.props.modifyTabview(tabs)
        })
        MKEmitter.emit('modifyTabs', newtab, 'plus')
      }
    } else if (card.setting.click === 'link') {
      let src = card.setting.linkurl
@@ -137,15 +124,12 @@
const mapStateToProps = (state) => {
  return {
    permMenus: state.permMenus,
    tabviews: state.tabviews,
    permMenus: state.permMenus
  }
}
const mapDispatchToProps = (dispatch) => {
  return {
    modifyTabview: (tabviews) => dispatch(modifyTabview(tabviews))
  }
const mapDispatchToProps = () => {
  return {}
}
export default connect(mapStateToProps, mapDispatchToProps)(CardBoxComponent)
src/tabviews/custom/components/card/table-card/index.jsx
@@ -8,7 +8,6 @@
import Utils from '@/utils/utils.js'
import asyncComponent from '@/utils/asyncComponent'
import UtilsDM from '@/utils/utils-datamanage.js'
import { modifyTabview } from '@/store/action'
import MKEmitter from '@/utils/events.js'
import './index.scss'
@@ -333,21 +332,9 @@
      }
      if (['linkage_navigation', 'linkage', 'menu_board'].includes(window.GLOB.navBar)) {
        this.props.modifyTabview([newtab])
        MKEmitter.emit('modifyTabs', newtab, 'replace')
      } else {
        let tabs = this.props.tabviews.filter((tab, i) => {
          tab.selected = false
          return tab.MenuID !== newtab.MenuID
        })
        if (this.props.tabviews.length > tabs.length) {
          this.props.modifyTabview(fromJS(tabs).toJS())
        }
        this.setState({}, () => {
          tabs.push(newtab)
          this.props.modifyTabview(tabs)
        })
        MKEmitter.emit('modifyTabs', newtab, 'plus')
      }
    } else if (card.setting.click === 'link') {
      let src = card.setting.linkurl
@@ -444,14 +431,11 @@
const mapStateToProps = (state) => {
  return {
    permMenus: state.permMenus,
    tabviews: state.tabviews,
  }
}
const mapDispatchToProps = (dispatch) => {
  return {
    modifyTabview: (tabviews) => dispatch(modifyTabview(tabviews))
  }
const mapDispatchToProps = () => {
  return {}
}
export default connect(mapStateToProps, mapDispatchToProps)(TableCard)
src/tabviews/custom/components/carousel/cardItem/index.jsx
@@ -1,10 +1,8 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'
import { is, fromJS } from 'immutable'
import asyncComponent from '@/utils/asyncComponent'
import { modifyTabview } from '@/store/action'
import MKEmitter from '@/utils/events.js'
import './index.scss'
@@ -64,21 +62,9 @@
      }
      if (['linkage_navigation', 'linkage', 'menu_board'].includes(window.GLOB.navBar)) {
        this.props.modifyTabview([newtab])
        MKEmitter.emit('modifyTabs', newtab, 'replace')
      } else {
        let tabs = this.props.tabviews.filter((tab, i) => {
          tab.selected = false
          return tab.MenuID !== newtab.MenuID
        })
        if (this.props.tabviews.length > tabs.length) {
          this.props.modifyTabview(fromJS(tabs).toJS())
        }
        this.setState({}, () => {
          tabs.push(newtab)
          this.props.modifyTabview(tabs)
        })
        MKEmitter.emit('modifyTabs', newtab, 'plus')
      }
    } else if (card.setting.click === 'link') {
      let src = card.setting.linkurl
@@ -114,16 +100,4 @@
  }
}
const mapStateToProps = (state) => {
  return {
    tabviews: state.tabviews,
  }
}
const mapDispatchToProps = (dispatch) => {
  return {
    modifyTabview: (tabviews) => dispatch(modifyTabview(tabviews))
  }
}
export default connect(mapStateToProps, mapDispatchToProps)(CardBoxComponent)
export default CardBoxComponent
src/tabviews/custom/components/carousel/data-card/index.jsx
@@ -1,14 +1,12 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { connect } from 'react-redux'
import { Spin, Empty, notification, Carousel } from 'antd'
import Api from '@/api'
import UtilsDM from '@/utils/utils-datamanage.js'
import MKEmitter from '@/utils/events.js'
import asyncComponent from '@/utils/asyncComponent'
import { modifyTabview } from '@/store/action'
import './index.scss'
const CardItem = asyncComponent(() => import('../cardItem'))
@@ -241,70 +239,6 @@
    }
  }
  openView = (item) => {
    const { card } = this.state
    if (card.setting.click === 'menu') {
      let menu = null
      if (card.setting.menu && card.setting.menu.length > 0) {
        let menu_id = card.setting.menu.slice(-1)[0]
        menu = this.props.permMenus.filter(m => m.MenuID === menu_id)[0] || ''
      }
      if (!menu) {
        notification.warning({
          top: 92,
          message: '菜单已删除或没有访问权限!',
          duration: 5
        })
        return
      }
      let newtab = {
        ...menu,
        selected: true,
        param: {}
      }
      if (card.setting.joint === 'true') {
        newtab.param.$BID = item.$$uuid
      }
      if (['linkage_navigation', 'linkage', 'menu_board'].includes(window.GLOB.navBar)) {
        this.props.modifyTabview([newtab])
      } else {
        let tabs = this.props.tabviews.filter((tab, i) => {
          tab.selected = false
          return tab.MenuID !== newtab.MenuID
        })
        if (this.props.tabviews.length > tabs.length) {
          this.props.modifyTabview(fromJS(tabs).toJS())
        }
        this.setState({}, () => {
          tabs.push(newtab)
          this.props.modifyTabview(tabs)
        })
      }
    } else if (card.setting.click === 'link') {
      let src = card.setting.linkurl
      if (card.setting.joint === 'true') {
        let con = '?'
        if (/\?/ig.test(src)) {
          con = '&'
        }
        src = src + `${con}id=${item.$$uuid}&appkey=${window.GLOB.appkey}&userid=${sessionStorage.getItem('UserID')}&LoginUID=${sessionStorage.getItem('LoginUID') || ''}`
      }
      window.open(src)
    }
  }
  render() {
    const { config, loading, data, card } = this.state
@@ -324,7 +258,7 @@
          autoplaySpeed={config.wrap.speed}
        >
          {data.map((item, index) => (
            <div key={index} onClick={() => {this.openView(item)}}>
            <div key={index}>
              <CardItem card={card} cards={config} data={item}/>
            </div>
          ))}
@@ -335,17 +269,4 @@
  }
}
const mapStateToProps = (state) => {
  return {
    permMenus: state.permMenus,
    tabviews: state.tabviews,
  }
}
const mapDispatchToProps = (dispatch) => {
  return {
    modifyTabview: (tabviews) => dispatch(modifyTabview(tabviews))
  }
}
export default connect(mapStateToProps, mapDispatchToProps)(DataCard)
export default DataCard
src/tabviews/custom/components/carousel/prop-card/index.jsx
@@ -1,14 +1,12 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { connect } from 'react-redux'
import { Spin, notification, Carousel } from 'antd'
import asyncComponent from '@/utils/asyncComponent'
import Api from '@/api'
import UtilsDM from '@/utils/utils-datamanage.js'
import MKEmitter from '@/utils/events.js'
import { modifyTabview } from '@/store/action'
import './index.scss'
const CardItem = asyncComponent(() => import('../cardItem'))
@@ -237,69 +235,6 @@
    }
  }
  openView = (item) => {
    if (item.setting.click === 'menu') {
      let menu = null
      if (item.setting.menu && item.setting.menu.length > 0) {
        let menu_id = item.setting.menu.slice(-1)[0]
        menu = this.props.permMenus.filter(m => m.MenuID === menu_id)[0] || ''
      }
      if (!menu) {
        notification.warning({
          top: 92,
          message: '菜单已删除或没有访问权限!',
          duration: 5
        })
        return
      }
      let newtab = {
        ...menu,
        selected: true,
        param: {}
      }
      if (item.setting.joint === 'true') {
        newtab.param.$BID = item.setting.primaryId
      }
      if (['linkage_navigation', 'linkage', 'menu_board'].includes(window.GLOB.navBar)) {
        this.props.modifyTabview([newtab])
      } else {
        let tabs = this.props.tabviews.filter((tab, i) => {
          tab.selected = false
          return tab.MenuID !== newtab.MenuID
        })
        if (this.props.tabviews.length > tabs.length) {
          this.props.modifyTabview(fromJS(tabs).toJS())
        }
        this.setState({}, () => {
          tabs.push(newtab)
          this.props.modifyTabview(tabs)
        })
      }
    } else if (item.setting.click === 'link') {
      let src = item.setting.linkurl
      if (item.setting.joint === 'true') {
        let con = '?'
        if (/\?/ig.test(src)) {
          con = '&'
        }
        src = src + `${con}id=${item.setting.primaryId}&appkey=${window.GLOB.appkey}&userid=${sessionStorage.getItem('UserID')}&LoginUID=${sessionStorage.getItem('LoginUID') || ''}`
      }
      window.open(src)
    }
  }
  render() {
    const { config, loading, data } = this.state
@@ -319,7 +254,7 @@
          autoplaySpeed={config.wrap.speed}
        >
          {config.subcards.map((item, index) => (
            <div key={index} onClick={() => {this.openView(item)}}>
            <div key={index}>
              <CardItem card={item} cards={config} data={data}/>
            </div>
          ))}
@@ -329,17 +264,4 @@
  }
}
const mapStateToProps = (state) => {
  return {
    permMenus: state.permMenus,
    tabviews: state.tabviews,
  }
}
const mapDispatchToProps = (dispatch) => {
  return {
    modifyTabview: (tabviews) => dispatch(modifyTabview(tabviews))
  }
}
export default connect(mapStateToProps, mapDispatchToProps)(PropCard)
export default PropCard
src/tabviews/custom/components/chart/antv-pie/index.jsx
@@ -9,15 +9,11 @@
import Api from '@/api'
import Utils from '@/utils/utils.js'
import { modifyTabview } from '@/store/action'
import { chartColors } from '@/utils/option.js'
// import asyncComponent from '@/utils/asyncComponent'
import UtilsDM from '@/utils/utils-datamanage.js'
import MKEmitter from '@/utils/events.js'
import NormalHeader from '@/tabviews/custom/components/share/normalheader'
import './index.scss'
// const NormalHeader = asyncComponent(() => import('@/tabviews/custom/components/share/normalheader'))
class PieChart extends Component {
  static propTpyes = {
@@ -970,20 +966,12 @@
              $BID: primaryId
            }
          }
          let tabs = this.props.tabviews.filter(tab => {
            tab.selected = false
            return tab.MenuID !== newtab.MenuID
          })
          if (this.props.tabviews.length > tabs.length) {
            this.props.modifyTabview(fromJS(tabs).toJS())
          if (['linkage_navigation', 'linkage', 'menu_board'].includes(window.GLOB.navBar)) {
            MKEmitter.emit('modifyTabs', newtab, 'replace')
          } else {
            MKEmitter.emit('modifyTabs', newtab, 'plus')
          }
          this.setState({}, () => {
            tabs.push(newtab)
            this.props.modifyTabview(tabs)
          })
        } catch (e) {
          console.warn('菜单打开失败!')
        }
@@ -1026,15 +1014,12 @@
const mapStateToProps = (state) => {
  return {
    tabviews: state.tabviews,
    permMenus: state.permMenus,
  }
}
const mapDispatchToProps = (dispatch) => {
  return {
    modifyTabview: (tabviews) => dispatch(modifyTabview(tabviews))
  }
const mapDispatchToProps = () => {
  return {}
}
export default connect(mapStateToProps, mapDispatchToProps)(PieChart)
src/tabviews/custom/components/form/normal-form/index.jsx
@@ -12,7 +12,6 @@
import MKEmitter from '@/utils/events.js'
import zhCN from '@/locales/zh-CN/main.js'
import enUS from '@/locales/en-US/main.js'
import { modifyTabview } from '@/store/action'
import './index.scss'
const MutilForm = asyncSpinComponent(() => import('@/tabviews/zshare/mutilform'))
@@ -250,19 +249,11 @@
        param: {$BID: id || ''}
      }
      let tabs = this.props.tabviews.filter((tab, i) => {
        tab.selected = false
        return tab.MenuID !== newtab.MenuID
      })
      if (this.props.tabviews.length > tabs.length) {
        this.props.modifyTabview(fromJS(tabs).toJS())
      if (['linkage_navigation', 'linkage', 'menu_board'].includes(window.GLOB.navBar)) {
        MKEmitter.emit('modifyTabs', newtab, 'replace')
      } else {
        MKEmitter.emit('modifyTabs', newtab, 'plus')
      }
      this.setState({}, () => {
        tabs.push(newtab)
        this.props.modifyTabview(tabs)
      })
    }
  }
@@ -404,14 +395,11 @@
const mapStateToProps = (state) => {
  return {
    permMenus: state.permMenus,
    tabviews: state.tabviews,
  }
}
const mapDispatchToProps = (dispatch) => {
  return {
    modifyTabview: (tabviews) => dispatch(modifyTabview(tabviews))
  }
const mapDispatchToProps = () => {
  return {}
}
export default connect(mapStateToProps, mapDispatchToProps)(NormalForm)
src/tabviews/custom/components/form/tab-form/index.jsx
@@ -12,7 +12,6 @@
import MKEmitter from '@/utils/events.js'
import zhCN from '@/locales/zh-CN/main.js'
import enUS from '@/locales/en-US/main.js'
import { modifyTabview } from '@/store/action'
import './index.scss'
const MutilForm = asyncSpinComponent(() => import('@/tabviews/zshare/mutilform'))
@@ -221,19 +220,11 @@
        param: {$BID: id || ''}
      }
      let tabs = this.props.tabviews.filter((tab, i) => {
        tab.selected = false
        return tab.MenuID !== newtab.MenuID
      })
      if (this.props.tabviews.length > tabs.length) {
        this.props.modifyTabview(fromJS(tabs).toJS())
      if (['linkage_navigation', 'linkage', 'menu_board'].includes(window.GLOB.navBar)) {
        MKEmitter.emit('modifyTabs', newtab, 'replace')
      } else {
        MKEmitter.emit('modifyTabs', newtab, 'plus')
      }
      this.setState({}, () => {
        tabs.push(newtab)
        this.props.modifyTabview(tabs)
      })
    }
  }
@@ -349,14 +340,11 @@
const mapStateToProps = (state) => {
  return {
    permMenus: state.permMenus,
    tabviews: state.tabviews,
  }
}
const mapDispatchToProps = (dispatch) => {
  return {
    modifyTabview: (tabviews) => dispatch(modifyTabview(tabviews))
  }
const mapDispatchToProps = () => {
  return {}
}
export default connect(mapStateToProps, mapDispatchToProps)(TabForm)
src/tabviews/custom/components/share/normalTable/index.jsx
@@ -5,7 +5,6 @@
import { is, fromJS } from 'immutable'
import { Table, Typography, Icon, Col, Switch, message } from 'antd'
import { modifyTabview } from '@/store/action'
import asyncComponent from '@/utils/asyncComponent'
import MKEmitter from '@/utils/events.js'
import zhCN from '@/locales/zh-CN/main.js'
@@ -564,7 +563,6 @@
  // 字段透视
  triggerLink = (e, item, record) => {
    const { tabviews } = this.props
    e.stopPropagation()
    let __param = {
@@ -583,21 +581,12 @@
      let tabmenu = item.linkThdMenu
      tabmenu.param = __param
      tabmenu.selected = true
      let tabs = tabviews.filter((tab, i) => {
        tab.selected = false
        return tab.MenuID !== tabmenu.MenuID
      })
      if (tabviews.length > tabs.length) {
        this.props.modifyTabview(fromJS(tabs).toJS())
      if (['linkage_navigation', 'linkage', 'menu_board'].includes(window.GLOB.navBar)) {
        MKEmitter.emit('modifyTabs', tabmenu, 'replace')
      } else {
        MKEmitter.emit('modifyTabs', tabmenu, 'plus')
      }
      this.setState({}, () => {
        tabs.push(tabmenu)
        this.props.modifyTabview(tabs)
      })
    } else if (item.linkurl) {
      let src = item.linkurl
@@ -907,15 +896,12 @@
const mapStateToProps = (state) => {
  return {
    menuType: state.editLevel,
    tabviews: state.tabviews,
    memberLevel: state.memberLevel
  }
}
const mapDispatchToProps = (dispatch) => {
  return {
    modifyTabview: (tabviews) => dispatch(modifyTabview(tabviews))
  }
const mapDispatchToProps = () => {
  return {}
}
export default connect(mapStateToProps, mapDispatchToProps)(NormalTable)
src/tabviews/formtab/index.jsx
@@ -16,7 +16,6 @@
import FormGroup from './formgroup'
import FormAction from './actionList'
import NotFount from '@/components/404'
import { modifyTabview } from '@/store/action'
import './index.scss'
const { TabPane } = Tabs
@@ -507,16 +506,7 @@
        MKEmitter.emit('reloadData', this.props.param.parentId, 'formtab', btn)
      }
      let tabs = this.props.tabviews.filter(tab => {
        tab.selected = false
        if (tab.MenuID === this.props.param.parentId) {
          tab.selected = true
        }
        return tab.MenuID !== this.props.MenuID
      })
      this.props.modifyTabview(tabs)
      MKEmitter.emit('closeTabView', this.props.MenuID)
    } else if (type === 'error' && btn.afterExecError === 'notclose') {
      if (btn.execError === 'refresh') {
        this.loadmaindata()
@@ -525,17 +515,7 @@
      if (btn.execError !== 'never') {
        MKEmitter.emit('reloadData', this.props.param.parentId, 'formtab', btn)
      }
      let tabs = this.props.tabviews.filter(tab => {
        tab.selected = false
        if (tab.MenuID === this.props.param.parentId) {
          tab.selected = true
        }
        return tab.MenuID !== this.props.MenuID
      })
      this.props.modifyTabview(tabs)
      MKEmitter.emit('closeTabView', this.props.MenuID)
    }
  }
@@ -692,15 +672,12 @@
const mapStateToProps = (state) => {
  return {
    menuType: state.editLevel,
    tabviews: state.tabviews,
    permAction: state.permAction
  }
}
const mapDispatchToProps = (dispatch) => {
  return {
    modifyTabview: (tabviews) => dispatch(modifyTabview(tabviews))
  }
const mapDispatchToProps = () => {
  return {}
}
export default connect(mapStateToProps, mapDispatchToProps)(NormalTable)
src/tabviews/zshare/actionList/tabbutton/index.jsx
@@ -4,7 +4,6 @@
import { is, fromJS } from 'immutable'
import { Button, notification, Icon } from 'antd'
import { modifyTabview } from '@/store/action'
import zhCN from '@/locales/zh-CN/main.js'
import enUS from '@/locales/en-US/main.js'
import MKEmitter from '@/utils/events.js'
@@ -78,7 +77,7 @@
   * @description 触发按钮操作
   */
  actionTrigger = (triggerId, record, type) => {
    const { setting, btn, tabviews, MenuID, selectedData } = this.props
    const { setting, btn, selectedData } = this.props
    if (triggerId && btn.uuid !== triggerId) return
@@ -122,7 +121,6 @@
          primaryId: primaryId
        }
      }
    // } else if (btn.tabTemplate === 'ThdMenu') {
    } else {
      let menu = null
@@ -156,32 +154,10 @@
      }
    }
    let index = 0
    let tabs = tabviews.filter((tab, i) => {
      tab.selected = false
      if (tab.MenuID === MenuID) {
        index = i
      }
      return tab.MenuID !== newtab.MenuID
    })
    if (['linkage_navigation', 'linkage', 'menu_board'].includes(window.GLOB.navBar)) {
      this.props.modifyTabview([newtab])
      MKEmitter.emit('modifyTabs', newtab, 'replace')
    } else {
      if (tabviews.length !== tabs.length) {
        this.props.modifyTabview(fromJS(tabs).toJS())
      }
      this.setState({}, () => {
        if (MenuID) {
          tabs.splice(index + 1, 0, newtab)
        } else {
          tabs.push(newtab)
        }
        this.props.modifyTabview(tabs)
      })
      MKEmitter.emit('modifyTabs', newtab, 'plus')
    }
    MKEmitter.emit('openNewTab')
@@ -236,15 +212,12 @@
const mapStateToProps = (state) => {
  return {
    tabviews: state.tabviews,
    permMenus: state.permMenus,
  }
}
const mapDispatchToProps = (dispatch) => {
  return {
    modifyTabview: (tabviews) => dispatch(modifyTabview(tabviews))
  }
const mapDispatchToProps = () => {
  return {}
}
export default connect(mapStateToProps, mapDispatchToProps)(TabButton)
src/tabviews/zshare/normalTable/index.jsx
@@ -5,7 +5,6 @@
import { is, fromJS } from 'immutable'
import { Table, Affix, Typography, Icon } from 'antd'
import { modifyTabview } from '@/store/action'
import asyncComponent from '@/utils/asyncComponent'
import MKEmitter from '@/utils/events.js'
import '@/assets/css/table.scss'
@@ -204,8 +203,6 @@
  // 字段透视
  triggerLink = (e, item, record) => {
    const { tabviews, MenuID } = this.props
    e.stopPropagation()
    let __param = {
@@ -222,33 +219,13 @@
    if (item.linkThdMenu) {
      let tabmenu = item.linkThdMenu
      tabmenu.param = __param
      tabmenu.selected = true
      let index = 0
      let tabs = tabviews.filter((tab, i) => {
        tab.selected = false
        if (tab.MenuID === MenuID) {
          index = i
        }
        return tab.MenuID !== tabmenu.MenuID
      })
      if (tabviews.length > tabs.length) {
        this.props.modifyTabview(fromJS(tabs).toJS())
      if (['linkage_navigation', 'linkage', 'menu_board'].includes(window.GLOB.navBar)) {
        MKEmitter.emit('modifyTabs', tabmenu, 'replace')
      } else {
        MKEmitter.emit('modifyTabs', tabmenu, 'plus')
      }
      this.setState({}, () => {
        if (MenuID) {
          tabs.splice(index + 1, 0, tabmenu)
        } else {
          tabs.push(tabmenu)
        }
        this.props.modifyTabview(tabs)
      })
    } else if (item.linkurl) {
      let src = item.linkurl
@@ -1238,15 +1215,12 @@
const mapStateToProps = (state) => {
  return {
    menuType: state.editLevel,
    tabviews: state.tabviews,
    memberLevel: state.memberLevel
  }
}
const mapDispatchToProps = (dispatch) => {
  return {
    modifyTabview: (tabviews) => dispatch(modifyTabview(tabviews))
  }
const mapDispatchToProps = () => {
  return {}
}
export default connect(mapStateToProps, mapDispatchToProps)(NormalTable)
src/utils/option.js
@@ -803,6 +803,8 @@
    'phone',
    'picture',
    'red-envelope',
    'setting',
    'tool',
    'smile',
    'star',
    'thunderbolt',
src/views/design/header/index.jsx
@@ -8,7 +8,6 @@
import {
  modifyMenuTree,
  modifyMainMenu,
  modifyTabview,
  resetEditLevel,
  logout
} from '@/store/action'
@@ -19,6 +18,7 @@
import Utils from '@/utils/utils.js'
import avatar from '@/assets/img/avatar.jpg'
import MainLogo from '@/assets/img/main-logo.png'
import MKEmitter from '@/utils/events.js'
import './index.scss'
const EditMenu = asyncComponent(() => import('@/templates/menuconfig/editfirstmenu'))
@@ -214,7 +214,8 @@
    this.props.modifyMainMenu(menulist[0] || null)
    this.props.resetEditLevel(false)
    this.props.modifyTabview([])
    MKEmitter.emit('modifyTabs', null, 'replace')
  }
  
  exitEdit = () => {
@@ -300,7 +301,7 @@
  }
  render () {
    const { mainMenu, editLevel, tabviews } = this.props
    const { mainMenu, editLevel } = this.props
    const { menulist } = this.state
    return (
@@ -339,7 +340,7 @@
            </Button>
          </div> : null
        }
        {editLevel === 'HS' && tabviews.length === 0 && options.sysType === 'local' && window.GLOB.systemType === 'production' && this.props.memberLevel >= 20 ?
        {editLevel === 'HS' && options.sysType === 'local' && window.GLOB.systemType === 'production' && this.props.memberLevel >= 20 ?
          <div className="app-prod-entrance entrance">
            <div className="icon"><Icon type="appstore" /></div>
            <div className="title">应用管理</div>
@@ -400,7 +401,6 @@
const mapStateToProps = (state) => {
  return {
    tabviews: state.tabviews,
    menuTree: state.menuTree,
    mainMenu: state.mainMenu,
    editLevel: state.editLevel,
@@ -411,7 +411,6 @@
const mapDispatchToProps = (dispatch) => {
  return {
    modifyTabview: (tabviews) => dispatch(modifyTabview(tabviews)),
    modifyMenuTree: (menuTree) => dispatch(modifyMenuTree(menuTree)),
    modifyMainMenu: (mainMenu) => dispatch(modifyMainMenu(mainMenu)),
    resetEditLevel: (level) => dispatch(resetEditLevel(level)),
src/views/design/index.scss
@@ -3,6 +3,14 @@
  flex: auto;
  min-height: 100%;
}
// .mk-design-view {
//   background-color: rgb(238, 241, 246);
// }
.mk-design-view {
  #mk-tabview-wrap {
    z-index: unset;
    >.content-header {
      >.ant-tabs {
        z-index: 21;
        background: #ffffff;
      }
    }
  }
}
src/views/design/sidemenu/index.jsx
@@ -4,12 +4,13 @@
import { Menu, Icon, notification } from 'antd'
import asyncComponent from '@/utils/asyncComponent'
import { modifyTabview, resetEditLevel, modifyMenuTree, modifyMainMenu } from '@/store/action'
import { resetEditLevel, modifyMenuTree, modifyMainMenu } from '@/store/action'
import { SySMenuList } from './config'
import options from '@/store/options.js'
import zhCN from '@/locales/zh-CN/main.js'
import enUS from '@/locales/en-US/main.js'
import Api from '@/api'
import MKEmitter from '@/utils/events.js'
import './index.scss'
const EditSecMenu = asyncComponent(() => import('@/templates/menuconfig/editsecmenu'))
@@ -82,21 +83,7 @@
      return
    }
    let tabs = fromJS(this.props.tabviews).toJS()
    tabs = tabs.filter(tab => {
      tab.selected = false
      return tab.MenuID !== menu.MenuID
    })
    if (this.props.tabviews.length > tabs.length) {
      this.props.modifyTabview(fromJS(tabs).toJS())
    }
    this.setState({}, () => {
      menu.selected = true
      tabs.push(menu)
      this.props.modifyTabview(tabs)
    })
    MKEmitter.emit('modifyTabs', menu, 'plus')
  }
  UNSAFE_componentWillReceiveProps (nextProps) {
@@ -303,7 +290,6 @@
const mapStateToProps = (state) => {
  return {
    tabviews: state.tabviews,
    mainMenu: state.mainMenu,
    menuTree: state.menuTree,
    memberLevel: state.memberLevel,
@@ -315,7 +301,6 @@
  return {
    modifyMenuTree: (menuTree) => dispatch(modifyMenuTree(menuTree)),
    modifyMainMenu: (mainMenu) => dispatch(modifyMainMenu(mainMenu)),
    modifyTabview: (tabviews) => dispatch(modifyTabview(tabviews)),
    resetEditLevel: (level) => dispatch(resetEditLevel(level))
  }
}