feat:新增左右两侧和顶部功能组件

This commit is contained in:
zjc
2024-12-27 16:17:07 +08:00
parent 88eb805c46
commit f906515858
9 changed files with 202 additions and 149 deletions

View File

@@ -1,18 +1,50 @@
import { createRouter, createWebHistory } from 'vue-router'
import NotFound from '@/views/404/index.vue'
import Layout from '@/layout/index.vue'
const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
routes: [
{
path: '/',
name: 'home',
component: () => import('@/views/home/index.vue')
},
{
path: '/monitor',
name: 'monitor',
component: () => import('@/views/monitor/index.vue')
component: Layout,
redirect: '/home',
props(route) {
return route.query
},
children: [
{
path: 'home',
name: 'home',
meta: { title: '奉节县旅游指挥调度中心' },
component: () => import('@/views/home/index.vue')
},
{
path: '/monitor',
name: 'monitor',
component: () => import('@/views/monitor/index.vue')
},
{
path: '/scenic',
name: 'scenic',
component: () => import('@/views/scenic/index.vue')
},
{
path: 'sentiment',
name: 'sentiment',
component: () => import('@/views/sentiment/index.vue')
},
{
path: '/workOrder',
name: 'workOrder',
component: () => import('@/views/workOrder/index.vue')
},
{
path: '/traffic',
name: 'traffic',
component: () => import('@/views/traffic/index.vue')
}
]
},
{
path: '/sceneTesting',
@@ -24,26 +56,6 @@ const router = createRouter({
name: 'roadTesting',
component: () => import('@/views/testing/road.vue')
},
{
path: '/scenic',
name: 'scenic',
component: () => import('@/views/scenic/index.vue')
},
{
path: '/traffic',
name: 'traffic',
component: () => import('@/views/traffic/index.vue')
},
{
path: '/sentiment',
name: 'sentiment',
component: () => import('@/views/sentiment/index.vue')
},
{
path: '/workOrder',
name: 'workOrder',
component: () => import('@/views/workOrder/index.vue')
},
{
path: '/404',
name: 'NotFound',