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.
141 lines
3.6 KiB
141 lines
3.6 KiB
import Vue from 'vue'
|
|
import VueRouter from 'vue-router'
|
|
import Login from '../views/Login'
|
|
import StudentUserIndex from '../views/StudentUserIndex'
|
|
import StudentHistory from '../views/StudentHistory'
|
|
import StudentApplication from '../views/StudentApplication'
|
|
import StudentAppForm from '../views/StudentAppForm'
|
|
import TeacherUserIndex from "../views/TeacherUserIndex";
|
|
import TeacherApplication from "../views/TeacherApplication";
|
|
import TeacherHistory from "../views/TeacherHistory";
|
|
import OuterUserIndex from "../views/OuterUserIndex";
|
|
import OuterHistory from "../views/OuterHistory";
|
|
import OuterAppForm from "../views/OuterAppForm";
|
|
import OuterAppDetail from "../views/OuterAppDetail";
|
|
import NoAuthority from "../views/NoAuthority";
|
|
import SetComment from "../views/SetComment"
|
|
import GetComment from "../views/GetComment"
|
|
import DataAnalysis from "../views/DataAnalysis";
|
|
import StudentAnalysis from "../views/StudentAnalysis";
|
|
import RegisterApplication from "../views/RegisterApplication";
|
|
|
|
|
|
Vue.use(VueRouter)
|
|
|
|
const routes = [
|
|
{
|
|
path: "/",
|
|
name: "主页面",
|
|
component: Login
|
|
},
|
|
{
|
|
path: '/user/student/:id',
|
|
name: '学生用户主界面',
|
|
component: StudentUserIndex,
|
|
redirect:"/user/student/:id/history",
|
|
children:[
|
|
{
|
|
path: "/user/student/:id/history",
|
|
name: "外出历史",
|
|
component: StudentHistory
|
|
},
|
|
{
|
|
path: "/user/student/:id/application",
|
|
name: "申请记录",
|
|
component: StudentApplication
|
|
},
|
|
{
|
|
path: "/user/student/:id/appForm",
|
|
name: "填写申请表单",
|
|
component: StudentAppForm
|
|
},
|
|
{
|
|
path: "/user/student/:id/setComment",
|
|
name: "匿名评论",
|
|
component: SetComment
|
|
},
|
|
{
|
|
path: "/user/student/:id/studentAnalysis",
|
|
name: "学生请假数据分析",
|
|
component: StudentAnalysis
|
|
},
|
|
|
|
]
|
|
},
|
|
{
|
|
path: '/user/teacher/:id',
|
|
name: '教师用户主界面',
|
|
component: TeacherUserIndex,
|
|
redirect:"/user/teacher/:id/history",
|
|
children:[
|
|
{
|
|
path: "/user/teacher/:id/history",
|
|
name: "批假历史",
|
|
component: TeacherHistory
|
|
},
|
|
{
|
|
path: "/user/teacher/:id/application",
|
|
name: "处理批假申请",
|
|
component: TeacherApplication
|
|
},
|
|
{
|
|
path: "/user/teacher/:id/setComment",
|
|
name: "教师匿名评论",
|
|
component: SetComment
|
|
}
|
|
]
|
|
},
|
|
{
|
|
path: '/user/outer/:id',
|
|
name: '外出批准用户主界面',
|
|
component: OuterUserIndex,
|
|
redirect: "/user/outer/:id/history",
|
|
children: [
|
|
{
|
|
path: "/user/outer/:id/history",
|
|
name: "外出批准历史",
|
|
component: OuterHistory
|
|
},
|
|
{
|
|
path: "/user/outer/:id/appForm",
|
|
name: "处理外出申请",
|
|
component: OuterAppForm
|
|
},
|
|
{
|
|
path: "/user/outer/:id/appDetail/",
|
|
name: "外出申请详情",
|
|
component: OuterAppDetail
|
|
},
|
|
{
|
|
path: "/user/outer/:id/getComment",
|
|
name: "查看评论",
|
|
component: GetComment
|
|
},
|
|
{
|
|
path: "/user/outer/:id/dataAnalysis/",
|
|
name: "请假数据分析",
|
|
component: DataAnalysis
|
|
},
|
|
{
|
|
path: "/user/outer/:id/registerApplication",
|
|
name: "注册申请审批",
|
|
component: RegisterApplication
|
|
}
|
|
]
|
|
},
|
|
{
|
|
path: '/noAuthority',
|
|
name: "无权限",
|
|
component: NoAuthority
|
|
}
|
|
|
|
]
|
|
|
|
const router = new VueRouter({
|
|
mode: 'history',
|
|
base: process.env.BASE_URL,
|
|
routes
|
|
})
|
|
|
|
export default router
|