2022-03-10 14:24:13 +08:00
|
|
|
|
import { getDefId as getDefById } from '@/pages/Project/ProjectManage/ProjectManager/ProjectDocumentation/service';
|
|
|
|
|
import { getRoomDataById, getSectionDataById } from '@/services/common';
|
|
|
|
|
import { message } from 'antd';
|
|
|
|
|
import { getProTypeCodeByBidMethodDict, getURLInformation, getUrlRelativePath, isEmpty } from './CommonUtils';
|
2021-01-16 11:29:42 +08:00
|
|
|
|
//取session项目id
|
|
|
|
|
export function getProId() {
|
2022-03-10 14:24:13 +08:00
|
|
|
|
if (getSessionProjectData() == null) {
|
2021-01-16 11:29:42 +08:00
|
|
|
|
return null;
|
2022-03-10 14:24:13 +08:00
|
|
|
|
} else {
|
2021-01-16 11:29:42 +08:00
|
|
|
|
return getSessionProjectData().id;
|
2022-03-10 14:24:13 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 获取流程Id(defId)
|
|
|
|
|
* @returns
|
|
|
|
|
* -1- bid_prequalification 公开招标-资格预审
|
|
|
|
|
* -2- bid_qualification 公开招标-资格后审
|
|
|
|
|
* -3- bid_centralized_prequalification 公开招标-集中资格预审
|
|
|
|
|
* -4- bid_centralized_prequalification_bid 公开招标-集中资格预审招标
|
|
|
|
|
* -5- bid_invitation 邀请招标
|
|
|
|
|
* -6- comparison_one_prequalification 公开比选一阶段-资格预审
|
|
|
|
|
* -7- comparison_multi_prequalification 公开比选多阶段-资格预审
|
|
|
|
|
* -8- comparison_one 公开比选一阶段
|
|
|
|
|
* -9- comparison_multi 公开比选多阶段
|
|
|
|
|
* -10- recruit 公开招募 即 单轮
|
|
|
|
|
* -11- recruit_multi 常态化招募 即 多轮
|
|
|
|
|
* -12- negotiation_competitive_public 竞争性谈判-公开参与
|
|
|
|
|
* -13- negotiation_competitive_invite 竞争性谈判-邀请参与
|
|
|
|
|
* -14- negotiation_single 单一来源
|
|
|
|
|
* -15- inquiry 询价
|
|
|
|
|
* -16- auction 内拍
|
|
|
|
|
*/
|
|
|
|
|
//获取流程id
|
|
|
|
|
export function getDefId() {
|
|
|
|
|
let id: any | null = sessionStorage.getItem('defId');
|
|
|
|
|
let defId = JSON.parse(id);
|
|
|
|
|
return defId
|
2021-01-16 11:29:42 +08:00
|
|
|
|
}
|
2022-03-10 14:24:13 +08:00
|
|
|
|
//获取proTypeCode 项目菜单返回用
|
|
|
|
|
export function getProTypeCode() {
|
|
|
|
|
let proTypeCode: any = sessionStorage.getItem('proTypeCode');
|
|
|
|
|
return proTypeCode
|
|
|
|
|
}
|
|
|
|
|
|
2021-01-16 11:29:42 +08:00
|
|
|
|
/**
|
|
|
|
|
* 获取项目名称
|
|
|
|
|
*/
|
2022-03-10 14:24:13 +08:00
|
|
|
|
export function getProName() {
|
|
|
|
|
if (getSessionProjectData() === null) {
|
2021-01-16 11:29:42 +08:00
|
|
|
|
return null;
|
2022-03-10 14:24:13 +08:00
|
|
|
|
} else {
|
2021-01-16 11:29:42 +08:00
|
|
|
|
return getSessionProjectData().projectName;
|
2022-03-10 14:24:13 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
2021-01-16 11:29:42 +08:00
|
|
|
|
/**
|
|
|
|
|
* 获取采购方式
|
|
|
|
|
*/
|
2022-03-10 14:24:13 +08:00
|
|
|
|
export function getProMethod() {
|
|
|
|
|
if (getSessionProjectData() === null) {
|
2021-01-16 11:29:42 +08:00
|
|
|
|
return null;
|
2022-03-10 14:24:13 +08:00
|
|
|
|
} else {
|
2021-01-16 11:29:42 +08:00
|
|
|
|
return getSessionProjectData().bidMethodDict;
|
2022-03-10 14:24:13 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 获取比选方式(比选一阶段,比选多阶段)
|
|
|
|
|
*/
|
|
|
|
|
export function getProSignDict() {
|
|
|
|
|
if (getSessionProjectData() === null) {
|
|
|
|
|
return null;
|
|
|
|
|
} else {
|
|
|
|
|
return getSessionProjectData().biddingSignDict;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 获取开标时是否需要投标人ipass解密
|
|
|
|
|
*/
|
|
|
|
|
export function getIPassDecode() {
|
|
|
|
|
if (getSessionProjectData() === null) {
|
|
|
|
|
return null;
|
|
|
|
|
} else {
|
|
|
|
|
return getSessionProjectData().isIPassDecode;
|
|
|
|
|
}
|
2021-01-16 11:29:42 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//取session全部字典数据
|
|
|
|
|
export function getDicData() {
|
|
|
|
|
let data = sessionStorage.getItem('DicData');
|
2022-03-10 14:24:13 +08:00
|
|
|
|
if (data == null || data == undefined) {
|
2021-01-16 11:29:42 +08:00
|
|
|
|
return null
|
2022-03-10 14:24:13 +08:00
|
|
|
|
}
|
2021-01-16 11:29:42 +08:00
|
|
|
|
return data;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//取session评审室id
|
|
|
|
|
export function getRoomId() {
|
|
|
|
|
let roomId = sessionStorage.getItem('roomId');
|
|
|
|
|
return roomId;
|
|
|
|
|
}
|
|
|
|
|
|
2022-03-10 14:24:13 +08:00
|
|
|
|
//取session评审室status(3为评审室结束)
|
|
|
|
|
export function getRoomStatus() {
|
|
|
|
|
let roomStatus = sessionStorage.getItem('roomStatus');
|
|
|
|
|
return roomStatus;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//取session资审方式 1-资格预审 2-资格后审
|
|
|
|
|
export function getRoomTypeByEva() {
|
|
|
|
|
let roomTypeByEva = sessionStorage.getItem('roomTypeByEva');
|
|
|
|
|
return roomTypeByEva;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//取session聊天室id
|
|
|
|
|
export function getGroupId() {
|
|
|
|
|
let groupId = sessionStorage.getItem('groupId');
|
|
|
|
|
return groupId;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//取session专家聊天室id
|
|
|
|
|
export function getExpertGroupId() {
|
|
|
|
|
let expertGroupId = sessionStorage.getItem('expertGroupId');
|
|
|
|
|
return expertGroupId;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-01-16 11:29:42 +08:00
|
|
|
|
/**
|
|
|
|
|
* 获取session projectData项目信息(项目跟进)
|
|
|
|
|
*/
|
2022-03-10 14:24:13 +08:00
|
|
|
|
export function getSessionProjectData() {
|
|
|
|
|
let projectData: any | null = sessionStorage.getItem('projectData');
|
2021-01-16 11:29:42 +08:00
|
|
|
|
projectData = JSON.parse(projectData);
|
2022-03-10 14:24:13 +08:00
|
|
|
|
return projectData;
|
2021-01-16 11:29:42 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 获取session projectDocumentationData项目信息(项目建档)
|
|
|
|
|
*/
|
2022-03-10 14:24:13 +08:00
|
|
|
|
export function getSessionProjectDocumentationData() {
|
|
|
|
|
let projectData: any | null = sessionStorage.getItem('projectDocumentationData');
|
2021-01-16 11:29:42 +08:00
|
|
|
|
return JSON.parse(projectData);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 获取session userData用户信息
|
|
|
|
|
*/
|
2022-03-10 14:24:13 +08:00
|
|
|
|
export function getSessionUserData() {
|
|
|
|
|
let userData: any | null = sessionStorage.getItem('userData');
|
2021-01-16 11:29:42 +08:00
|
|
|
|
return JSON.parse(userData);
|
|
|
|
|
}
|
2022-03-10 14:24:13 +08:00
|
|
|
|
/**
|
|
|
|
|
* 获取session userToken
|
|
|
|
|
*/
|
|
|
|
|
export function getUserToken() {
|
|
|
|
|
let userToken: any = `Bearer ${sessionStorage.getItem('Authorization')}`;
|
|
|
|
|
return userToken;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 获取session userRefreshToken
|
|
|
|
|
*/
|
2022-05-17 16:48:28 +08:00
|
|
|
|
export function getUserRefreshToken() {
|
2022-03-10 14:24:13 +08:00
|
|
|
|
let userRefreshToken: any | null = sessionStorage.getItem('refreshToken');
|
|
|
|
|
return userRefreshToken;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 获取session userScope
|
|
|
|
|
*/
|
2022-05-17 16:48:28 +08:00
|
|
|
|
export function getUserScope() {
|
2022-03-10 14:24:13 +08:00
|
|
|
|
let userScope: any | null = sessionStorage.getItem('scope');
|
|
|
|
|
return userScope;
|
|
|
|
|
}
|
2021-01-16 11:29:42 +08:00
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 获取localStorage userData用户信息
|
|
|
|
|
*/
|
2022-03-10 14:24:13 +08:00
|
|
|
|
// export function getLocalUserData(){
|
|
|
|
|
// let userData:any|null = sessionStorage.getItem('userInfo');
|
|
|
|
|
// return JSON.parse(userData);
|
|
|
|
|
// }
|
|
|
|
|
// export function getLocalUserData(){
|
|
|
|
|
// let userData:any|null = sessionStorage.getItem('userInfo');
|
|
|
|
|
// return JSON.parse(userData);
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 获取采购类型合并字典
|
|
|
|
|
*/
|
|
|
|
|
export function getDictBidMethodDictUnion() {
|
|
|
|
|
let dictData: any = getDicData();
|
|
|
|
|
//全字典数据对象
|
|
|
|
|
let dictDataObject = JSON.parse(dictData);
|
|
|
|
|
//采购方式合并--字典
|
|
|
|
|
let bidMethodUnion = [];
|
|
|
|
|
if (dictDataObject !== null) {
|
|
|
|
|
bidMethodUnion = dictDataObject['web_menu=web'];
|
|
|
|
|
}
|
|
|
|
|
return bidMethodUnion;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 获取采购类别字典
|
|
|
|
|
*/
|
|
|
|
|
export function getDictBidMethodDict() {
|
|
|
|
|
//采购方式合并--字典
|
|
|
|
|
let bidMethodUnion = getDictBidMethodDictUnion();
|
|
|
|
|
let dictData: any = getDicData();
|
|
|
|
|
//全字典数据对象
|
|
|
|
|
let dictDataObject = JSON.parse(dictData);
|
|
|
|
|
//采购方式--字典
|
|
|
|
|
let bidMethod: any[] = [];
|
|
|
|
|
//循环遍历所有合并的字典,从合并的字典中获取code值,拼成"01=web_menu""02=web_menu"
|
|
|
|
|
//的值,在从全部字典中获取采购方式的字典
|
|
|
|
|
if (bidMethodUnion?.length > 0) {
|
|
|
|
|
for (let i = 0; i < bidMethodUnion.length; i++) {
|
|
|
|
|
let key = bidMethodUnion[i]["code"] + "=web_menu";
|
|
|
|
|
let dict = dictDataObject[key];
|
|
|
|
|
if (dict?.length > 0) {
|
|
|
|
|
bidMethod = [...bidMethod, ...dict];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return bidMethod;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 获取session roleData用户信息
|
|
|
|
|
*/
|
|
|
|
|
export function getSessionRoleData() {
|
|
|
|
|
let roleData: any | null = sessionStorage.getItem('roleData');
|
|
|
|
|
return JSON.parse(roleData);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 专家评审室列表存储session信息
|
|
|
|
|
* @param record 评审室列表行数据
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
export async function jurySaveInfo(record: any) {
|
|
|
|
|
sessionStorage.setItem('projectData', JSON.stringify({
|
|
|
|
|
bidMethodDict: record?.bidMethodDict,//采购方式
|
|
|
|
|
id: record?.tpId//项目id
|
|
|
|
|
}));
|
|
|
|
|
sessionStorage.setItem('roomId', record.id);
|
|
|
|
|
sessionStorage.setItem("groupId", record.chatGroupId)
|
2022-05-17 16:48:28 +08:00
|
|
|
|
sessionStorage.setItem("expertGroupId", record.expertChatGroupId)
|
2023-03-09 10:34:20 +08:00
|
|
|
|
sessionStorage.setItem("sectionId", record.sectionId)
|
2022-05-25 14:50:03 +08:00
|
|
|
|
sessionStorage.setItem("roomTypeByEva", record.roomType)
|
2022-03-10 14:24:13 +08:00
|
|
|
|
await getQuotationMethodById(record.id)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 获取国密加密算法需要的属性
|
|
|
|
|
*/
|
|
|
|
|
export function getEncrypt() {
|
|
|
|
|
let encrypt = {
|
|
|
|
|
cipherMode: REACT_APP_PASSWORD_CIPHERMODE,
|
|
|
|
|
publicKey: REACT_APP_PASSWORD_PUBLICKEY
|
|
|
|
|
}
|
|
|
|
|
return encrypt;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface projectDataItem {
|
|
|
|
|
id?: string
|
|
|
|
|
bidMethodDict?: string
|
|
|
|
|
biddingSignDict?: string
|
|
|
|
|
isClientFile?: string
|
|
|
|
|
isIPassDecode?: string
|
|
|
|
|
isIPassFile?: string
|
|
|
|
|
projectName?: string
|
|
|
|
|
openTenderForm?: string
|
2022-05-17 16:48:28 +08:00
|
|
|
|
returnURL?: string
|
2022-03-10 14:24:13 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 项目跟进项目经理
|
|
|
|
|
* @param projectData
|
|
|
|
|
*/
|
|
|
|
|
export function followUpAProjectManager(projectData: projectDataItem): Promise<boolean> {
|
|
|
|
|
removePurchaseCanOperate();
|
|
|
|
|
return new Promise<boolean>(resolve => {
|
|
|
|
|
getDefById(projectData.id).then((res) => {
|
|
|
|
|
if (res?.code == 200) {
|
|
|
|
|
let proTypeCode = getURLInformation('proTypeCode');
|
|
|
|
|
sessionStorage.setItem('proTypeCode', proTypeCode === null ? getProTypeCodeByBidMethodDict(projectData.bidMethodDict) : proTypeCode);
|
|
|
|
|
sessionStorage.setItem('defId', JSON.stringify(res.data));
|
|
|
|
|
sessionStorage.setItem('projectData', JSON.stringify(projectData));
|
|
|
|
|
let returnURL = projectData.returnURL ? projectData.returnURL : getUrlRelativePath();
|
|
|
|
|
sessionStorage.setItem('returnURL', returnURL);
|
|
|
|
|
resolve(true);
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 项目跟进供应商
|
|
|
|
|
* @param projectData
|
|
|
|
|
*/
|
|
|
|
|
export function followUpAProjectSupplier(projectData: projectDataItem): Promise<boolean> {
|
|
|
|
|
removePurchaseCanOperate();
|
|
|
|
|
return new Promise<boolean>(resolve => {
|
2022-05-17 16:48:28 +08:00
|
|
|
|
if (projectData?.id == undefined || projectData?.id == null) {
|
2022-03-10 14:24:13 +08:00
|
|
|
|
message.error("项目数据错误,无法获取流程,请联系管理员")
|
|
|
|
|
} else {
|
|
|
|
|
getDefById(projectData?.id).then((res) => {
|
|
|
|
|
if (res?.code == 200) {
|
|
|
|
|
let proTypeCode = getURLInformation('proTypeCode');
|
|
|
|
|
sessionStorage.setItem('proTypeCode', proTypeCode === null ? getProTypeCodeByBidMethodDict(projectData.bidMethodDict) : proTypeCode);
|
|
|
|
|
sessionStorage.setItem('defId', JSON.stringify(res.data));
|
|
|
|
|
sessionStorage.setItem('projectData', JSON.stringify(projectData));
|
|
|
|
|
let returnURL = projectData.returnURL ? projectData.returnURL : getUrlRelativePath();
|
|
|
|
|
sessionStorage.setItem('returnURL', returnURL);
|
|
|
|
|
resolve(true);
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 内拍项目跟进
|
|
|
|
|
* @param projectData
|
|
|
|
|
*/
|
|
|
|
|
export function auctionFollowUpAProjectManager(projectData: projectDataItem): void {
|
|
|
|
|
sessionStorage.setItem('projectData', JSON.stringify(projectData));
|
|
|
|
|
sessionStorage.setItem('defId', JSON.stringify('auction'));
|
|
|
|
|
let returnURL = projectData.returnURL ? projectData.returnURL : getUrlRelativePath();
|
|
|
|
|
sessionStorage.setItem('returnURL', returnURL);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 获取session roleAuthority
|
|
|
|
|
*/
|
|
|
|
|
export function getRA() {
|
|
|
|
|
let roleAuthority: any | null = sessionStorage.getItem('roleAuthority');
|
|
|
|
|
return JSON.parse(roleAuthority);
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 获取项目信息 适用法律
|
|
|
|
|
*/
|
|
|
|
|
export function getProOpenTenderForm() {
|
|
|
|
|
if (getSessionProjectData() === null) {
|
|
|
|
|
return null;
|
|
|
|
|
} else {
|
|
|
|
|
return getSessionProjectData().openTenderForm;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 获取session roleAuthority
|
|
|
|
|
*/
|
|
|
|
|
export function getPurchaseCanOperate() {
|
|
|
|
|
let authority: string | null = sessionStorage.getItem('purchaseCanOperate');
|
|
|
|
|
return authority;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 设置session roleAuthority
|
|
|
|
|
*/
|
2022-05-17 16:48:28 +08:00
|
|
|
|
export function setPurchaseCanOperate() {
|
2022-03-10 14:24:13 +08:00
|
|
|
|
sessionStorage.setItem('purchaseCanOperate', '1');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 删除session roleAuthority
|
|
|
|
|
*/
|
2022-05-17 16:48:28 +08:00
|
|
|
|
export function removePurchaseCanOperate() {
|
2022-03-10 14:24:13 +08:00
|
|
|
|
sessionStorage.removeItem('purchaseCanOperate');
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 获取returnURL
|
|
|
|
|
* @returns
|
|
|
|
|
*/
|
2022-05-17 16:48:28 +08:00
|
|
|
|
export function getReturnURL() {
|
2022-03-10 14:24:13 +08:00
|
|
|
|
let returnURL = sessionStorage.getItem('returnURL');
|
|
|
|
|
return returnURL === null ? "" : returnURL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 获取getRoomReturnURL
|
|
|
|
|
* @returns
|
|
|
|
|
*/
|
2022-05-17 16:48:28 +08:00
|
|
|
|
export function getRoomReturnURL() {
|
2022-03-10 14:24:13 +08:00
|
|
|
|
let roomReturnURL = sessionStorage.getItem('roomReturnURL');
|
|
|
|
|
return roomReturnURL === null ? "" : roomReturnURL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 获取当前评审室对应标段的报价类型(只能在评审室内使用)
|
|
|
|
|
* @returns
|
|
|
|
|
*/
|
2022-05-17 16:48:28 +08:00
|
|
|
|
export function getSectionQuot() {
|
2022-03-10 14:24:13 +08:00
|
|
|
|
let returnURL = sessionStorage.getItem('sectionQuot');
|
|
|
|
|
return returnURL === null ? "0" : returnURL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 根据评审室id获取标段的报价类型
|
|
|
|
|
* @param roomId
|
|
|
|
|
* @returns 1-%(优惠率,折扣率) 0-元(总价,单价)
|
|
|
|
|
*/
|
|
|
|
|
export async function getQuotationMethodById(roomId: any) {
|
2022-05-17 16:48:28 +08:00
|
|
|
|
if (roomId == undefined || roomId == '' || roomId == null) {
|
2022-03-10 14:24:13 +08:00
|
|
|
|
message.error('参数缺失')
|
|
|
|
|
return
|
|
|
|
|
} else {
|
|
|
|
|
await getRoomDataById(roomId).then(async res => {
|
2022-05-17 16:48:28 +08:00
|
|
|
|
if (res?.code == 200 && res?.success == true) {
|
2022-03-10 14:24:13 +08:00
|
|
|
|
let roomData = res?.data
|
|
|
|
|
await getSectionDataById(roomData?.sectionId).then(response => {
|
2022-05-17 16:48:28 +08:00
|
|
|
|
if (response?.code == 200 && response?.success == true) {
|
2022-03-10 14:24:13 +08:00
|
|
|
|
let quotationMethodDict = response?.data?.quotationMethodDict
|
|
|
|
|
let result = (quotationMethodDict == "quotation_method_2" || quotationMethodDict == "quotation_method_3") ? "1" : "0"
|
|
|
|
|
sessionStorage.setItem("sectionQuot", result)//roomType存入session
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
2021-01-16 11:29:42 +08:00
|
|
|
|
}
|
2022-05-17 16:48:28 +08:00
|
|
|
|
/**
|
|
|
|
|
* 存储角色信息
|
|
|
|
|
* @param {总数据} userData
|
|
|
|
|
* @param {权限} role
|
|
|
|
|
* @param {当前角色} roleData
|
|
|
|
|
*/
|
|
|
|
|
export function setUserData(userData: any, role: string, roleData: any): void {
|
|
|
|
|
sessionStorage.setItem('userData', JSON.stringify(userData));
|
|
|
|
|
sessionStorage.setItem('roleAuthority', JSON.stringify([role]));
|
|
|
|
|
sessionStorage.setItem('roleData', JSON.stringify(roleData));
|
|
|
|
|
}
|