11.15 工作台跳转会议室预约角色校验
This commit is contained in:
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