123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287 |
- import Vue from 'vue'
- import VueRouter from 'vue-router'
- //解决重复点击导航栏报错问题
- const originalPush = VueRouter.prototype.push
- VueRouter.prototype.push = function push(location) {
- return originalPush.call(this, location).catch(err => err)
- }
- Vue.use(VueRouter)
- const routes = [{
- path: '/index',
- name: '初始页',
- component: () => import(/* webpackChunkName: "index" */'@/index'),
- redirect: "home",
- children: [
- {
- path: '/home',
- name: '首页',
- id:'0',
- component: () => import(/* webpackChunkName: "home" */'@/home'),
- meta: {
- icon: 'icon-shezhi_zuzhijiagou',
- groupCode:'home',
- }
- },
- {
- path: '/award_punish',
- name: '我奖扣的',
- component: () => import(/* webpackChunkName: "award_punish" */'@/views/abPoint/award_punish.vue'),
- meta: {
- icon: 'icon-shezhi_zuzhijiagou',
- groupCode:'abPoint',
- jurisdiction :['employee']//什么权限隐藏
- }
- },
- {
- path: '/apply_list',
- name: '我申请的',
- component: () => import(/* webpackChunkName: "apply_list" */'@/views/abPoint/apply_list.vue'),
- meta: {
- icon: 'icon-shezhi_zuzhijiagou',
- groupCode:'abPoint',
- jurisdiction :['creator']
- }
- },
- {
- path: '/my_issue',
- name: '我发布的',
- component: () => import(/* webpackChunkName: "my_issue" */'@/views/task/my_issue.vue'),
- meta: {
- icon: 'icon-PC_gongzuotai_renwu',
- groupCode:'task',
- jurisdiction :['employee']
- }
- },
- {
- path: '/get_task',
- name: '领任务',
- component: () => import(/* webpackChunkName: "get_task" */'@/views/task/get_task.vue'),
- meta: {
- icon: 'icon-PC_gongzuotai_renwu',
- groupCode:'task',
- }
- },
- {
- path: '/my_task',
- name: '我的任务',
- component: () => import(/* webpackChunkName: "my_task" */'@/views/task/my_task.vue'),
- meta: {
- icon: 'icon-PC_gongzuotai_renwu',
- groupCode:'task',
- jurisdiction :['creator']
- }
- },
- {
- path: '/dept_rank',
- name: '阶段排名',
- component: () => import(/* webpackChunkName: "dept_rank" */'@/views/ranking/dept_rank.vue'),
- meta: {
- icon: 'icon-shezhi_zuzhijiagou',
- groupCode:'ranking',
- }
- },
- {
- path: '/total_rank',
- name: '累计B分排名',
- component: () => import(/* webpackChunkName: "total_rank" */'@/views/ranking/total_rank.vue'),
- meta: {
- icon: 'icon-shezhi_jiaose',
- groupCode:'ranking',
- }
- },
- {
- path: '/attendance_rating',
- name: '考勤分排名',
- component: () => import(/* webpackChunkName: "attendance_rating" */'@/views/ranking/attendance_rating.vue'),
- meta: {
- icon: 'icon-shezhi_jiaose',
- groupCode:'ranking',
- }
- },
- {
- path: '/custom_rank',
- name: '自定义分组B分排名',
- component: () => import(/* webpackChunkName: "custom_rank" */'@/views/ranking/custom_rank.vue'),
- meta: {
- icon: 'icon-shezhi_jichushezhi',
- groupCode:'ranking',
- }
- },
- {
- path: '/manager_statistics',
- name: '管理者奖扣',
- component: () => import(/* webpackChunkName: "manager_statistics" */'@/views/ranking/manager_statistics.vue'),
- meta: {
- icon: 'icon-shezhi_jichushezhi',
- groupCode:'ranking',
- jurisdiction :['employee']
- }
- },
- {
- path: '/integral_event',
- name: '积分事件',
- component: () => import(/* webpackChunkName: "integral_event" */'@/views/ranking/integral_event.vue'),
- meta: {
- icon: 'icon-shezhi_jifenguize',
- groupCode:'ranking',
- groupName:"统计",
- }
- },
- {
- path: '/individual_statistics',
- name: '个人统计',
- component: () => import(/* webpackChunkName: "individual_statistics" */'@/views/ranking/individual_statistics.vue'),
- meta: {
- icon: 'icon-shezhi_jichushezhi',
- groupCode:'ranking',
- }
- },
- {
- path: '/department_statistics',
- name: '部门统计',
- component: () => import(/* webpackChunkName: "department_statistics" */'@/views/ranking/department_statistics.vue'),
- meta: {
- icon: 'icon-shezhi_jichushezhi',
- groupCode:'ranking',
- jurisdiction :['employee']
- }
- },
- {
- path: '/lotteryTicket_statistics',
- name: '奖票统计',
- component: () => import(/* webpackChunkName: "lotteryTicket_statistics" */'@/views/ranking/lotteryTicket_statistics'),
- meta: {
- icon: 'icon-shezhi_jichushezhi',
- groupCode:'ranking',
- jurisdiction :['dept_manager','employee']
- }
- },
- {
- path: '/framework',
- name: '组织架构',
- component: () => import(/* webpackChunkName: "framework" */'@/views/set/framework.vue'),
- meta: {
- icon: 'icon-shezhi_zuzhijiagou',
- groupCode:'set',
- jurisdiction :['dept_manager','employee']
- }
- },
- {
- path: '/jurisdiction',
- name: '角色权限',
- component: () => import(/* webpackChunkName: "jurisdiction" */'@/views/set/jurisdiction.vue'),
- meta: {
- icon: 'icon-shezhi_jiaose',
- groupCode:'set',
- jurisdiction :['dept_manager','employee']
- }
- },
- {
- path: '/rule',
- name: '积分规则',
- component: () => import(/* webpackChunkName: "rule" */'@/views/set/rule.vue'),
- meta: {
- icon: 'icon-shezhi_jifenguize',
- groupCode:'set',
- groupName:"设置",
- jurisdiction :['dept_manager','employee']
- }
- },
- {
- path: '/initialPoint',
- name: '初始分',
- component: () => import(/* webpackChunkName: "initialPoint" */'@/views/set/initialPoint.vue'),
- meta: {
- icon: 'icon-shezhi_jichushezhi',
- groupCode:'set',
- jurisdiction :['dept_manager','employee']
- }
- },
- {
- path: '/check',
- name: '考勤积分',
- component: () => import(/* webpackChunkName: "check" */'@/views/set/check.vue'),
- meta: {
- icon: 'icon-kaoqin_kaoqinyuebaobiao',
- groupCode:'set',
- jurisdiction :['dept_manager','employee']
- }
- },
- {
- path: '/voluntarilyPoint',
- name: '自动积分',
- component: () => import(/* webpackChunkName: "voluntarilyPoint" */'@/views/set/voluntarilyPoint.vue'),
- meta: {
- icon: 'icon-shezhi_zidongjifen',
- groupCode:'set',
- jurisdiction :['dept_manager','employee']
- }
- },
- {
- path: '/log',
- name: '日志设置',
- component: () => import(/* webpackChunkName: "log" */'@/views/set/log.vue'),
- meta: {
- icon: 'icon-shezhi_xitongpeizhi',
- groupCode:'set',
- jurisdiction :['dept_manager','employee']
- }
- },
- {
- path: '/systemLayout',
- name: '系统配置',
- component: () => import(/* webpackChunkName: "systemLayout" */'@/views/set/systemLayout.vue'),
- meta: {
- icon: 'icon-shezhi_xitongpeizhi',
- groupCode:'set',
- jurisdiction :['dept_manager','employee']
- }
- },
- {
- path: '/update_notice',
- name: '公告列表',
- component: () => import(/* webpackChunkName: "update_notice" */'@/views/subassembly/update_notice.vue'),
- hidden: true,//侧边栏隐藏
- meta: {
- icon: 'icon-shezhi_gongdaolbiao',
- groupCode:'abPoint',
- }
- },
- {
- path: '/approval_list',
- name: '审批',
- component: () => import(/* webpackChunkName: "approval_list" */'@/views/workbench/approval_list.vue'),
- meta: {
- icon: 'icon-shezhi_gongdaolbiao',
- groupCode:'workbench',
- }
- },
- ]
- },
- {
- path: '/',
- name: '初始化',
- component: () => import(/* webpackChunkName: "init" */'@/init'),
- },
- {
- path: '/noAccess',
- name: '无权限',
- component: () => import(/* webpackChunkName: "noAccess" */'@/noAccess'),
- },
- {
- path: '/deptRankSwiper',
- name: '轮播',
- component: () => import(/* webpackChunkName: "deptRankSwiper" */'@/views/ranking/deptRankSwiper.vue'),
- },
- ]
- const router = new VueRouter({
- // mode: 'history',
- base: process.env.BASE_URL,
- routes
- })
- export default router
|