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