| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- import { createRouter, createWebHistory, createWebHashHistory } from 'vue-router'
- import type { RouteRecordRaw } from 'vue-router'
- import Layout from '@/layout/index.vue'
- // 示例路由配置
- const routes: Array<RouteRecordRaw> = [
- {
- path: '/',
- name: '',
- component: () => import('../views/login/login.vue')
- },
- {
- path: '/login',
- name: 'Login',
- component: () => import('../views/login/login.vue')
- },
- {
- path: '/main',
- name: 'main',
- component: Layout,
- children: [
- {
- path: 'school',
- name: 'school',
- component: () => import('@/views/school/index.vue')
- },
- {
- path: 'teacherList',
- name: 'teacherList',
- component: () => import('@/views/school/teacherList.vue')
- },
- {
- path: 'manager',
- name: 'manager',
- component: () => import('@/views/manager/index.vue')
- },
- {
- path: 'examination',
- name: 'examination',
- component: () => import('@/views/examination/index.vue')
- },
- {
- path: 'userSearch', //用户查询
- name: 'userSearch',
- component: () => import('@/views/userSearch/index.vue')
- },
- {
- path: 'logMonitor', //日志监控
- name: 'logMonitor',
- component: () => import('@/views/logMonitor/index.vue')
- },
- {
- path: 'logMonitorDetail', //日志监控详情
- name: 'logMonitorDetail',
- component: () => import('@/views/logMonitor/LogMonitorDetail.vue')
- },
- {
- path: 'performanceMonitor', //业务监控
- name: 'performanceMonitor',
- component: () => import('@/views/performanceMonitor/index.vue')
- },
- ]
- },
- {
- path: '/:pathMatch(.*)*', // 捕获所有未匹配路径
- name: 'NotFound',
- component: () => import('../views/login/login.vue') // 未匹配到路由跳转到登录页面
- }
- ]
- const router = createRouter({
- history: createWebHashHistory(),
- routes
- })
- export default router
|