modules.routes.ts 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. import { NgModule } from "@angular/core";
  2. import { mapToCanActivate, RouterModule, Routes } from "@angular/router";
  3. import { PageUserComponent } from "../nav-admin/page-user/page-user.component";
  4. import { UserEditComponent } from "../nav-admin/user-edit/user-edit.component";
  5. import { PageProcessComponent } from "./page-process/page-process.component";
  6. import { ProcessListComponent } from "./page-process/process-list/process-list.component";
  7. import { PageRoleComponent } from "./page-role/page-role.component";
  8. import { PageTextbookComponent } from "./page-textbook/page-textbook.component";
  9. import { SubmittedComponent } from "./submitted/submitted.component";
  10. import { AuthGuard } from "./auth.guard";
  11. import { ActivityComponent } from "./activity/activity.component";
  12. import { ReviewEditComponent } from "./activity/review-edit/review-edit.component";
  13. import { CollectFileComponent } from "./collect-file/collect-file.component";
  14. const routes: Routes = [
  15. {
  16. path: '',
  17. redirectTo:'manage/textbook',
  18. pathMatch: "full",
  19. },
  20. {
  21. path: 'manage',
  22. canActivate: mapToCanActivate([AuthGuard]),
  23. children:[
  24. {
  25. path: 'process', //流程申报
  26. component: ProcessListComponent,
  27. },
  28. {
  29. path: 'process/page', //流程详情
  30. component: PageProcessComponent,
  31. },
  32. {
  33. path: 'textbook', //全部教材
  34. component: PageTextbookComponent,
  35. },
  36. {
  37. path: 'user', //用户列表
  38. component: PageUserComponent,
  39. },
  40. {
  41. path: 'user/edit', //用户管理&编辑
  42. component: UserEditComponent,
  43. },
  44. {
  45. path: 'role', //组织列表
  46. component: PageRoleComponent,
  47. },
  48. {
  49. path: 'submitted/:id', //组织列表
  50. component: SubmittedComponent,
  51. },
  52. {
  53. path: 'activity/:id', //评审活动
  54. component: ActivityComponent,
  55. },
  56. {
  57. path: 'review-edit/:id', //评审活动
  58. component: ReviewEditComponent,
  59. },
  60. {
  61. path: 'collect', //本社教材源文件
  62. component: CollectFileComponent,
  63. },
  64. ]
  65. }
  66. ];
  67. @NgModule({
  68. imports: [RouterModule.forChild(routes)],
  69. exports: [RouterModule],
  70. })
  71. export class NavProContactRoutingModule {}