import Add from './add' import { inject, observer} from 'mobx-react'; import {WeaAlertPage} from 'ecCom'; import {i18n} from '../../public/i18n'; @inject('hrmAdd') @observer class Main extends React.Component { constructor(props) { super(props); } componentDidMount() { const { hrmAdd } = this.props; const departmentid = this.props.location.query.departmentid || ''; hrmAdd.departmentid = departmentid; hrmAdd.checkRight(); } render() { const { hrmAdd } = this.props; const {verified, hasRight} = hrmAdd; if(window.location.href.indexOf("/spa/hrm/index_mobx.html")>-1){ document.title= i18n.module.createResource(); } if (verified && hasRight) { return } if (verified && !hasRight) { return (
{i18n.message.authFailed()}
) } return (
) } } export default Main;