routes-routing.module.ts 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. import { NgModule } from '@angular/core';
  2. import { Routes, RouterModule } from '@angular/router';
  3. import { SimpleGuard } from '@delon/auth';
  4. import { environment } from '@env/environment';
  5. // layout
  6. import { LayoutDefaultComponent } from '../layout/default/default.component';
  7. import { LayoutFullScreenComponent } from '../layout/fullscreen/fullscreen.component';
  8. import { LayoutPassportComponent } from '../layout/passport/passport.component';
  9. // dashboard pages
  10. import { DashboardV1Component } from './dashboard/v1/v1.component';
  11. import { DashboardAnalysisComponent } from './dashboard/analysis/analysis.component';
  12. import { DashboardMonitorComponent } from './dashboard/monitor/monitor.component';
  13. import { DashboardWorkplaceComponent } from './dashboard/workplace/workplace.component';
  14. // passport pages
  15. import { UserLoginComponent } from './passport/login/login.component';
  16. import { UserRegisterComponent } from './passport/register/register.component';
  17. import { UserRegisterResultComponent } from './passport/register-result/register-result.component';
  18. // single pages
  19. import { CallbackComponent } from './callback/callback.component';
  20. import { UserLockComponent } from './passport/lock/lock.component';
  21. import { RoutesDashboardHomePageComponent } from './dashboard/home-page/home-page.component';
  22. const routes: Routes = [
  23. {
  24. path: '',
  25. component: LayoutDefaultComponent,
  26. canActivate: [SimpleGuard],
  27. canActivateChild: [SimpleGuard],
  28. children: [
  29. { path: '', redirectTo: 'dashboard/analysis', pathMatch: 'full' },
  30. { path: 'dashboard', redirectTo: 'dashboard/v1', pathMatch: 'full' },
  31. { path: 'dashboard/v1', component: DashboardV1Component },
  32. { path: 'dashboard/analysis', component: DashboardAnalysisComponent },
  33. { path: 'dashboard/home-page', component: RoutesDashboardHomePageComponent },
  34. { path: 'dashboard/monitor', component: DashboardMonitorComponent },
  35. { path: 'dashboard/workplace', component: DashboardWorkplaceComponent },
  36. { path: 'widgets', loadChildren: './widgets/widgets.module#WidgetsModule' },
  37. { path: 'style', loadChildren: './style/style.module#StyleModule' },
  38. { path: 'delon', loadChildren: './delon/delon.module#DelonModule' },
  39. { path: 'extras', loadChildren: './extras/extras.module#ExtrasModule' },
  40. { path: 'pro', loadChildren: './pro/pro.module#ProModule' },
  41. // Exception
  42. { path: 'exception', loadChildren: './exception/exception.module#ExceptionModule' },
  43. // System
  44. { path: 'system', loadChildren: './system/system.module#SystemModule' },
  45. // System
  46. { path: 'monitor', loadChildren: './monitor/monitor.module#MonitorModule' },
  47. { path: 'basedata', loadChildren: './basedata/basedata.module#BasedataModule' },
  48. { path: 'pm', loadChildren: './pm/pm.module#PmModule' },
  49. //项目里程碑模板
  50. { path: 'projectMilestones', loadChildren: './project-milestones/project-milestones.module#ProjectMilestonesModule' },
  51. // 财务管理
  52. { path: 'financialManagement', loadChildren: './financial-management/financial-management.module#FinancialManagementModule' },
  53. //样本及耗材管理
  54. { path: 'samplesAndConsumables', loadChildren: './samples-and-consumables/samples-and-consumables.module#SamplesAndConsumablesModule' },
  55. // 质量管理
  56. { path: 'qualityControl', loadChildren: './quality-control/quality-control.module#QualityControlModule' },
  57. { path: 'quality-management', loadChildren: './quality-management/quality-management.module#QualityManagementModule' },
  58. //车间派工单
  59. { path: 'WorkshopDispatchList', loadChildren: './fbs-workshop-dispatch-list/fbs-workshop-dispatch-list.module#FbsWorkshopDispatchListModule' },
  60. //生产异常信息统计单
  61. { path: 'FbsAbnormalWorkingHours', loadChildren: './fbs-abnormal-working-hours/fbs-abnormal-working-hours.module#FbsAbnormalWorkingHoursModule' },
  62. //质量近六个月统计
  63. { path: 'fbs-quality-qualification-rate', loadChildren: './fbs-quality-qualification-rate/fbs-quality-qualification-rate.module#FbsQualityQualificationRateModule' },
  64. //质量近六个月统计
  65. { path: 'fbs-personnel', loadChildren: './fbs-personnel/fbs-personnel.module#FbsPersonnelModule' },
  66. //扫码记录
  67. { path: 'fbs-fbs-scan-code', loadChildren: './fbs-scan-code/fbs-scan-code.module#FbsScanCodeModule' },
  68. //工艺流程档案
  69. { path: 'fbs-technological-process', loadChildren: './fbs-technological-process/fbs-technological-process.module#FbsTechnologicalProcessModule' },
  70. //仓库报表
  71. { path: 'fbs-warehouse', loadChildren: './fbs-warehouse/fbs-warehouse.module#FbsWarehouseModule' },
  72. //效率报表
  73. { path:'efficiency-report',loadChildren:'./efficiency-report/efficiency-report.module#EfficiencyReportModule'}
  74. ],
  75. },
  76. // 全屏布局
  77. {
  78. path: 'data-v',
  79. component: LayoutFullScreenComponent,
  80. children: [{ path: '', loadChildren: './data-v/data-v.module#DataVModule' }],
  81. },
  82. // passport
  83. {
  84. path: 'passport',
  85. component: LayoutPassportComponent,
  86. children: [
  87. {
  88. path: 'login',
  89. component: UserLoginComponent,
  90. // data: { title: '登录', titleI18n: 'app.login.login' },
  91. data: { title: '登录', titleI18n: '' },
  92. },
  93. {
  94. path: 'register',
  95. component: UserRegisterComponent,
  96. data: { title: '注册', titleI18n: 'app.register.register' },
  97. },
  98. {
  99. path: 'register-result',
  100. component: UserRegisterResultComponent,
  101. data: { title: '注册结果', titleI18n: 'app.register.register' },
  102. },
  103. {
  104. path: 'lock',
  105. component: UserLockComponent,
  106. data: { title: '锁屏', titleI18n: 'app.lock' },
  107. },
  108. ],
  109. },
  110. // 单页不包裹Layout
  111. { path: 'callback/:type', component: CallbackComponent },
  112. { path: '**', redirectTo: 'exception/404' },
  113. ]
  114. @NgModule({
  115. imports: [
  116. RouterModule.forRoot(routes, {
  117. useHash: environment.useHash,
  118. // NOTICE: If you use `reuse-tab` component and turn on keepingScroll you can set to `disabled`
  119. // Pls refer to https://ng-alain.com/components/reuse-tab
  120. scrollPositionRestoration: 'top',
  121. }),
  122. ],
  123. exports: [RouterModule],
  124. })
  125. export class RouteRoutingModule { }