index.js 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. import Vue from 'vue'
  2. import VueRouter from 'vue-router'
  3. //解决重复点击导航栏报错问题
  4. const originalPush = VueRouter.prototype.push
  5. VueRouter.prototype.push = function push(location) {
  6. return originalPush.call(this, location).catch(err => err)
  7. }
  8. Vue.use(VueRouter)
  9. const routes = [{
  10. path: '/index',
  11. name: '初始页',
  12. component: () => import('@/index'),
  13. redirect: "framework",
  14. children: [
  15. // {
  16. // path: '/home',
  17. // name: '首页',
  18. // component: () => import('@/home'),
  19. // meta: {
  20. // icon: 'icon-shezhi_zuzhijiagou',
  21. // groupCode:'home'
  22. // }
  23. // },
  24. // {
  25. // path: '/award_punish',
  26. // name: '我奖扣的',
  27. // component: () => import('@/views/abPoint/award_punish.vue'),
  28. // meta: {
  29. // icon: 'icon-shezhi_zuzhijiagou',
  30. // groupCode:'abPoint'
  31. // }
  32. // },
  33. // {
  34. // path: '/apply_list',
  35. // name: '我申请的',
  36. // component: () => import('@/views/abPoint/apply_list.vue'),
  37. // meta: {
  38. // icon: 'icon-shezhi_zuzhijiagou',
  39. // groupCode:'abPoint'
  40. // }
  41. // },
  42. {
  43. path: '/framework',
  44. name: '组织架构',
  45. component: () => import('@/views/set/framework.vue'),
  46. meta: {
  47. icon: 'icon-shezhi_zuzhijiagou',
  48. groupCode:'set'
  49. }
  50. },
  51. {
  52. path: '/jurisdiction',
  53. name: '角色权限',
  54. component: () => import('@/views/set/jurisdiction.vue'),
  55. meta: {
  56. icon: 'icon-shezhi_jiaose',
  57. groupCode:'set'
  58. }
  59. },
  60. {
  61. path: '/rule',
  62. name: '积分规则',
  63. component: () => import('@/views/set/rule.vue'),
  64. meta: {
  65. icon: 'icon-shezhi_jifenguize',
  66. groupCode:'set',
  67. groupName:"设置"
  68. }
  69. },
  70. {
  71. path: '/initialPoint',
  72. name: '初始分',
  73. component: () => import('@/views/set/initialPoint.vue'),
  74. meta: {
  75. icon: 'icon-shezhi_jichushezhi',
  76. groupCode:'set',
  77. }
  78. },
  79. {
  80. path: '/check',
  81. name: '考勤积分',
  82. component: () => import('@/views/set/check.vue'),
  83. meta: {
  84. icon: 'icon-kaoqin_kaoqinyuebaobiao',
  85. groupCode:'set'
  86. }
  87. },
  88. {
  89. path: '/voluntarilyPoint',
  90. name: '自动积分',
  91. component: () => import('@/views/set/voluntarilyPoint.vue'),
  92. meta: {
  93. icon: 'icon-shezhi_zidongjifen',
  94. groupCode:'set'
  95. }
  96. },
  97. {
  98. path: '/integral_event',
  99. name: '积分事件',
  100. component: () => import('@/views/ranking/integral_event.vue'),
  101. meta: {
  102. icon: 'icon-shezhi_jifenguize',
  103. groupCode:'ranking',
  104. groupName:"统计"
  105. }
  106. },
  107. {
  108. path: '/dept_rank',
  109. name: '部门排名',
  110. component: () => import('@/views/ranking/dept_rank.vue'),
  111. meta: {
  112. icon: 'icon-shezhi_zuzhijiagou',
  113. groupCode:'ranking'
  114. }
  115. },
  116. {
  117. path: '/total_rank',
  118. name: '累计B分排名',
  119. component: () => import('@/views/ranking/total_rank.vue'),
  120. meta: {
  121. icon: 'icon-shezhi_jiaose',
  122. groupCode:'ranking'
  123. }
  124. },
  125. {
  126. path: '/custom_rank',
  127. name: '自定义分组B分排名',
  128. component: () => import('@/views/ranking/custom_rank.vue'),
  129. meta: {
  130. icon: 'icon-shezhi_jichushezhi',
  131. groupCode:'ranking'
  132. }
  133. },
  134. // {
  135. // path: '/manager_statistics',
  136. // name: '管理者奖扣',
  137. // component: () => import('@/views/ranking/manager_statistics.vue'),
  138. // meta: {
  139. // icon: 'icon-shezhi_jichushezhi',
  140. // groupCode:'ranking'
  141. // }
  142. // },
  143. // {
  144. // path: '/department_statistics',
  145. // name: '部门统计',
  146. // component: () => import('@/views/ranking/department_statistics.vue'),
  147. // meta: {
  148. // icon: 'icon-shezhi_jichushezhi',
  149. // groupCode:'ranking'
  150. // }
  151. // },
  152. // {
  153. // path: '/individual_statistics',
  154. // name: '个人统计',
  155. // component: () => import('@/views/ranking/individual_statistics.vue'),
  156. // meta: {
  157. // icon: 'icon-shezhi_jichushezhi',
  158. // groupCode:'ranking'
  159. // }
  160. // }
  161. ]
  162. },
  163. {
  164. path: '/',
  165. name: '初始化',
  166. component: () => import('@/init'),
  167. },
  168. {
  169. path: '/noAccess',
  170. name: '无权限',
  171. component: () => import('@/noAccess'),
  172. },
  173. {
  174. path: '/deptRankSwiper',
  175. name: '轮播',
  176. component: () => import('@/views/ranking/deptRankSwiper.vue'),
  177. },
  178. ]
  179. const router = new VueRouter({
  180. // mode: 'history',
  181. base: process.env.BASE_URL,
  182. routes
  183. })
  184. export default router