app.routes.ts 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353
  1. import { Routes } from '@angular/router';
  2. // import { WxworkAuthGuard } from 'fmode-ng/social';
  3. export const routes: Routes = [
  4. // 客服路由
  5. {
  6. path: 'customer-service',
  7. loadComponent: () => import('./pages/customer-service/customer-service-layout/customer-service-layout').then(m => m.CustomerServiceLayout),
  8. children: [
  9. { path: '', redirectTo: 'dashboard', pathMatch: 'full' },
  10. {
  11. path: 'dashboard',
  12. loadComponent: () => import('./pages/customer-service/dashboard/dashboard').then(m => m.Dashboard),
  13. title: '客服工作台'
  14. },
  15. {
  16. path: 'consultation-order',
  17. loadComponent: () => import('./pages/customer-service/consultation-order/consultation-order').then(m => m.ConsultationOrder),
  18. title: '客户咨询与下单'
  19. },
  20. {
  21. path: 'project-list',
  22. loadComponent: () => import('./pages/customer-service/project-list/project-list').then(m => m.ProjectList),
  23. title: '项目列表'
  24. },
  25. {
  26. path: 'case-library',
  27. loadComponent: () => import('./pages/customer-service/case-library/case-library').then(m => m.CaseLibrary),
  28. title: '案例库'
  29. },
  30. {
  31. path: 'case-detail/:id',
  32. loadComponent: () => import('./pages/customer-service/case-detail/case-detail.component').then(m => m.CaseDetailComponent),
  33. title: '案例详情'
  34. },
  35. {
  36. path: 'after-sales',
  37. loadComponent: () => import('./pages/customer-service/dashboard/pages/after-sales/after-sales.component').then(m => m.AfterSalesComponent),
  38. title: '售后服务'
  39. },
  40. // 工作台子页面路由
  41. {
  42. path: 'consultation-list',
  43. loadComponent: () => import('./pages/customer-service/dashboard/pages/consultation-list/consultation-list.component').then(m => m.ConsultationListComponent),
  44. title: '咨询列表'
  45. },
  46. {
  47. path: 'assignment-list',
  48. loadComponent: () => import('./pages/customer-service/dashboard/pages/assignment-list/assignment-list.component').then(m => m.AssignmentListComponent),
  49. title: '待派单列表'
  50. },
  51. {
  52. path: 'exception-list',
  53. loadComponent: () => import('./pages/customer-service/dashboard/pages/exception-list/exception-list.component').then(m => m.ExceptionListComponent),
  54. title: '异常项目列表'
  55. },
  56. ]
  57. },
  58. // 设计师路由
  59. {
  60. path: 'designer',
  61. children: [
  62. { path: '', redirectTo: 'dashboard', pathMatch: 'full' },
  63. {
  64. path: 'dashboard',
  65. loadComponent: () => import('./pages/designer/dashboard/dashboard').then(m => m.Dashboard),
  66. title: '设计师工作台'
  67. },
  68. {
  69. path: 'project-detail/:id',
  70. loadComponent: () => import('./pages/designer/project-detail/project-detail').then(m => m.ProjectDetail),
  71. title: '项目详情'
  72. },
  73. {
  74. path: 'personal-board',
  75. loadComponent: () => import('./pages/designer/personal-board/personal-board').then(m => m.PersonalBoard),
  76. title: '个人看板'
  77. }
  78. ]
  79. },
  80. // 组长路由
  81. {
  82. path: 'team-leader',
  83. children: [
  84. { path: '', redirectTo: 'dashboard', pathMatch: 'full' },
  85. {
  86. path: 'dashboard',
  87. loadComponent: () => import('./pages/team-leader/dashboard/dashboard').then(m => m.Dashboard),
  88. title: '组长工作台'
  89. },
  90. {
  91. path: 'team-management',
  92. loadComponent: () => import('./pages/team-leader/team-management/team-management').then(m => m.TeamManagementComponent),
  93. title: '团队管理'
  94. },
  95. {
  96. path: 'quality-management',
  97. loadComponent: () => import('./pages/team-leader/quality-management/quality-management').then(m => m.QualityManagementComponent),
  98. title: '质量管理'
  99. },
  100. {
  101. path: 'knowledge-base',
  102. loadComponent: () => import('./pages/team-leader/knowledge-base/knowledge-base').then(m => m.KnowledgeBaseComponent),
  103. title: '知识库与能力复制'
  104. },
  105. {
  106. path: 'workload-calendar',
  107. loadComponent: () => import('./pages/team-leader/workload-calendar/workload-calendar').then(m => m.WorkloadCalendarComponent),
  108. title: '负载日历'
  109. },
  110. // 新增:复用设计师项目详情作为组长查看页面(含审核/同步能力)
  111. {
  112. path: 'project-detail/:id',
  113. loadComponent: () => import('./pages/designer/project-detail/project-detail').then(m => m.ProjectDetail),
  114. title: '项目详情'
  115. }
  116. ]
  117. },
  118. // 财务路由
  119. {
  120. path: 'finance',
  121. children: [
  122. { path: '', redirectTo: 'dashboard', pathMatch: 'full' },
  123. {
  124. path: 'dashboard',
  125. loadComponent: () => import('./pages/finance/dashboard/dashboard').then(m => m.Dashboard),
  126. title: '财务工作台'
  127. },
  128. {
  129. path: 'project-records',
  130. loadComponent: () => import('./pages/finance/project-records/project-records').then(m => m.ProjectRecords),
  131. title: '项目流水'
  132. },
  133. {
  134. path: 'reconciliation',
  135. loadComponent: () => import('./pages/finance/reconciliation/reconciliation').then(m => m.Reconciliation),
  136. title: '对账与结算'
  137. },
  138. {
  139. path: 'reports',
  140. loadComponent: () => import('./pages/finance/reports/reports').then(m => m.Reports),
  141. title: '财务报表'
  142. },
  143. {
  144. path: 'quotation-approval',
  145. loadComponent: () => import('./pages/finance/quotation-approval/quotation-approval.component').then(m => m.QuotationApprovalComponent),
  146. title: '报价审核'
  147. }
  148. ]
  149. },
  150. // 人事/行政路由
  151. {
  152. path: 'hr',
  153. loadComponent: () => import('./pages/hr/hr-layout/hr-layout').then(m => m.HrLayout),
  154. children: [
  155. {
  156. path: 'dashboard',
  157. loadComponent: () => import('./pages/hr/dashboard/dashboard').then(m => m.Dashboard),
  158. title: '人事看板'
  159. },
  160. {
  161. path: 'employee-records',
  162. loadComponent: () => import('./pages/hr/employee-records/employee-records').then(m => m.EmployeeRecords),
  163. title: '员工档案'
  164. },
  165. {
  166. path: 'attendance',
  167. loadComponent: () => import('./pages/hr/attendance/attendance').then(m => m.Attendance),
  168. title: '考勤管理'
  169. },
  170. { path: '', redirectTo: 'dashboard', pathMatch: 'full' }
  171. ]
  172. },
  173. // 管理员路由
  174. {
  175. path: 'admin',
  176. loadComponent: () => import('./pages/admin/admin-layout/admin-layout').then(m => m.AdminLayout),
  177. children: [
  178. { path: '', redirectTo: 'dashboard', pathMatch: 'full' },
  179. {
  180. path: 'dashboard',
  181. loadComponent: () => import('./pages/admin/dashboard/dashboard').then(m => m.AdminDashboard),
  182. title: '总览看板'
  183. },
  184. // 项目管理相关路由
  185. {
  186. path: 'project-management',
  187. loadComponent: () => import('./pages/admin/project-management/project-management').then(m => m.ProjectManagement),
  188. title: '项目管理'
  189. },
  190. // 项目详情页(复用wxwork模块)
  191. {
  192. path: 'project-detail/:projectId',
  193. loadComponent: () => import('../modules/project/pages/project-detail/project-detail.component').then(m => m.ProjectDetailComponent),
  194. title: '项目详情',
  195. children: [
  196. { path: '', redirectTo: 'order', pathMatch: 'full' },
  197. {
  198. path: 'order',
  199. loadComponent: () => import('../modules/project/pages/project-detail/stages/stage-order.component').then(m => m.StageOrderComponent),
  200. title: '订单分配'
  201. },
  202. {
  203. path: 'requirements',
  204. loadComponent: () => import('../modules/project/pages/project-detail/stages/stage-requirements.component').then(m => m.StageRequirementsComponent),
  205. title: '确认需求'
  206. },
  207. {
  208. path: 'delivery',
  209. loadComponent: () => import('../modules/project/pages/project-detail/stages/stage-delivery.component').then(m => m.StageDeliveryComponent),
  210. title: '交付执行'
  211. },
  212. {
  213. path: 'aftercare',
  214. loadComponent: () => import('../modules/project/pages/project-detail/stages/stage-aftercare.component').then(m => m.StageAftercareComponent),
  215. title: '售后归档'
  216. }
  217. ]
  218. },
  219. // 用户与角色管理相关路由
  220. {
  221. path: 'user-management',
  222. loadComponent: () => import('./pages/admin/user-management/user-management').then(m => m.UserManagement),
  223. title: '用户与角色管理'
  224. },
  225. // 项目组管理
  226. {
  227. path: 'departments',
  228. loadComponent: () => import('./pages/admin/departments/departments').then(m => m.Departments),
  229. title: '项目组管理'
  230. },
  231. // 员工管理 (原设计师管理)
  232. {
  233. path: 'employees',
  234. loadComponent: () => import('./pages/admin/employees/employees').then(m => m.Employees),
  235. title: '员工管理'
  236. },
  237. // 客户管理
  238. {
  239. path: 'customers',
  240. loadComponent: () => import('./pages/admin/customers/customers').then(m => m.Customers),
  241. title: '客户管理'
  242. },
  243. // 群组管理
  244. {
  245. path: 'groupchats',
  246. loadComponent: () => import('./pages/admin/groupchats/groupchats').then(m => m.GroupChats),
  247. title: '群组管理'
  248. },
  249. // 财务管理 (隐藏)
  250. {
  251. path: 'finance',
  252. loadComponent: () => import('./pages/admin/finance/finance').then(m => m.FinancePage),
  253. title: '财务管理'
  254. },
  255. // 系统设置相关路由
  256. {
  257. path: 'system-settings',
  258. loadComponent: () => import('./pages/admin/system-settings/system-settings').then(m => m.SystemSettings),
  259. title: '系统设置'
  260. },
  261. // 系统日志相关路由
  262. {
  263. path: 'logs',
  264. loadComponent: () => import('./pages/admin/logs/logs').then(m => m.Logs),
  265. title: '系统日志'
  266. },
  267. // API集成管理相关路由
  268. {
  269. path: 'api-integrations',
  270. loadComponent: () => import('./pages/admin/api-integrations/api-integrations').then(m => m.ApiIntegrations),
  271. title: 'API集成管理'
  272. }
  273. ]
  274. },
  275. // 演示页面路由
  276. {
  277. path: 'dropdown-demo',
  278. loadComponent: () => import('./pages/shared/dropdown/dropdown-demo.component').then(m => m.DropdownDemoComponent),
  279. title: '下拉列表组件演示'
  280. },
  281. // 测试页面路由
  282. {
  283. path: 'test-atmosphere-preview',
  284. loadComponent: () => import('./test-atmosphere-preview/test-atmosphere-preview').then(m => m.TestAtmospherePreviewComponent),
  285. title: '氛围感预览图测试'
  286. },
  287. // 企微项目管理模块路由 (添加WxworkAuthGuard保护)
  288. {
  289. path: 'wxwork/:cid',
  290. // canActivate: [WxworkAuthGuard],
  291. children: [
  292. // 项目预加载页(企微上下文入口)
  293. {
  294. path: 'project-loader',
  295. loadComponent: () => import('../modules/project/pages/project-loader/project-loader.component').then(m => m.ProjectLoaderComponent),
  296. title: '加载项目'
  297. },
  298. // 客户画像页
  299. {
  300. path: 'contact/:contactId',
  301. loadComponent: () => import('../modules/project/pages/contact/contact.component').then(m => m.CustomerProfileComponent),
  302. title: '客户画像'
  303. },
  304. // 项目详情页(含四阶段子路由)
  305. {
  306. path: 'project/:projectId',
  307. loadComponent: () => import('../modules/project/pages/project-detail/project-detail.component').then(m => m.ProjectDetailComponent),
  308. children: [
  309. { path: '', redirectTo: 'order', pathMatch: 'full' },
  310. {
  311. path: 'order',
  312. loadComponent: () => import('../modules/project/pages/project-detail/stages/stage-order.component').then(m => m.StageOrderComponent),
  313. title: '订单分配'
  314. },
  315. {
  316. path: 'requirements',
  317. loadComponent: () => import('../modules/project/pages/project-detail/stages/stage-requirements.component').then(m => m.StageRequirementsComponent),
  318. title: '确认需求'
  319. },
  320. {
  321. path: 'delivery',
  322. loadComponent: () => import('../modules/project/pages/project-detail/stages/stage-delivery.component').then(m => m.StageDeliveryComponent),
  323. title: '交付执行'
  324. },
  325. {
  326. path: 'aftercare',
  327. loadComponent: () => import('../modules/project/pages/project-detail/stages/stage-aftercare.component').then(m => m.StageAftercareComponent),
  328. title: '售后归档'
  329. }
  330. ]
  331. }
  332. ]
  333. },
  334. // 默认路由重定向到登录页
  335. {
  336. path: '',
  337. loadComponent: () => import('./pages/auth/login/login').then(m => m.LoginPage),
  338. pathMatch: 'full'
  339. },
  340. { path: '**', redirectTo: '/customer-service/dashboard' }
  341. ];