diff --git a/config/router_transfer.ts b/config/router_transfer.ts index 0a255ad..e07348a 100644 --- a/config/router_transfer.ts +++ b/config/router_transfer.ts @@ -70,6 +70,11 @@ export default [ path: '/ToHomePage', component: './LoadingPage/MiddleLoading/ToHomePage', }, + //审批单跳转公共页 + { + path: '/CommonApproval', + component: './LoadingPage/MiddleLoading/CommonApproval', + }, //跨工程跳转中间页结束 { name: 'index_1', diff --git a/src/pages/LoadingPage/MiddleLoading/CommonApproval.tsx b/src/pages/LoadingPage/MiddleLoading/CommonApproval.tsx new file mode 100644 index 0000000..f7e6a98 --- /dev/null +++ b/src/pages/LoadingPage/MiddleLoading/CommonApproval.tsx @@ -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 ( +
+
+ +
+
+ ); +}; +export default Loading;