king
2021-09-17 c95918fb0fffb61b1117fbf4cd429e291b9594d0
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)