76 lines
1.7 KiB
JavaScript
76 lines
1.7 KiB
JavaScript
// 模板自带的功能路由表
|
|
import login from "../views/login/index.vue";
|
|
import Layout from "../layout/index.vue";
|
|
const routerList = [
|
|
{
|
|
path: "/login",
|
|
name: login,
|
|
component: login,
|
|
},
|
|
{
|
|
path: "/",
|
|
component: Layout,
|
|
name: "container",
|
|
redirect: "home",
|
|
meta: {
|
|
requiresAuth: true, //有一些页面是否登录才能进去
|
|
name: "首页",
|
|
},
|
|
children: [
|
|
{
|
|
path: "/home",
|
|
name: "home",
|
|
component: () => import("../views/home/index.vue"),
|
|
meta: {
|
|
requiresAuth: true, //有一些页面是否登录才能进去
|
|
name: "首页",
|
|
},
|
|
},
|
|
],
|
|
},
|
|
{
|
|
path: "/group",
|
|
name: "employe",
|
|
component: Layout,
|
|
meta: {
|
|
requiresAuth: true, //有一些页面是否登录才能进去
|
|
name: "组别管理",
|
|
},
|
|
children: [
|
|
{
|
|
path: "/groupManagement",
|
|
name: "groupManagement",
|
|
component: () => import("../views/groupManagement/index.vue"),
|
|
meta: {
|
|
requiresAuth: true,
|
|
name: "组别管理",
|
|
},
|
|
},
|
|
],
|
|
},
|
|
{
|
|
path: '/performance',
|
|
component: Layout,
|
|
name: 'Performance',
|
|
meta: {
|
|
name: "绩效考勤",
|
|
title: '绩效考勤',
|
|
icon: 'el-icon-s-data',
|
|
roles: [2] // 只有role=2的用户可以查看
|
|
},
|
|
children: [
|
|
{
|
|
path: 'attendance/general',
|
|
name: 'AttendanceGeneral',
|
|
component: () => import('../views/performance/attendance/general/index.vue'),
|
|
meta: {
|
|
name: "综合部初审列表",
|
|
title: '综合部初审列表',
|
|
roles: [2] // 只有role=2的用户可以查看
|
|
}
|
|
}
|
|
]
|
|
},
|
|
];
|
|
export default routerList;
|