feat: scaffold mediai admin
This commit is contained in:
@@ -0,0 +1,190 @@
|
||||
import {
|
||||
Aim,
|
||||
Avatar,
|
||||
Bell,
|
||||
ChatDotRound,
|
||||
Collection,
|
||||
Connection,
|
||||
Cpu,
|
||||
DataAnalysis,
|
||||
DocumentChecked,
|
||||
Files,
|
||||
FirstAidKit,
|
||||
Flag,
|
||||
Histogram,
|
||||
House,
|
||||
Key,
|
||||
List,
|
||||
Management,
|
||||
Memo,
|
||||
Monitor,
|
||||
OfficeBuilding,
|
||||
Operation,
|
||||
PriceTag,
|
||||
Reading,
|
||||
Refresh,
|
||||
School,
|
||||
Search,
|
||||
Setting,
|
||||
Share,
|
||||
Star,
|
||||
TrendCharts,
|
||||
User,
|
||||
UserFilled,
|
||||
UserFilled as DoctorIcon
|
||||
} from '@element-plus/icons-vue'
|
||||
import type { MenuSection, RoleKey } from '@/types'
|
||||
|
||||
export const roleMenus: Record<RoleKey, MenuSection[]> = {
|
||||
'super-admin': [
|
||||
{ title: '概览', items: [{ page: 'dashboard', icon: House, title: '平台总览' }] },
|
||||
{
|
||||
title: '用户管理',
|
||||
items: [
|
||||
{ page: 'user-list', icon: User, title: '用户列表' },
|
||||
{ page: 'hospital-list', icon: OfficeBuilding, title: '医院管理' },
|
||||
{ page: 'department-list', icon: Management, title: '科室管理' },
|
||||
{ page: 'role-permission', icon: Key, title: '角色权限' }
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '内容管理',
|
||||
items: [
|
||||
{ page: 'case-list', icon: Collection, title: '病例库' },
|
||||
{ page: 'case-audit', icon: DocumentChecked, title: '病例审核' },
|
||||
{ page: 'tag-category', icon: PriceTag, title: '标签分类' },
|
||||
{ page: 'ai-case', icon: Cpu, title: 'AI病例生成' }
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '训练管理',
|
||||
items: [
|
||||
{ page: 'training-list', icon: Memo, title: '训练记录' },
|
||||
{ page: 'training-detail', icon: Search, title: '训练详情' },
|
||||
{ page: 'ai-dialog', icon: ChatDotRound, title: 'AI对话记录' }
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '能力评估',
|
||||
items: [
|
||||
{ page: 'ability-profile', icon: Aim, title: '能力画像' },
|
||||
{ page: 'ability-radar', icon: Share, title: '雷达图分析' },
|
||||
{ page: 'growth-track', icon: TrendCharts, title: '成长轨迹' },
|
||||
{ page: 'ai-recommend', icon: Star, title: 'AI推荐方案' }
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '数据分析',
|
||||
items: [
|
||||
{ page: 'data-user', icon: UserFilled, title: '用户分析' },
|
||||
{ page: 'data-case', icon: Files, title: '病例分析' },
|
||||
{ page: 'data-hospital', icon: OfficeBuilding, title: '医院分析' },
|
||||
{ page: 'data-retention', icon: Refresh, title: '留存分析' }
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '系统',
|
||||
items: [
|
||||
{ page: 'system-config', icon: Setting, title: '系统配置' },
|
||||
{ page: 'log-audit', icon: List, title: '日志审计' }
|
||||
]
|
||||
}
|
||||
],
|
||||
'hospital-admin': [
|
||||
{ title: '概览', items: [{ page: 'hospital-dashboard', icon: OfficeBuilding, title: '医院驾驶舱' }] },
|
||||
{
|
||||
title: '人员管理',
|
||||
items: [
|
||||
{ page: 'doctor-list', icon: DoctorIcon, title: '医生管理' },
|
||||
{ page: 'student-list', icon: School, title: '医学生管理' },
|
||||
{ page: 'teacher-list', icon: Reading, title: '带教老师' }
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '运营数据',
|
||||
items: [
|
||||
{ page: 'hospital-data', icon: DataAnalysis, title: '运营数据' },
|
||||
{ page: 'case-usage', icon: Collection, title: '病例使用' },
|
||||
{ page: 'training-stats', icon: Memo, title: '训练统计' },
|
||||
{ page: 'dept-analysis', icon: Management, title: '科室分析' }
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '能力提升',
|
||||
items: [
|
||||
{ page: 'ability-trend', icon: TrendCharts, title: '能力趋势' },
|
||||
{ page: 'student-ranking', icon: Histogram, title: '学生排行' }
|
||||
]
|
||||
}
|
||||
],
|
||||
'content-admin': [
|
||||
{ title: '概览', items: [{ page: 'content-dashboard', icon: Files, title: '内容概览' }] },
|
||||
{
|
||||
title: '病例管理',
|
||||
items: [
|
||||
{ page: 'case-library', icon: Collection, title: '病例库管理' },
|
||||
{ page: 'script-case', icon: Reading, title: '剧本病例' },
|
||||
{ page: 'interactive-case', icon: Operation, title: '互动病例' },
|
||||
{ page: 'case-review', icon: DocumentChecked, title: '病例审核' }
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '内容配置',
|
||||
items: [
|
||||
{ page: 'tag-manage', icon: PriceTag, title: '标签管理' },
|
||||
{ page: 'category-manage', icon: Files, title: '分类管理' }
|
||||
]
|
||||
},
|
||||
{
|
||||
title: 'AI内容',
|
||||
items: [
|
||||
{ page: 'ai-generate', icon: Cpu, title: 'AI生成病例' },
|
||||
{ page: 'ai-review', icon: Search, title: 'AI内容审核' }
|
||||
]
|
||||
},
|
||||
{ title: '统计', items: [{ page: 'content-stats', icon: DataAnalysis, title: '内容统计' }] }
|
||||
],
|
||||
teacher: [
|
||||
{ title: '概览', items: [{ page: 'teacher-dashboard', icon: Reading, title: '教学概览' }] },
|
||||
{
|
||||
title: '学生管理',
|
||||
items: [
|
||||
{ page: 'my-students', icon: User, title: '我的学生' },
|
||||
{ page: 'student-training', icon: Memo, title: '训练情况' },
|
||||
{ page: 'student-ability', icon: Aim, title: '能力画像' }
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '教学工具',
|
||||
items: [
|
||||
{ page: 'training-record', icon: Collection, title: '训练记录' },
|
||||
{ page: 'leaderboard', icon: Histogram, title: '排行榜' },
|
||||
{ page: 'assign-task', icon: Flag, title: '分配任务' }
|
||||
]
|
||||
},
|
||||
{
|
||||
title: 'AI辅助',
|
||||
items: [
|
||||
{ page: 'growth-path', icon: TrendCharts, title: '成长轨迹' },
|
||||
{ page: 'ai-report', icon: Bell, title: 'AI教学报告' }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
export const pageTitles = Object.values(roleMenus).reduce<Record<string, string>>((acc, sections) => {
|
||||
sections.forEach(section => {
|
||||
section.items.forEach(item => {
|
||||
acc[item.page] = item.title
|
||||
})
|
||||
})
|
||||
return acc
|
||||
}, {})
|
||||
|
||||
export function getPagePath(page: string) {
|
||||
return page === 'dashboard' ? '/dashboard' : `/module/${page}`
|
||||
}
|
||||
|
||||
export function getFirstPage(role: RoleKey) {
|
||||
return roleMenus[role][0].items[0].page
|
||||
}
|
||||
Reference in New Issue
Block a user