app.routes.ts 4.7 KB

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