|
|
|
/*
|
|
|
|
* @Descripttion:
|
|
|
|
* @version:
|
|
|
|
* @Author: sueRimn
|
|
|
|
* @Date: 2021-01-11 14:48:03
|
|
|
|
* @LastEditors: sueRimn
|
|
|
|
* @LastEditTime: 2021-07-29 10:26:58
|
|
|
|
*/
|
|
|
|
import { NgModule } from "@angular/core";
|
|
|
|
import { Routes, RouterModule } from "@angular/router";
|
|
|
|
import { LoginComponent } from "./pages/login/login.component";
|
|
|
|
import { NavigationComponent } from "./navigation/navigation.component";
|
|
|
|
import { HomeComponent } from "./home/home.component";
|
|
|
|
import { PlanPassComponent } from "../app/plan-audit/plan-pass/plan-pass.component";
|
|
|
|
|
|
|
|
//路由守卫
|
|
|
|
import { AuthGuard } from "./auth.guard";
|
|
|
|
import { MTokenK1Component } from "./m-token-k1/m-token-k1.component"; //K1秘钥
|
|
|
|
import { ViewUnitDetailsPlanComponent } from "./key-unit/view-unit-details-plan/view-unit-details-plan.component";
|
|
|
|
import { ExternalLinksPlanComponent } from "./external-links-plan/external-links-plan.component";
|
|
|
|
import { CreatePlanOnlineFiveComponent } from "./plan-management/create-plan-online-five/create-plan-online-five.component";
|
|
|
|
import { ExportExcelComponent } from "./export-excel/export-excel.component";
|
|
|
|
|
|
|
|
const routes: Routes = [
|
|
|
|
{ path: "", redirectTo: "login", pathMatch: "full" },
|
|
|
|
{
|
|
|
|
path: "",
|
|
|
|
component: NavigationComponent,
|
|
|
|
canActivate: [AuthGuard], //守卫验证
|
|
|
|
children: [
|
|
|
|
{
|
|
|
|
path: "ui",
|
|
|
|
loadChildren: () => import("./ui/ui.module").then((m) => m.UiModule),
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: "keyUnit",
|
|
|
|
loadChildren: () =>
|
|
|
|
import("./key-unit/key-unit.module").then((m) => m.KeyUnitModule),
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: "planManagement",
|
|
|
|
loadChildren: () =>
|
|
|
|
import("./plan-management/plan-management.module").then(
|
|
|
|
(m) => m.PlanManagementModule
|
|
|
|
),
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: "planAudit",
|
|
|
|
loadChildren: () =>
|
|
|
|
import("./plan-audit/plan-audit.module").then(
|
|
|
|
(m) => m.PlanAuditModule
|
|
|
|
),
|
|
|
|
},
|
|
|
|
{ path: "visualization", component: HomeComponent },
|
|
|
|
{
|
|
|
|
path: "gis",
|
|
|
|
loadChildren: () =>
|
|
|
|
import("./gis-management/gis-management.module").then(
|
|
|
|
(m) => m.GISManagementModule
|
|
|
|
),
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: "statisticanalysis",
|
|
|
|
loadChildren: () =>
|
|
|
|
import("./statistic-analysis/statistic-analysis.module").then(
|
|
|
|
(m) => m.StatisticAnalysisModule
|
|
|
|
),
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: "dataCollection",
|
|
|
|
loadChildren: () =>
|
|
|
|
import("./data-collection/data-collection.module").then(
|
|
|
|
(m) => m.DataCollectionModule
|
|
|
|
),
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{ path: "login", component: LoginComponent },
|
|
|
|
{
|
|
|
|
path: "keyUnit/viewunitinfoplans",
|
|
|
|
component: ViewUnitDetailsPlanComponent,
|
|
|
|
canActivate: [AuthGuard],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: "getNoMToken",
|
|
|
|
component: MTokenK1Component,
|
|
|
|
canActivate: [AuthGuard],
|
|
|
|
}, //K1秘钥验证失败是跳转页面
|
|
|
|
{
|
|
|
|
path: "planAudit/planpass",
|
|
|
|
component: PlanPassComponent,
|
|
|
|
canActivate: [AuthGuard],
|
|
|
|
},
|
|
|
|
{ path: "linksPlan", component: ExternalLinksPlanComponent },
|
|
|
|
{ path: "CreatePlanOnlineFive", component: CreatePlanOnlineFiveComponent },
|
|
|
|
{
|
|
|
|
path: "exportExcel",
|
|
|
|
component: ExportExcelComponent,
|
|
|
|
canActivate: [AuthGuard],
|
|
|
|
},
|
|
|
|
];
|
|
|
|
|
|
|
|
@NgModule({
|
|
|
|
imports: [RouterModule.forRoot(routes)],
|
|
|
|
exports: [RouterModule],
|
|
|
|
})
|
|
|
|
export class AppRoutingModule {}
|