10.16 增加审批单跳转中间页
This commit is contained in:
53
src/pages/LoadingPage/MiddleLoading/CommonApproval.tsx
Normal file
53
src/pages/LoadingPage/MiddleLoading/CommonApproval.tsx
Normal file
@ -0,0 +1,53 @@
|
||||
import React, { useEffect } from 'react';
|
||||
import { message, Spin } from 'antd';
|
||||
import { getURLInformation, isEmpty } from '@/utils/CommonUtils';
|
||||
import { history } from 'umi';
|
||||
|
||||
const approvalMap = {
|
||||
'019': '/ExamineAndApprove/Announcement',//公告
|
||||
'021': '/ExamineAndApprove/Publicity',//候选人公示
|
||||
'081': '/ExamineAndApprove/ChangeTheAnnouncement',//变更公告
|
||||
'083': '/ExamineAndApprove/InvitationLetter',//邀请函
|
||||
'084': '/ExamineAndApprove/ExternalReference',//重新评审
|
||||
'085': '/ExamineAndApprove/FailureAnnouncement',//失败公告
|
||||
}
|
||||
const Loading: React.FC<{}> = () => {
|
||||
/**
|
||||
* 传阅审批单跳转中转页
|
||||
*/
|
||||
|
||||
useEffect(() => {
|
||||
//获取必要参数
|
||||
//招标采购中心公告id
|
||||
const id: any = getURLInformation('id') === null ? '' : getURLInformation('id');
|
||||
//菜单类型
|
||||
const type: any = getURLInformation('type') === null ? '' : getURLInformation('type');
|
||||
if (isEmpty(type)) {
|
||||
message.error('缺少必要参数,请重试');
|
||||
} else {
|
||||
let params = {}
|
||||
isEmpty(id) ? null : params['id'] = id;
|
||||
if (Object.prototype.hasOwnProperty.call(approvalMap, type)) {
|
||||
history.push({ pathname: approvalMap[type], query: { ...params } });
|
||||
} else {
|
||||
message.error('参数错误,请联系管理员');
|
||||
}
|
||||
}
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div
|
||||
style={{
|
||||
textAlign: 'center',
|
||||
height: '100%',
|
||||
background: 'rgba(0,0,0,.05)',
|
||||
position: 'relative',
|
||||
}}
|
||||
>
|
||||
<div style={{ position: 'absolute', left: '50%', top: '48%' }}>
|
||||
<Spin tip="Loading..." />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
export default Loading;
|
Reference in New Issue
Block a user