import React from 'react' import { inject, observer } from 'mobx-react' import { WeaAlertPage, WeaLocaleProvider } from 'ecCom' import { Spin } from 'antd' import Top from './Top'; const getLabel = WeaLocaleProvider.getLabel; @inject('hrmTimeWageSummary') @observer export default class TimeWageSummary extends React.Component { constructor(props) { super(props); } componentWillMount() { if (window.location.href.indexOf('/spa/hrm/engine.html') > -1) { document.title = getLabel('391166', "时间工资汇总") } } componentWillReceiveProps(nextProps) { if (this.props.location && (this.props.location.key !== nextProps.location.key)) { this.props.hrmTimeWageSummary.refresh(); } } componentDidMount() { this.init(); } init() { const { hrmTimeWageSummary } = this.props, { getAuth, } = hrmTimeWageSummary; getAuth(); } render() { const { hrmTimeWageSummary } = this.props, { main, } = hrmTimeWageSummary, { loading, authorized } = main; if (!authorized) { return (
{loading ?
:
{getLabel(2012, '对不起,您暂时没有权限!')}
}
) } else { return ( ) } } }