1
guanqb
2024-01-20 f13afcb61276061871b30bce17a7877287df0b67
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
/*
 * @Author: Morpheus
 * @Date: 2021-04-30 14:12:09
 * @Last Modified by: Morpheus
 * @Last Modified time: 2022-07-29 09:15:23
 */
 
import Vue from "vue";
import VueRouter from "vue-router";
Vue.use(VueRouter);
 
const layout = () => import("../../views/layout/index.vue");
const home = () => import("../../views/home/index.vue");
const house = () => import("../../views/house/index.vue");
const police = () => import("../../views/police/index.vue");
const video = () => import("../../views/video/index.vue");
const videoList = () => import("../../views/video/list.vue");
const videoRegion = () => import("../../views/video/region.vue");
const activity = () => import("../../views/activity/index.vue");
const policeInfor = () => import("../../views/policeInfor/index.vue");
const scanOrCode = () => import("../../views/scanOrCode/index.vue");
const intelligentSearch = () =>
  import("../../views/intelligentSearch/index.vue");
 
const login = () => import("../../views/login/index.vue");
 
const routes = [
  {
    path: "/login",
    name: "login",
    component: (resolve) => require(["../../views/login/index.vue"], resolve),
    meta: {
      title: "登录页",
      isAuth: false,
    },
  },
  {
    path: "/",
    redirect: "/layout",
  },
  {
    path: "/layout",
    redirect: "/layout/home",
    meta: {
      title: "导航菜单",
    },
    component: layout,
    children: [
      {
        path: "home",
        meta: {
          title: "首页",
        },
        component: home,
      },
      {
        path: "house",
        meta: {
          title: "社区感知",
        },
        component: house,
      },
      {
        path: "policeresouce",
        meta: {
          title: "警力资源",
        },
        component: police,
      },
 
      {
        path: "video",
        meta: {
          title: "视频监控",
        },
        component: video,
        children: [
          {
            path: "list",
            meta: {
              title: "列表查询",
            },
            component: videoList,
          },
          {
            path: "region",
            meta: {
              title: "空间查询",
            },
            component: videoRegion,
          },
        ],
      },
      {
        path: "activity",
        meta: {
          title: "电子沙盘",
        },
        component: activity,
      },
      {
        path: "policeinfor",
        meta: {
          title: "警情信息",
        },
        component: policeInfor,
      },
      {
        path: "scanOrCode",
        meta: {
          title: "扫码应用",
        },
        component: scanOrCode,
      },
      {
        path: "intelligentSearch",
        meta: {
          title: "智能搜索",
        },
        component: intelligentSearch,
      },
    ],
  },
  // {
  //     path: '*',
  //     redirect: '/404',
  //     isAuth: false
  // }
];
 
const router = new VueRouter({
  base: process.env.BASE_URL,
  routes,
});
 
export default router;