123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491 |
- import Vue from 'vue'
- import Router from 'vue-router'
- Vue.use(Router)
- /* Layout */
- import Layout from '@/views/layout/Layout'
- export const constantRouterMap = [
- {
- path: '/l',
- name: 'l',
- component: () => import('@/views/l'),
- hidden: true
- },
- {
- path: '/invite_new_company',
- name: 'invite_new_company',
- component: () => import('@/views/login/invite_new_company'),
- hidden: false
- },
- {
- path: '/login',
- name: 'login',
- component: () => import('@/views/login/index1'),
- hidden: true,
- meta: { pushindex : true},
- },
- {
- path: '/loginTransfer',
- name: 'loginTransfer',
- component: () => import('@/views/login/loginTransfer'),
- hidden: true,
- },
- // {
- // path: '/login',
- // name: 'login',
- // component: () => import('@/views/login/index'),
- // hidden: true
- // },
- {
- path: '/autoLogin',
- name: 'autoLogin',
- component: () => import('@/views/login/autoLogin'),
- hidden: true
- },
- {
- path: '/reg',
- name: 'reg',
- component: () => import('@/views/login/reg'),
- hidden: true
- },
- {
- path: '/create_company',
- name: 'create_company',
- component: () => import('@/views/login/create_company'),
- hidden: true
- },
- {
- path: '/forgetPwd',
- name: 'forgetPwd',
- component: () => import('@/views/login/forgetPwd'),
- hidden: true
- },
- {
- path: '/deptRankSwiper',
- name: 'deptRankSwiper',
- component: () => import('@/views/login/deptRankSwiper'),
- hidden: true
- },
- {
- path: '/resetPwd',
- name: 'resetPwd',
- component: () => import('@/views/login/resetPwd'),
- hidden: true
- },
- {
- path: '/android',
- name: 'android',
- component: () => import('@/views/login/android_and_ios'),
- hidden: true
- },
- {
- path: '/authredirect',
- component: () => import('@/views/login/authredirect'),
- hidden: true
- },
- {
- path: '/loginbytoken/:token',
- component: () => import('@/views/login/loginbytoken'),
- hidden: true
- },
- {
- path: '/noAccess',
- name: '无权限',
- component: () => import(/* webpackChunkName: "noAccess" */'@/views/noAccess'),
- hidden: true
- },
- {
- path: '/404',
- component: () => import('@/views/errorPage/404'),
- hidden: true
- },
- {
- path: '/401',
- component: () => import('@/views/errorPage/401'),
- hidden: true
- }
- ]
- export default new Router({
- // mode: 'history', // require service support
- scrollBehavior: () => ({ y: 0 }),
- routes: constantRouterMap
- })
- // 这些是要进行过滤的路由,在permission.js里面过滤
- export const asyncRouterMap = [
- {
- path: '/',
- component: Layout,
- redirect: '/index',
- hidden: true, // 不在侧边栏线上
- meta: { title: '首页', icon: 'department', noCache: true},
- children: [
- {
- path: '/index',
- name: 'index',
- component: () => import('@/views/dashboard/index'),
- meta: { title: '首页', icon: 'workCenter', noCache: true }
- }
- ]
- },
- {
- path: '/award_punish',
- component: Layout,
- redirect: '/award_punish',
- meta: { title: '工作台', icon: 'department', show: false, noCache: true},
- children: [
- {
- path: '/workbench',
- name: 'workbench',
- component: () => import('@/views/workbench/workbench'),
- meta: { title: 'A/B分', icon: 'abf', show: true, noCache: true },
- alwaysShow: true, // 一直显示根路由
- children: [
- {
- path: '/award_punish',
- name: 'award_punish',
- component: () => import('@/views/workbench/grade/award_punish'),
- meta: { title: '我奖扣的', noCache: true , jurisdiction:['employee']}
- },
- {
- path: '/apply_list',
- name: 'apply_list',
- component: () => import('@/views/workbench/grade/apply_list'),
- meta: { title: '我的申请', noCache: true , jurisdiction:['creator']}
- },
- ]
- },
- {
- path: '/performance',
- name: 'performance',
- component: () => import('@/views/workbench/workbench'),
- meta: { title: '绩效分', icon: 'jxf', show: true, noCache: true },
- alwaysShow: true, // 一直显示根路由
- children: [
- {
- path: '/team_performance',
- name: 'team_performance',
- component: () => import('@/views/workbench/performance/team_performance'),
- meta: { title: '团队绩效', noCache: true , jurisdiction:['employee']}
- },
- {
- path: '/my_performance',
- name: 'my_performance',
- component: () => import('@/views/workbench/performance/my_performance'),
- meta: { title: '我的绩效', noCache: true , jurisdiction:['creator']}
- },
- {
- path: '/performance_review',
- name: 'performance_review',
- component: () => import('@/views/workbench/performance/performance_review'),
- meta: { title: '绩效评审', noCache: true , jurisdiction:['employee']}
- },
- {
- path: '/examine_unit',
- name: 'examine_unit',
- component: () => import('@/views/workbench/performance/examine_unit'),
- hidden: true, // 不在侧边栏线上
- meta: { title: '绩效评审详情', noCache: true }
- },
- {
- path: '/participation_detail',
- name: 'participation_detail',
- component: () => import('@/views/workbench/performance/participation_detail'),
- hidden: true, // 不在侧边栏线上
- meta: { title: '绩效评审(我参与)详情', noCache: true }
- },
- {
- path: '/team_detail',
- name: 'team_detail',
- component: () => import('@/views/workbench/performance/team_detail'),
- hidden: true, // 不在侧边栏线上
- meta: { title: '团队绩效详情', noCache: true }
- },
- {
- path: '/add_team_performance',
- name: 'add_team_performance',
- component: () => import('@/views/workbench/performance/add_team_performance'),
- hidden: true, // 不在侧边栏线上
- meta: { title: '创建团队月绩效', noCache: true }
- }
- ]
- },
- {
- path: '/task',
- name: 'task',
- component: () => import('@/views/workbench/workbench'),
- meta: { title: '任务', icon: 'rw', show: true, noCache: true },
- alwaysShow: true, // 一直显示根路由
- children: [
- {
- path: '/my_issue',
- name: 'my_issue',
- component: () => import('@/views/workbench/task/my_issue'),
- meta: { title: '我发布的', noCache: true , jurisdiction:['employee']}
- },
- {
- path: '/get_task',
- name: 'get_task',
- component: () => import('@/views/workbench/task/get_task'),
- meta: { title: '领任务', noCache: true }
- },
- {
- path: '/my_task',
- name: 'my_task',
- component: () => import('@/views/workbench/task/my_task'),
- meta: { title: '我的任务', noCache: true , jurisdiction:['creator']}
- }
- ]
- },
- {
- path: '/approval_list',
- name: 'approval_list',
- component: () => import('@/views/workbench/approval_list'),
- meta: { title: '审批', icon: 'set_basics_icon', noCache: true , jurisdiction:['employee']}
- },
- ]
- },
- {
- path: '/attendancenew',
- component: Layout,
- redirect: '/attendance_classnew',
- meta: { title: '考勤', icon: 'attendance_classnew_icon', show: false, noCache: true , jurisdiction:['creator','point_manager','admin','dept_manager','employee'] },
- children: [
- {
- path: '/attendance_classnew',
- name: 'att_schedule',
- component: () => import('@/views/attendance/attendance_classnew'),
- meta: { title: '班次管理', icon: 'attendance_classnew_icon', noCache: true },
- hidden: false
- },
- {
- path: '/attendance_overtime_rulenew',
- name: 'att_ot_rule',
- component: () => import('@/views/attendance/attendance_overtime_rulenew'),
- meta: { title: '加班规则', icon: 'attendance_overtime_rulenew_icon', noCache: true }
- },
- {
- path: '/attendance_groupnew',
- name: 'att_group',
- component: () => import('@/views/attendance/attendance_groupnew'),
- meta: { title: '考勤组', icon: 'attendance_groupnew_icon', noCache: true }
- },
- {
- path: '/attendance_machinenew',
- name: 'att_machine',
- component: () => import('@/views/attendance/attendance_machinenew'),
- meta: { title: '考勤机', icon: 'attendance_machinenew_icon', noCache: true }
- },
- // {
- // path: '/attendance_data',
- // name: 'attendance_data',
- // component: () => import('@/views/integral/AttendanceManage'),
- // meta: { title: '考勤统计', icon: 'data', noCache: true }
- // },
- {
- path: '/attendance_datanew',
- name: 'att_sign_daily',
- component: () => import('@/views/attendance/attendance_datanew'),
- meta: { title: '日打卡明细', icon: 'attendance_datanew_icon', noCache: true }
- },
- {
- path: '/attendance_statisticnew',
- name: 'att_report_monthly',
- component: () => import('@/views/attendance/attendance_statisticnew'),
- meta: { title: '考勤月报表', icon: 'attendance_statisticnew_icon', noCache: true }
- },
- {
- path: '/attendance_reviewnew',
- name: 'att_review',
- component: () => import('@/views/attendance/attendance_reviewnew'),
- meta: { title: '考勤审批', icon: 'attendance_reviewnew_icon', noCache: true }
- },
- // {
- // path: '/attendance_setting',
- // name: 'attendance_setting',
- // component: () => import('@/views/attendance/attendance_setting'),
- // meta: { title: '考勤设置', icon: 'sys', noCache: true }
- // }
- // {
- // path: '/attendance_settingnew',
- // name: 'attendance_settingnew',
- // component: () => import('@/views/attendance/attendance_settingnew'),
- // meta: { title: '考勤设置', icon: 'sys', noCache: true }
- // },
- {
- path: '/attendance_hioldaynew',
- name: 'att_holiday',
- component: () => import('@/views/attendance/attendance_hiolday'),
- meta: { title: '假期管理', icon: 'attendance_hioldaynew_icon', noCache: true }
- },
- {
- path: '/attendance_rating',
- name: 'attendance_rating',
- component: () => import('@/views/attendance/attendance_rating'),
- meta: { title: '考勤分排名', icon: 'attendance_rating_icon', noCache: true }
- },
- {
- path: '/attendance_integral_event',
- name: 'attendance_integral_event',
- component: () => import('@/views/attendance/attendance_integral_event'),
- meta: { title: '考勤积分事件', icon: 'integral_event_icon', noCache: true }
- }
- ]
- },
- {
- path: '/integral',
- component: Layout,
- redirect: '/dept_rank',
- // hidden: true, // 不在侧边栏线上
- meta: { title: '统计', icon: 'department', show: false, noCache: true },
- children: [
- {
- path: '/workbench',
- name: 'ranking',
- component: () => import('@/views/workbench/workbench'),
- meta: { title: '排名', icon: 'Statistical_rankings', show: true, noCache: true },
- alwaysShow: true, // 一直显示根路由
- children: [
- {
- path: '/dept_rank',
- name: 'dept_rank',
- component: () => import('@/views/statistics_new/dept_rank'),
- meta: { title: '阶段排名', noCache: true }
- },
- {
- path: '/total_rank',
- name: 'total_rank',
- component: () => import('@/views/statistics_new/total_rank'),
- meta: { title: '累计B分排名', noCache: true }
- },
- {
- path: '/custom_rank',
- name: 'custom_rank',
- component: () => import('@/views/statistics_new/custom_rank'),
- meta: { title: '自定义B分排名', noCache: true }
- }
- ]
- },
- {
- path: '/integral_statistics',
- name: 'integral_statistics',
- component: () => import('@/views/statistics_new/integral_statistics'),
- meta: { title: '积分统计', icon: 'integral_statistics_icon', noCache: true , jurisdiction:['employee'] ,}
- // hidden: true
- },
- {
- path: '/manager_statistics',
- name: 'manager_statistics',
- component: () => import('@/views/statistics_new/manager_statistics'),
- meta: { title: '管理者奖扣', icon: 'manager_statistics_icon', noCache: true , jurisdiction:['employee'] ,}
- },
- {
- path: '/integral_event',
- name: 'integral_event',
- component: () => import('@/views/statistics_new/integral_event'),
- meta: { title: '积分事件', icon: 'integral_event_icon', noCache: true }
- },
- {
- path: '/balanceA',
- name: 'balanceA',
- component: () => import('@/views/statistics_new/balanceA'),
- meta: { title: 'A分余额', icon: 'A_points', noCache: true , jurisdiction:['dept_manager','employee'] ,}
- },
- {
- path: '/department_statistics',
- name: 'department_statistics',
- component: () => import('@/views/statistics_new/department_statistics'),
- meta: { title: '部门统计', icon: 'department_statistics', noCache: true , jurisdiction:['employee']}
- },
- {
- path: '/individual_statistics',
- name: 'individual_statistics',
- component: () => import('@/views/statistics_new/individual_statistics'),
- meta: { title: '个人统计', icon: 'individual_statistics', noCache: true }
- },
- {
- path: '/lotteryTicket_statistics',
- name: 'lotteryTicket_statistics',
- component: () => import('@/views/statistics_new/lotteryTicket_statistics'),
- meta: { title: '奖票统计', icon: 'Lottery_ticket_statistics', noCache: true , jurisdiction:['employee']}
- },
- ]
- },
- {
- path: '/employee',
- component: Layout,
- redirect: '/employee_table',
- // hidden: true, // 不在侧边栏线上
- meta: { title: '设置', icon: 'department', show: false, noCache: true , jurisdiction:['dept_manager','employee'] },
- children: [
- {
- path: '/employee_table',
- name: 'employee_table',
- component: () => import('@/views/integral/EmployeeTable'),
- // component: () => import('@/views/integral/framework'),
- meta: { title: '组织架构', icon: 'employee_table_icon', noCache: true }
- },
- {
- path: '/new_employee',
- name: 'new_employee',
- component: () => import('@/views/setting/new_employee'),
- hidden: true,
- meta: { title: '新成员列表', icon: 'employee_table_icon', noCache: true },
- },
- {
- path: '/set_role',
- name: 'set_role',
- component: () => import('@/views/setting/set_role'),
- meta: { title: '角色权限', icon: 'set_role_icon', noCache: true }
- },
- // {
- // path: '/integral_rule',
- // name: 'integral_rule',
- // component: () => import('@/views/setting/integral_rule'),
- // meta: { title: '积分规则', icon: 'workCenter', noCache: true }
- // },
- {
- path: '/set_basics',
- name: 'set_basics',
- component: () => import('@/views/setting/set_basics'),
- meta: { title: '基础设置', icon: 'set_basics_icon', noCache: true }
- },
- {
- path: '/fixed_integral',
- name: 'fixed_integral',
- component: () => import('@/views/setting/fixed_integral'),
- meta: { title: '自动积分', icon: 'fixed_integral_icon', noCache: true }
- },
- {
- path: '/company_info',
- name: 'company_info',
- component: () => import('@/views/setting/company_info'),
- meta: { title: '企业信息', icon: 'company_info_icon', noCache: true }
- },
- {
- path: '/rule_manage',
- name: 'integral_rule',
- component: () => import('@/views/integral/rule/rule_category'),
- meta: { title: '积分规则', icon: 'rule_manage_icon', noCache: true }
- },
- // {
- // path: '/approver_set',
- // name: 'approver_set',
- // component: () => import('@/views/setting/approver_set'),
- // meta: { title: '审批人设置', icon: 'employee_table_icon', noCache: true }
- // },
- ]
- }
- ]
- // Router.afterEach((to, from) => {
- // wxAuth(to);
- // });
|