weaver_trunk_cli/pc4mobx/hrmAttendance/components/vacationBalanceReportCopy/index.js

59 lines
1.4 KiB
JavaScript
Raw Normal View History

2023-03-14 09:11:54 +08:00
import React from 'react';
import {
observer,
inject
} from 'mobx-react';
import {
AlertPage,
Loading,
} from '../../public/learn';
2024-12-11 15:32:14 +08:00
import '../../style/report.less';
2023-03-14 09:11:54 +08:00
import Top from './Top';
import Dialog from './Dialog';
2024-12-11 15:32:14 +08:00
@inject('hrmVacationBalanceReportCopy')
2023-03-14 09:11:54 +08:00
@observer
2024-12-11 15:32:14 +08:00
export default class VacationBalanceReportCopy extends React.Component {
2023-03-14 09:11:54 +08:00
constructor(props) {
super(props);
}
componentWillMount() {
2024-12-11 15:32:14 +08:00
this.props.hrmVacationBalanceReportCopy.cwm();
2023-03-14 09:11:54 +08:00
}
componentDidMount() {
2024-12-11 15:32:14 +08:00
this.props.hrmVacationBalanceReportCopy.getPermissionInfo();
2023-03-14 09:11:54 +08:00
}
componentWillReceiveProps(nextProps) {
if (this.props.location.key !== nextProps.location.key) {
2024-12-11 15:32:14 +08:00
this.props.hrmVacationBalanceReportCopy.cwr();
2023-03-14 09:11:54 +08:00
}
}
render() {
const {
2024-12-11 15:32:14 +08:00
hrmVacationBalanceReportCopy,
2023-03-14 09:11:54 +08:00
} = this.props, {
2024-12-11 15:32:14 +08:00
pageAccessPermission,
setDomRef
} = hrmVacationBalanceReportCopy, {
2023-03-14 09:11:54 +08:00
hasRight,
loading
} = pageAccessPermission;
if (!hasRight) {
2024-12-11 15:32:14 +08:00
return loading ? <Loading ecId={`${this && this.props && this.props.ecId || ''}_Loading@dj0ofr`} size='lg'/> : <AlertPage ecId={`${this && this.props && this.props.ecId || ''}_AlertPage@cohqtf`} />
2023-03-14 09:11:54 +08:00
} else {
return (
2024-12-11 15:32:14 +08:00
<div className='report'>
<Top ecId={`${this && this.props && this.props.ecId || ''}_Top@rr33zq`} />
<Dialog ecId={`${this && this.props && this.props.ecId || ''}_Dialog@s464sc`} />
2023-03-14 09:11:54 +08:00
</div>
)
}
}
}