app.routes.ts 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. import { Routes } from '@angular/router';
  2. // 登录页
  3. import { LoginPage } from './pages/auth/login/login';
  4. // 客服页面
  5. import { CustomerServiceLayout } from './pages/customer-service/customer-service-layout/customer-service-layout';
  6. import { Dashboard as CustomerServiceDashboard } from './pages/customer-service/dashboard/dashboard';
  7. import { ConsultationOrder } from './pages/customer-service/consultation-order/consultation-order';
  8. import { ProjectList } from './pages/customer-service/project-list/project-list';
  9. import { ProjectDetail } from './pages/customer-service/project-detail/project-detail';
  10. import { CaseLibrary } from './pages/customer-service/case-library/case-library';
  11. // 客服工作台子页面
  12. import { ConsultationListComponent } from './pages/customer-service/dashboard/pages/consultation-list/consultation-list.component';
  13. import { AssignmentListComponent } from './pages/customer-service/dashboard/pages/assignment-list/assignment-list.component';
  14. import { ExceptionListComponent } from './pages/customer-service/dashboard/pages/exception-list/exception-list.component';
  15. // 设计师页面
  16. import { Dashboard as DesignerDashboard } from './pages/designer/dashboard/dashboard';
  17. import { ProjectDetail as DesignerProjectDetail } from './pages/designer/project-detail/project-detail';
  18. import { PersonalBoard } from './pages/designer/personal-board/personal-board';
  19. // 组长页面
  20. import { Dashboard as TeamLeaderDashboard } from './pages/team-leader/dashboard/dashboard';
  21. import { TeamManagementComponent } from './pages/team-leader/team-management/team-management';
  22. import { ProjectReviewComponent } from './pages/team-leader/project-review/project-review';
  23. import { QualityManagementComponent } from './pages/team-leader/quality-management/quality-management';
  24. import { KnowledgeBaseComponent } from './pages/team-leader/knowledge-base/knowledge-base';
  25. // 财务页面
  26. import { Dashboard as FinanceDashboard } from './pages/finance/dashboard/dashboard';
  27. import { ProjectRecords } from './pages/finance/project-records/project-records';
  28. import { Reconciliation } from './pages/finance/reconciliation/reconciliation';
  29. import { Reports } from './pages/finance/reports/reports';
  30. // 人事/行政页面
  31. import { HrLayout } from './pages/hr/hr-layout/hr-layout';
  32. import { Dashboard as HrDashboard } from './pages/hr/dashboard/dashboard';
  33. import { EmployeeRecords } from './pages/hr/employee-records/employee-records';
  34. import { Attendance } from './pages/hr/attendance/attendance';
  35. import { EmployeeDetailComponent } from './pages/hr/employee-detail/employee-detail';
  36. import { DesignerProfile } from './pages/hr/designer-profile/designer-profile';
  37. // 管理员页面
  38. import { AdminLayout } from './pages/admin/admin-layout/admin-layout';
  39. import { AdminDashboard } from './pages/admin/dashboard/dashboard';
  40. import { SystemManagement } from './pages/admin/system-management/system-management';
  41. import { ProjectManagement } from './pages/admin/project-management/project-management';
  42. import { UserManagement } from './pages/admin/user-management/user-management';
  43. import { SystemSettings } from './pages/admin/system-settings/system-settings';
  44. import { Logs } from './pages/admin/logs/logs';
  45. import { ApiIntegrations } from './pages/admin/api-integrations/api-integrations';
  46. // 新增:管理员子模块页面
  47. import { Designers } from './pages/admin/designers/designers';
  48. import { Customers } from './pages/admin/customers/customers';
  49. import { FinancePage } from './pages/admin/finance/finance';
  50. export const routes: Routes = [
  51. // 客服路由
  52. {
  53. path: 'customer-service',
  54. component: CustomerServiceLayout,
  55. children: [
  56. { path: '', redirectTo: 'dashboard', pathMatch: 'full' },
  57. { path: 'dashboard', component: CustomerServiceDashboard, title: '客服工作台' },
  58. { path: 'consultation-order', component: ConsultationOrder, title: '客户咨询与下单' },
  59. { path: 'project-list', component: ProjectList, title: '项目列表' },
  60. { path: 'project-detail/:id', component: ProjectDetail, title: '项目详情' },
  61. { path: 'case-library', component: CaseLibrary, title: '案例库' },
  62. // 工作台子页面路由
  63. { path: 'consultation-list', component: ConsultationListComponent, title: '咨询列表' },
  64. { path: 'assignment-list', component: AssignmentListComponent, title: '待派单列表' },
  65. { path: 'exception-list', component: ExceptionListComponent, title: '异常项目列表' },
  66. ]
  67. },
  68. // 设计师路由
  69. {
  70. path: 'designer',
  71. children: [
  72. { path: '', redirectTo: 'dashboard', pathMatch: 'full' },
  73. { path: 'dashboard', component: DesignerDashboard, title: '设计师工作台' },
  74. { path: 'project-detail/:id', component: DesignerProjectDetail, title: '项目详情' },
  75. { path: 'personal-board', component: PersonalBoard, title: '个人看板' }
  76. ]
  77. },
  78. // 组长路由
  79. {
  80. path: 'team-leader',
  81. children: [
  82. { path: '', redirectTo: 'dashboard', pathMatch: 'full' },
  83. { path: 'dashboard', component: TeamLeaderDashboard, title: '组长工作台' },
  84. { path: 'team-management', component: TeamManagementComponent, title: '团队管理' },
  85. { path: 'project-review', component: ProjectReviewComponent, title: '项目审核' },
  86. { path: 'quality-management', component: QualityManagementComponent, title: '质量管理' },
  87. { path: 'knowledge-base', component: KnowledgeBaseComponent, title: '知识库与能力复制' }
  88. ]
  89. },
  90. // 财务路由
  91. {
  92. path: 'finance',
  93. children: [
  94. { path: '', redirectTo: 'dashboard', pathMatch: 'full' },
  95. { path: 'dashboard', component: FinanceDashboard, title: '财务工作台' },
  96. { path: 'project-records', component: ProjectRecords, title: '项目流水' },
  97. { path: 'reconciliation', component: Reconciliation, title: '对账与结算' },
  98. { path: 'reports', component: Reports, title: '财务报表' }
  99. ]
  100. },
  101. // 人事/行政路由
  102. {
  103. path: 'hr',
  104. component: HrLayout,
  105. children: [
  106. { path: '', redirectTo: 'dashboard', pathMatch: 'full' },
  107. { path: 'dashboard', component: HrDashboard, title: '人事看板' },
  108. { path: 'employee-records', component: EmployeeRecords, title: '花名册与档案库' },
  109. { path: 'employee-detail/:id', component: EmployeeDetailComponent, title: '员工详情' },
  110. { path: 'attendance', component: Attendance, title: '考勤统计' },
  111. { path: 'designer-profile/:id', component: DesignerProfile, title: '设计师详情' }
  112. ]
  113. },
  114. // 管理员路由
  115. {
  116. path: 'admin',
  117. component: AdminLayout,
  118. children: [
  119. { path: '', redirectTo: 'dashboard', pathMatch: 'full' },
  120. { path: 'dashboard', component: AdminDashboard, title: '总览看板' },
  121. // 项目管理相关路由
  122. { path: 'project-management', component: ProjectManagement, title: '项目管理' },
  123. // 用户与角色管理相关路由
  124. { path: 'user-management', component: UserManagement, title: '用户与角色管理' },
  125. // 新增:设计师、客户、财务管理
  126. { path: 'designers', component: Designers, title: '设计师管理' },
  127. { path: 'customers', component: Customers, title: '客户管理' },
  128. { path: 'finance', component: FinancePage, title: '财务管理' },
  129. // 系统设置相关路由
  130. { path: 'system-settings', component: SystemSettings, title: '系统设置' },
  131. // 系统日志相关路由
  132. { path: 'logs', component: Logs, title: '系统日志' },
  133. // API集成管理相关路由
  134. { path: 'api-integrations', component: ApiIntegrations, title: 'API集成管理' }
  135. ]
  136. },
  137. // 默认路由重定向到登录页
  138. { path: '', component: LoginPage, pathMatch: 'full' },
  139. { path: '**', redirectTo: '/customer-service/dashboard' }
  140. ];