You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
151 lines
3.9 KiB
151 lines
3.9 KiB
import Vue from "vue";
|
|
import VueRouter from "vue-router";
|
|
// 引入组件
|
|
import test from "~/pages/test";
|
|
import teacher from "~/pages/teacher/index";
|
|
import manager from "~/pages/manager/index";
|
|
import supManager from "~/pages/supManager/index";
|
|
import personal from "~/pages/teacher/personal";
|
|
import login from "~/pages/login";
|
|
import empty from "~/pages/teacher/empty";
|
|
import myCourse from "~/pages/teacher/myCourseTable";
|
|
import tb_course from "~/components/tb_course";
|
|
import labApplyDetail from "~/pages/labApplyDetail";
|
|
import applyLab from "~/pages/teacher/applyLab";
|
|
import myApplyRecord from "~/pages/teacher/myApplyRecord";
|
|
import courseManagement from "~/pages/teacher/courseManagement";
|
|
import supHome from "~/components/supManager/home";
|
|
import supIndex from "~/components/supManager/index";
|
|
import globalPersonal from "~/components/personal";
|
|
import userManage from "~/components/supManager/userManage";
|
|
import labManager from "~/components/supManager/labManage";
|
|
|
|
|
|
//manager
|
|
import check from "~/components/supManager/check";
|
|
import applyRecord from "~/pages/manager/applyRecord";
|
|
import managerHome from "~/components/manager/home"
|
|
import managerIndex from "~/components/manager/index";
|
|
// 要告诉 vue 使用 vueRouter
|
|
Vue.use(VueRouter);
|
|
|
|
const routes = [
|
|
{
|
|
path: "/",
|
|
redirect: '/login'
|
|
},
|
|
{
|
|
path: '/test',
|
|
component: test
|
|
},
|
|
{
|
|
path: "/teacher",
|
|
component: empty,
|
|
children: [
|
|
{
|
|
path: '',
|
|
name: 'teacher',
|
|
component: teacher
|
|
},
|
|
{
|
|
path: 'personal',
|
|
component: personal
|
|
},
|
|
{
|
|
path: 'myCourse',
|
|
component: myCourse
|
|
},
|
|
{
|
|
path: 'applyLab',
|
|
component: applyLab
|
|
},
|
|
{
|
|
path: 'myApplyRecord/:u_id',
|
|
component: myApplyRecord,
|
|
props: true
|
|
},
|
|
{
|
|
path: 'courseManagement',
|
|
component: courseManagement
|
|
},
|
|
{
|
|
path: 'myApplyRecord',
|
|
component: myApplyRecord
|
|
}
|
|
]
|
|
},
|
|
{
|
|
path: '/manager',
|
|
component: manager,
|
|
children: [{
|
|
path: '',
|
|
component: managerHome
|
|
},{
|
|
path: 'index',
|
|
component: managerIndex,
|
|
children: [
|
|
{
|
|
path: 'personal',
|
|
component: globalPersonal
|
|
}, {
|
|
path: 'labApply',
|
|
component: applyRecord
|
|
},{
|
|
path: 'labManager',
|
|
component: labManager
|
|
}
|
|
]
|
|
}]
|
|
},
|
|
{
|
|
path: '/supManager',
|
|
component: supManager,
|
|
children: [
|
|
{
|
|
path: '',
|
|
component: supHome
|
|
},
|
|
{
|
|
path: 'index',
|
|
component: supIndex,
|
|
children: [
|
|
{
|
|
path: 'personal',
|
|
component: globalPersonal
|
|
}, {
|
|
path: 'labManager',
|
|
component: labManager
|
|
},
|
|
{
|
|
path: 'userManage',
|
|
component: userManage
|
|
},
|
|
{
|
|
path: 'check',
|
|
component: check
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
|
|
{
|
|
path: "/login",
|
|
component: login
|
|
},
|
|
{
|
|
path: '/tbCourse',
|
|
component: tb_course
|
|
},
|
|
{
|
|
path: '/labApplyDetail/:id',
|
|
component: labApplyDetail,
|
|
props: true
|
|
}
|
|
]
|
|
|
|
let router = new VueRouter({
|
|
routes
|
|
})
|
|
export default router;
|