151 lines
3.0 KiB
TypeScript
151 lines
3.0 KiB
TypeScript
import type { Permission } from "@/modules/core/types";
|
|
|
|
export type NavIconKey =
|
|
| "alerts"
|
|
| "audit"
|
|
| "beds"
|
|
| "care"
|
|
| "dashboard"
|
|
| "devices"
|
|
| "emergency"
|
|
| "global"
|
|
| "health"
|
|
| "notices"
|
|
| "organizations"
|
|
| "roles"
|
|
| "status"
|
|
| "users";
|
|
|
|
export type NavItem = {
|
|
path: string;
|
|
label: string;
|
|
icon: NavIconKey;
|
|
permission?: Permission;
|
|
anyPermissions?: Permission[];
|
|
};
|
|
|
|
export type NavGroup = {
|
|
label: string;
|
|
items: NavItem[];
|
|
};
|
|
|
|
export const navGroups: NavGroup[] = [
|
|
{
|
|
label: "运营",
|
|
items: [
|
|
{
|
|
path: "/dashboard",
|
|
label: "运营看板",
|
|
icon: "dashboard",
|
|
anyPermissions: ["elder:read", "facility:read", "admission:read", "incident:read"],
|
|
},
|
|
{
|
|
path: "/elders",
|
|
label: "老人档案",
|
|
icon: "users",
|
|
permission: "elder:read",
|
|
},
|
|
{
|
|
path: "/beds",
|
|
label: "床位房间",
|
|
icon: "beds",
|
|
anyPermissions: ["facility:read", "admission:read"],
|
|
},
|
|
{
|
|
path: "/health",
|
|
label: "健康照护",
|
|
icon: "health",
|
|
permission: "elder:read",
|
|
},
|
|
{
|
|
path: "/care",
|
|
label: "护理服务",
|
|
icon: "care",
|
|
permission: "elder:update",
|
|
},
|
|
{
|
|
path: "/emergency",
|
|
label: "安全应急",
|
|
icon: "emergency",
|
|
permission: "incident:read",
|
|
},
|
|
],
|
|
},
|
|
{
|
|
label: "协同",
|
|
items: [
|
|
{
|
|
path: "/devices",
|
|
label: "设备运维",
|
|
icon: "devices",
|
|
permission: "facility:read",
|
|
},
|
|
{
|
|
path: "/notices",
|
|
label: "公告通知",
|
|
icon: "notices",
|
|
},
|
|
{
|
|
path: "/alerts",
|
|
label: "规则预警",
|
|
icon: "alerts",
|
|
permission: "incident:read",
|
|
},
|
|
{
|
|
path: "/family",
|
|
label: "家属服务",
|
|
icon: "devices",
|
|
},
|
|
],
|
|
},
|
|
{
|
|
label: "管理系统",
|
|
items: [
|
|
{
|
|
path: "/settings/global",
|
|
label: "全局配置",
|
|
icon: "global",
|
|
permission: "platform:manage",
|
|
},
|
|
{
|
|
path: "/settings/organizations",
|
|
label: "机构管理",
|
|
icon: "organizations",
|
|
permission: "organization:read",
|
|
},
|
|
{
|
|
path: "/settings/users",
|
|
label: "用户管理",
|
|
icon: "users",
|
|
permission: "account:read",
|
|
},
|
|
{
|
|
path: "/settings/roles",
|
|
label: "角色权限",
|
|
icon: "roles",
|
|
permission: "role:read",
|
|
},
|
|
{
|
|
path: "/settings/health",
|
|
label: "健康数据管理",
|
|
icon: "health",
|
|
permission: "health:read",
|
|
},
|
|
{
|
|
path: "/settings/audit",
|
|
label: "审计日志",
|
|
icon: "audit",
|
|
permission: "audit:read",
|
|
},
|
|
{
|
|
path: "/settings/status",
|
|
label: "运行状态",
|
|
icon: "status",
|
|
permission: "incident:read",
|
|
},
|
|
],
|
|
},
|
|
];
|
|
|
|
export const navItems: NavItem[] = navGroups.flatMap((group) => group.items);
|