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