import { inject, observer, } from 'mobx-react'; import { toJS } from 'mobx'; import { WeaEchart, WeaLocaleProvider } from 'ecCom'; import { Tabs } from 'antd'; const TabPane = Tabs.TabPane; const getLabel = WeaLocaleProvider.getLabel; import Query from './Query'; @inject('hrmUsedemand') @observer export default class TabsWp extends React.Component { constructor(props) { super(props); } componentDidMount() { // this.props.hrmUsedemand.getTabsDatas(); } componentDidUpdate() { const { hrmUsedemand } = this.props, { tabs } = hrmUsedemand, { key } = tabs; this[`echart${key}`] && this[`echart${key}`].paint(); } componentWillUnmount() { this.props.hrmUsedemand.resetTabs(); } setRef = (ref, alias) => { const { hrmUsedemand } = this.props, { setRef } = hrmUsedemand; this[alias] = ref; setRef({ ref, alias, type: 'tabs', }); } render() { const { hrmUsedemand } = this.props, { tabs, tabsCallback, } = hrmUsedemand, { charts, key, } = tabs; return (