From 423ad01a2acc68c90150b13dcf0f0fdc709b818e Mon Sep 17 00:00:00 2001 From: jl-zhoujl2 Date: Wed, 26 Oct 2022 15:14:14 +0800 Subject: [PATCH] =?UTF-8?q?10.16=20=E5=A2=9E=E5=8A=A0=E5=AE=A1=E6=89=B9?= =?UTF-8?q?=E5=8D=95=E8=B7=B3=E8=BD=AC=E4=B8=AD=E9=97=B4=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/router_transfer.ts | 5 ++ .../MiddleLoading/CommonApproval.tsx | 53 +++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 src/pages/LoadingPage/MiddleLoading/CommonApproval.tsx 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;