| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128 |
- import { createRouter, createWebHistory } from 'vue-router'
- const routes = [
- {
- path: '/',
- name: 'home',
- component: function () {
- return import('../views/HomePage.vue')
- }
- },
- // 例子(开发时参考,生产环境中相关文件无意义)
- {
- path: '/example',
- name: 'example',
- component: function () {
- return import('../views/Example.vue')
- },
- children: [ // 子路由配置开始
- {
- path: 'example',
- component: function () {
- return import('../views/example/Example.vue')
- },
- },
- {
- path: 'map',
- component: function () {
- return import('../views/example/Map.vue')
- },
- }
- ], // 子路由配置结束
- },
- // 时空算子库
- {
- path: '/skszk',
- name: 'skszk',
- component: function () {
- return import('../views/skszk/Example.vue')
- }
- },
- // 时空门户
- {
- path: '/skmh',
- name: 'skmh',
- component: function () {
- return import('../views/Skmh.vue')
- },
- children: [ // 子路由配置开始
- {
- path: 'example',
- component: function () {
- return import('../views/skmh/Example.vue')
- },
- }
- ], // 子路由配置结束
- },
- // 微功能
- {
- path: '/wgn',
- name: 'wgn',
- component: function () {
- return import('../views/wgn/index.vue')
- },
- // children: [ // 子路由配置开始
- // {
- // path: 'example',
- // component: function () {
- // return import('../views/wgn/Example.vue')
- // },
- // }
- // ], // 子路由配置结束
- },
- // 应用管理
- {
- path: '/yygl',
- name: 'yygl',
- component: function () {
- return import('../views/Yygl.vue')
- },
- children: [ // 子路由配置开始
- {
- path: 'example',
- component: function () {
- return import('../views/yygl/Example.vue')
- },
- }
- ], // 子路由配置结束
- },
- // 信息反馈
- {
- path: '/xxfk',
- name: 'xxfk',
- component: function () {
- return import('../views/Xxfk.vue')
- },
- children: [ // 子路由配置开始
- {
- path: 'example',
- component: function () {
- return import('../views/xxfk/Example.vue')
- },
- }
- ], // 子路由配置结束
- },
- // 运行管理
- {
- path: '/yxgl',
- name: 'yxgl',
- component: function () {
- return import('../views/Yxgl.vue')
- },
- children: [ // 子路由配置开始
- {
- path: 'StatisticalAnalysis',
- component: function () {
- return import('../views/yxgl/StatisticalAnalysis.vue')
- },
- }
- ], // 子路由配置结束
- },
- ]
- const router = createRouter({
- history: createWebHistory(process.env.BASE_URL),
- routes
- })
- export default router
|