app.routes.ts 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. import { Routes } from '@angular/router';
  2. // 客服页面
  3. import { Dashboard as CustomerServiceDashboard } from './pages/customer-service/dashboard/dashboard';
  4. import { ConsultationOrder } from './pages/customer-service/consultation-order/consultation-order';
  5. import { ProjectList } from './pages/customer-service/project-list/project-list';
  6. import { ProjectDetail } from './pages/customer-service/project-detail/project-detail';
  7. import { CaseLibrary } from './pages/customer-service/case-library/case-library';
  8. // 设计师页面
  9. import { Dashboard as DesignerDashboard } from './pages/designer/dashboard/dashboard';
  10. import { ProjectDetail as DesignerProjectDetail } from './pages/designer/project-detail/project-detail';
  11. import { PersonalBoard } from './pages/designer/personal-board/personal-board';
  12. // 组长页面
  13. import { Dashboard as TeamLeaderDashboard } from './pages/team-leader/dashboard/dashboard';
  14. import { TeamManagement } from './pages/team-leader/team-management/team-management';
  15. import { ProjectReview } from './pages/team-leader/project-review/project-review';
  16. import { QualityManagement } from './pages/team-leader/quality-management/quality-management';
  17. // 财务页面
  18. import { Dashboard as FinanceDashboard } from './pages/finance/dashboard/dashboard';
  19. import { ProjectRecords } from './pages/finance/project-records/project-records';
  20. import { Reconciliation } from './pages/finance/reconciliation/reconciliation';
  21. import { Reports } from './pages/finance/reports/reports';
  22. // 人事/行政页面
  23. import { EmployeeRecords } from './pages/hr/employee-records/employee-records';
  24. import { Attendance } from './pages/hr/attendance/attendance';
  25. import { Assets } from './pages/hr/assets/assets';
  26. // 管理员页面
  27. import { SystemManagement } from './pages/admin/system-management/system-management';
  28. export const routes: Routes = [
  29. // 客服路由
  30. {
  31. path: 'customer-service',
  32. children: [
  33. { path: '', redirectTo: 'dashboard', pathMatch: 'full' },
  34. { path: 'dashboard', component: CustomerServiceDashboard, title: '客服工作台' },
  35. { path: 'consultation-order', component: ConsultationOrder, title: '客户咨询与下单' },
  36. { path: 'project-list', component: ProjectList, title: '项目列表' },
  37. { path: 'project-detail/:id', component: ProjectDetail, title: '项目详情' },
  38. { path: 'case-library', component: CaseLibrary, title: '案例库' }
  39. ]
  40. },
  41. // 设计师路由
  42. {
  43. path: 'designer',
  44. children: [
  45. { path: '', redirectTo: 'dashboard', pathMatch: 'full' },
  46. { path: 'dashboard', component: DesignerDashboard, title: '设计师工作台' },
  47. { path: 'project-detail/:id', component: DesignerProjectDetail, title: '项目详情' },
  48. { path: 'personal-board', component: PersonalBoard, title: '个人看板' }
  49. ]
  50. },
  51. // 组长路由
  52. {
  53. path: 'team-leader',
  54. children: [
  55. { path: '', redirectTo: 'dashboard', pathMatch: 'full' },
  56. { path: 'dashboard', component: TeamLeaderDashboard, title: '组长工作台' },
  57. { path: 'team-management', component: TeamManagement, title: '团队管理' },
  58. { path: 'project-review/:id', component: ProjectReview, title: '项目审核' },
  59. { path: 'quality-management', component: QualityManagement, title: '质量管理' }
  60. ]
  61. },
  62. // 财务路由
  63. {
  64. path: 'finance',
  65. children: [
  66. { path: '', redirectTo: 'dashboard', pathMatch: 'full' },
  67. { path: 'dashboard', component: FinanceDashboard, title: '财务工作台' },
  68. { path: 'project-records', component: ProjectRecords, title: '项目流水' },
  69. { path: 'reconciliation', component: Reconciliation, title: '对账与结算' },
  70. { path: 'reports', component: Reports, title: '财务报表' }
  71. ]
  72. },
  73. // 人事/行政路由
  74. {
  75. path: 'hr',
  76. children: [
  77. { path: '', redirectTo: 'employee-records', pathMatch: 'full' },
  78. { path: 'employee-records', component: EmployeeRecords, title: '花名册与档案库' },
  79. { path: 'attendance', component: Attendance, title: '考勤统计' },
  80. { path: 'assets', component: Assets, title: '资产管理' }
  81. ]
  82. },
  83. // 管理员路由
  84. {
  85. path: 'admin',
  86. children: [
  87. { path: '', redirectTo: 'system-management', pathMatch: 'full' },
  88. { path: 'system-management', component: SystemManagement, title: '系统管理' }
  89. ]
  90. },
  91. // 默认路由重定向到客服工作台
  92. { path: '', redirectTo: '/customer-service/dashboard', pathMatch: 'full' },
  93. { path: '**', redirectTo: '/customer-service/dashboard' }
  94. ];