import { inject, observer } from 'mobx-react'; import { WeaTop, WeaRightMenu, WeaLocaleProvider, } from 'ecCom'; const getLabel = WeaLocaleProvider.getLabel; import { Loading, } from '../../public/learn'; import RadioGroup from './RadioGroup'; import Table from './Table'; import Resize from './Resize'; @inject('hrmVacationBalanceReportCopy') @observer class Top extends React.Component { constructor(props) { super(props); } componentDidMount() { this.props.hrmVacationBalanceReportCopy.getRightMenu(); } getButtons = (topButtons) => { const { hrmVacationBalanceReportCopy } = this.props, { isNoAccountShow, clickIcon, chainCall, tableHeihgt } = hrmVacationBalanceReportCopy; const style = { padding: 6, border: '1px solid #D9D9D9', cursor: 'pointer' }; if (isNoAccountShow) Object.assign(style, { color: '#2DB7F5' }); const icon = isNoAccountShow ? clickIcon(chainCall)} /> : clickIcon(chainCall)} /> topButtons.unshift(icon); return topButtons; } renderContent = (height) => { return (
) } render() { const { hrmVacationBalanceReportCopy: store, } = this.props, { topButtons, dropMenuDatas, topComponentStaticProps, table, radioGroup, setDomRef } = store, { loading } = table, { height } = radioGroup; return ( setDomRef(dom, 'top')} title={getLabel('505250', "员工假期余额")} loading={loading} buttons={this.getButtons(topButtons)} dropMenuDatas={dropMenuDatas} {...topComponentStaticProps} > {this.renderContent(height)} ) } } export default Top