Files
jg_app/src/router/index.js
2026-04-27 17:21:11 +08:00

133 lines
3.0 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* 路由配置
*/
import { createRouter, createWebHashHistory } from "vue-router";
const routes = [
{
path: "/",
name: "login",
component: () => import("../pages/login/index"),
},
{
path: "/Home",
name: "Home",
component: () => import("../pages/newHome/index"),
},
// 新增Greeting message 转换页面
{
path: "/checkInPage",
name: "checkInPage",
component: () => import("../pages/checkInPage/index.vue"),
},
{
path: "/traffic-alerts",
name: "traffic-alerts",
component: () => import("../pages/trafficAlerts/index.vue"),
},
{
path: "/traffic-alert-detail",
name: "traffic-alert-detail",
component: () => import("../pages/trafficAlerts/detail.vue"),
},
{
path: "/violation-alerts",
name: "violation-alerts",
component: () => import("../pages/violationAlerts/index.vue"),
},
{
path: "/violation-detail",
name: "violation-detail",
component: () => import("../pages/violationAlerts/detail.vue"),
},
{
path: "/alert-handle",
name: "alert-handle",
component: () => import("../pages/alertHandle/index.vue"),
},
{
path: "/map",
name: "map",
component: () => import("../pages/map/index.vue"),
},
{
path: "/video-monitor",
name: "video-monitor",
component: () => import("../pages/videoMonitor/index.vue"),
},
{
path: "/videoMonitorMap",
name: "videoMonitorMap",
component: () => import("../pages/videoMonitorMap/index.vue"),
},
{
path: "/warningList",
name: "warningList",
component: () => import("../pages/warningList/index.vue"),
},
// 新增Greeting message 完整转换页面
{
path: "/keyDetection",
name: "keyDetection",
component: () => import("../pages/keyDetection/index.vue"),
},
{
path: "/keyDetection/detail",
name: "keyDetection-detail",
component: () => import("../pages/keyDetection/detail.vue"),
},
{
path: "/keyVehicle",
name: "keyVehicle",
component: () => import("../pages/keyVehicle/index.vue"),
},
{
path: "/keyVehicle/detail",
name: "keyVehicle-detail",
component: () => import("../pages/keyVehicle/detail.vue"),
},
{
path: "/dataReport",
name: "dataReport",
component: () => import("../pages/dataReport/index.vue"),
},
{
path: "/ssp-report",
name: "ssp-report",
component: () => import("../pages/sspReport/index.vue"),
},
{
path: "/error",
name: "error",
component: () => import("../pages/error/index"),
},
{
path: "/my",
name: "my",
component: () => import("../pages/my/index"),
},
{
path: "/clockInPage",
name: "clockInPage",
component: () => import("../pages/clockInPage/index"),
},
];
const router = createRouter({
history: createWebHashHistory(),
routes,
scrollBehavior(to, from, savedPosition) {
if (savedPosition) {
return savedPosition;
} else {
return {
left: 0,
top: 0,
};
}
},
});
export default router;