11.15 工作台跳转会议室预约角色校验
This commit is contained in:
@ -80,6 +80,11 @@ export default [
|
|||||||
path: '/ChoiceLogin',
|
path: '/ChoiceLogin',
|
||||||
component: './LoadingPage/MiddleLoading/ChoiceLogin',
|
component: './LoadingPage/MiddleLoading/ChoiceLogin',
|
||||||
},
|
},
|
||||||
|
//预约人员跳转中间页
|
||||||
|
{
|
||||||
|
path: '/ToAppointment',
|
||||||
|
component: './LoadingPage/MiddleLoading/ToAppointment',
|
||||||
|
},
|
||||||
//跨工程跳转中间页结束
|
//跨工程跳转中间页结束
|
||||||
{
|
{
|
||||||
name: 'index_1',
|
name: 'index_1',
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import type { ActionType, ProColumns } from '@ant-design/pro-table';
|
import type { ActionType, ProColumns } from '@ant-design/pro-table';
|
||||||
import ProTable from '@ant-design/pro-table';
|
import ProTable from '@ant-design/pro-table';
|
||||||
import { Button, Card, Collapse, Space, Tag } from 'antd';
|
import { Button, Card, Collapse, Result, Space, Tag } from 'antd';
|
||||||
import React, { useEffect, useState } from 'react';
|
import React, { useEffect, useState } from 'react';
|
||||||
import { useRef } from 'react';
|
import { useRef } from 'react';
|
||||||
import MeetingReservation from '@/components/ElecBidEvaluation/MeetingReservation';
|
import MeetingReservation from '@/components/ElecBidEvaluation/MeetingReservation';
|
||||||
@ -118,7 +118,7 @@ const ScreenTable = (props: { record: any, onCellClick: (id: any) => void, refre
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export default () => {
|
export default (props: any) => {
|
||||||
//预约弹窗
|
//预约弹窗
|
||||||
const [modalVisible, setModalVisible] = useState<boolean>(false);
|
const [modalVisible, setModalVisible] = useState<boolean>(false);
|
||||||
//评标场所列表数据
|
//评标场所列表数据
|
||||||
@ -131,6 +131,9 @@ export default () => {
|
|||||||
const [meetData, setMeetData] = useState<any>({});
|
const [meetData, setMeetData] = useState<any>({});
|
||||||
//刷新参数
|
//刷新参数
|
||||||
const [refresh, setRefresh] = useState<number>(0);
|
const [refresh, setRefresh] = useState<number>(0);
|
||||||
|
//跳转参数
|
||||||
|
const isRedirect: boolean | undefined = props.location?.state?.redirect;
|
||||||
|
console.log("isRedirect", isRedirect);
|
||||||
|
|
||||||
//获取评标场所
|
//获取评标场所
|
||||||
const getSiteListData = (key: any) => {
|
const getSiteListData = (key: any) => {
|
||||||
@ -166,11 +169,11 @@ export default () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
getSiteListData("0");
|
(isRedirect && roleCode != "ebtp-appointment") ? null : getSiteListData("0");
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card title={roleCode == "ebtp-appointment" ? "会议室预约情况" : "评标室预约情况"} bodyStyle={{ padding: '16px 0px', height: window.innerHeight - 120, overflowY: 'auto' }}>
|
(isRedirect && roleCode != "ebtp-appointment") ? <Result title="您没有权限访问此页面" /> : <Card title={roleCode == "ebtp-appointment" ? "会议室预约情况" : "评标室预约情况"} bodyStyle={{ padding: '16px 0px', height: window.innerHeight - 120, overflowY: 'auto' }}>
|
||||||
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', padding: '0 36px 16px' }}>
|
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', padding: '0 36px 16px' }}>
|
||||||
<Space>
|
<Space>
|
||||||
{!btnAuthority(["ebtp-appointment", "ebtp-site-admin"]) && <Button key="yuyue" type="primary" onClick={() => createMeet()}>
|
{!btnAuthority(["ebtp-appointment", "ebtp-site-admin"]) && <Button key="yuyue" type="primary" onClick={() => createMeet()}>
|
||||||
|
41
src/pages/LoadingPage/MiddleLoading/ToAppointment.tsx
Normal file
41
src/pages/LoadingPage/MiddleLoading/ToAppointment.tsx
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
import React, { useEffect } from 'react';
|
||||||
|
import { Spin } from 'antd';
|
||||||
|
import { getSessionUserData } from '@/utils/session';
|
||||||
|
import { history } from 'umi';
|
||||||
|
|
||||||
|
const Loading: React.FC<{}> = () => {
|
||||||
|
/**
|
||||||
|
* 预约人员-会议预约跳转中转页
|
||||||
|
*/
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
//获取角色列表
|
||||||
|
const authorityList: any[] = getSessionUserData()?.authorityList;
|
||||||
|
for (let i = 0, length = authorityList.length; i < length; i++) {
|
||||||
|
const item = authorityList[i];
|
||||||
|
if (item.roleCode == "ebtp-appointment") {
|
||||||
|
sessionStorage.setItem('roleAuthority', JSON.stringify([item.roleCode]));//放置权限字
|
||||||
|
sessionStorage.setItem('roleData', JSON.stringify(item));//放置roleData
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
history.replace({ pathname: "/ElecEvaluation/AppointmentManage", state: { redirect: true } });
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
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