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.
|
|
|
|
// 模拟后端动态生成路由
|
|
|
|
|
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[];
|