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