You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
virtual-patient-web/mock/asyncRoutes.ts

95 lines
1.8 KiB
TypeScript

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

// 模拟后端动态生成路由
import { MockMethod } from "vite-plugin-mock";
/**
* roles页面级别权限这里模拟二种 "admin"、"common"
* admin管理员角色
* common普通角色
*/
const inquiryManagementRouter = {
path: "/inquiryManagement",
meta: {
title: "问诊管理",
icon: "projectIcon",
rank: 11
},
children: [
{
path: "/inquiryManagement/bodyInspect",
name: "BodyInspect",
meta: {
title: "体格检查",
roles: ["admin", "common"]
}
},
{
path: "/inquiryManagement/supportInspect",
name: "SupportInspect",
meta: {
title: "辅助检查",
roles: ["admin", "common"]
}
},
{
path: "/inquiryManagement/disposalPlan",
name: "DisposalPlan",
meta: {
title: "处置计划",
roles: ["admin", "common"]
}
}
]
};
const caseManagement = {
path: "/caseManagement",
redirect: "/caseManagement/list",
meta: {
title: "病历管理",
icon: "projectIcon",
rank: 11
},
children: [
{
path: "/caseManagement/diseaseType",
name: "DiseaseType",
meta: {
title: "疾病分类",
roles: ["admin", "common"]
}
},
{
path: "/caseManagement/list",
name: "CaseManagement",
meta: {
title: "病历管理",
showLink: true,
roles: ["admin", "common"]
}
},
{
path: "/caseManagement/add",
name: "caseManagementAdd",
meta: {
title: "新建病历",
showLink: false,
roles: ["admin", "common"]
}
}
]
};
export default [
{
url: "/getAsyncRoutes",
method: "get",
response: () => {
return {
success: true,
code: 200,
data: [inquiryManagementRouter, caseManagement]
};
}
}
] as MockMethod[];