index.js 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287
  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(/* webpackChunkName: "index" */'@/index'),
  13. redirect: "home",
  14. children: [
  15. {
  16. path: '/home',
  17. name: '首页',
  18. id:'0',
  19. component: () => import(/* webpackChunkName: "home" */'@/home'),
  20. meta: {
  21. icon: 'icon-shezhi_zuzhijiagou',
  22. groupCode:'home',
  23. }
  24. },
  25. {
  26. path: '/award_punish',
  27. name: '我奖扣的',
  28. component: () => import(/* webpackChunkName: "award_punish" */'@/views/abPoint/award_punish.vue'),
  29. meta: {
  30. icon: 'icon-shezhi_zuzhijiagou',
  31. groupCode:'abPoint',
  32. jurisdiction :['employee']//什么权限隐藏
  33. }
  34. },
  35. {
  36. path: '/apply_list',
  37. name: '我申请的',
  38. component: () => import(/* webpackChunkName: "apply_list" */'@/views/abPoint/apply_list.vue'),
  39. meta: {
  40. icon: 'icon-shezhi_zuzhijiagou',
  41. groupCode:'abPoint',
  42. jurisdiction :['creator']
  43. }
  44. },
  45. {
  46. path: '/my_issue',
  47. name: '我发布的',
  48. component: () => import(/* webpackChunkName: "my_issue" */'@/views/task/my_issue.vue'),
  49. meta: {
  50. icon: 'icon-PC_gongzuotai_renwu',
  51. groupCode:'task',
  52. jurisdiction :['employee']
  53. }
  54. },
  55. {
  56. path: '/get_task',
  57. name: '领任务',
  58. component: () => import(/* webpackChunkName: "get_task" */'@/views/task/get_task.vue'),
  59. meta: {
  60. icon: 'icon-PC_gongzuotai_renwu',
  61. groupCode:'task',
  62. }
  63. },
  64. {
  65. path: '/my_task',
  66. name: '我的任务',
  67. component: () => import(/* webpackChunkName: "my_task" */'@/views/task/my_task.vue'),
  68. meta: {
  69. icon: 'icon-PC_gongzuotai_renwu',
  70. groupCode:'task',
  71. jurisdiction :['creator']
  72. }
  73. },
  74. {
  75. path: '/dept_rank',
  76. name: '阶段排名',
  77. component: () => import(/* webpackChunkName: "dept_rank" */'@/views/ranking/dept_rank.vue'),
  78. meta: {
  79. icon: 'icon-shezhi_zuzhijiagou',
  80. groupCode:'ranking',
  81. }
  82. },
  83. {
  84. path: '/total_rank',
  85. name: '累计B分排名',
  86. component: () => import(/* webpackChunkName: "total_rank" */'@/views/ranking/total_rank.vue'),
  87. meta: {
  88. icon: 'icon-shezhi_jiaose',
  89. groupCode:'ranking',
  90. }
  91. },
  92. {
  93. path: '/attendance_rating',
  94. name: '考勤分排名',
  95. component: () => import(/* webpackChunkName: "attendance_rating" */'@/views/ranking/attendance_rating.vue'),
  96. meta: {
  97. icon: 'icon-shezhi_jiaose',
  98. groupCode:'ranking',
  99. }
  100. },
  101. {
  102. path: '/custom_rank',
  103. name: '自定义分组B分排名',
  104. component: () => import(/* webpackChunkName: "custom_rank" */'@/views/ranking/custom_rank.vue'),
  105. meta: {
  106. icon: 'icon-shezhi_jichushezhi',
  107. groupCode:'ranking',
  108. }
  109. },
  110. {
  111. path: '/manager_statistics',
  112. name: '管理者奖扣',
  113. component: () => import(/* webpackChunkName: "manager_statistics" */'@/views/ranking/manager_statistics.vue'),
  114. meta: {
  115. icon: 'icon-shezhi_jichushezhi',
  116. groupCode:'ranking',
  117. jurisdiction :['employee']
  118. }
  119. },
  120. {
  121. path: '/integral_event',
  122. name: '积分事件',
  123. component: () => import(/* webpackChunkName: "integral_event" */'@/views/ranking/integral_event.vue'),
  124. meta: {
  125. icon: 'icon-shezhi_jifenguize',
  126. groupCode:'ranking',
  127. groupName:"统计",
  128. }
  129. },
  130. {
  131. path: '/individual_statistics',
  132. name: '个人统计',
  133. component: () => import(/* webpackChunkName: "individual_statistics" */'@/views/ranking/individual_statistics.vue'),
  134. meta: {
  135. icon: 'icon-shezhi_jichushezhi',
  136. groupCode:'ranking',
  137. }
  138. },
  139. {
  140. path: '/department_statistics',
  141. name: '部门统计',
  142. component: () => import(/* webpackChunkName: "department_statistics" */'@/views/ranking/department_statistics.vue'),
  143. meta: {
  144. icon: 'icon-shezhi_jichushezhi',
  145. groupCode:'ranking',
  146. jurisdiction :['employee']
  147. }
  148. },
  149. {
  150. path: '/lotteryTicket_statistics',
  151. name: '奖票统计',
  152. component: () => import(/* webpackChunkName: "lotteryTicket_statistics" */'@/views/ranking/lotteryTicket_statistics'),
  153. meta: {
  154. icon: 'icon-shezhi_jichushezhi',
  155. groupCode:'ranking',
  156. jurisdiction :['dept_manager','employee']
  157. }
  158. },
  159. {
  160. path: '/framework',
  161. name: '组织架构',
  162. component: () => import(/* webpackChunkName: "framework" */'@/views/set/framework.vue'),
  163. meta: {
  164. icon: 'icon-shezhi_zuzhijiagou',
  165. groupCode:'set',
  166. jurisdiction :['dept_manager','employee']
  167. }
  168. },
  169. {
  170. path: '/jurisdiction',
  171. name: '角色权限',
  172. component: () => import(/* webpackChunkName: "jurisdiction" */'@/views/set/jurisdiction.vue'),
  173. meta: {
  174. icon: 'icon-shezhi_jiaose',
  175. groupCode:'set',
  176. jurisdiction :['dept_manager','employee']
  177. }
  178. },
  179. {
  180. path: '/rule',
  181. name: '积分规则',
  182. component: () => import(/* webpackChunkName: "rule" */'@/views/set/rule.vue'),
  183. meta: {
  184. icon: 'icon-shezhi_jifenguize',
  185. groupCode:'set',
  186. groupName:"设置",
  187. jurisdiction :['dept_manager','employee']
  188. }
  189. },
  190. {
  191. path: '/initialPoint',
  192. name: '初始分',
  193. component: () => import(/* webpackChunkName: "initialPoint" */'@/views/set/initialPoint.vue'),
  194. meta: {
  195. icon: 'icon-shezhi_jichushezhi',
  196. groupCode:'set',
  197. jurisdiction :['dept_manager','employee']
  198. }
  199. },
  200. {
  201. path: '/check',
  202. name: '考勤积分',
  203. component: () => import(/* webpackChunkName: "check" */'@/views/set/check.vue'),
  204. meta: {
  205. icon: 'icon-kaoqin_kaoqinyuebaobiao',
  206. groupCode:'set',
  207. jurisdiction :['dept_manager','employee']
  208. }
  209. },
  210. {
  211. path: '/voluntarilyPoint',
  212. name: '自动积分',
  213. component: () => import(/* webpackChunkName: "voluntarilyPoint" */'@/views/set/voluntarilyPoint.vue'),
  214. meta: {
  215. icon: 'icon-shezhi_zidongjifen',
  216. groupCode:'set',
  217. jurisdiction :['dept_manager','employee']
  218. }
  219. },
  220. {
  221. path: '/log',
  222. name: '日志设置',
  223. component: () => import(/* webpackChunkName: "log" */'@/views/set/log.vue'),
  224. meta: {
  225. icon: 'icon-shezhi_xitongpeizhi',
  226. groupCode:'set',
  227. jurisdiction :['dept_manager','employee']
  228. }
  229. },
  230. {
  231. path: '/systemLayout',
  232. name: '系统配置',
  233. component: () => import(/* webpackChunkName: "systemLayout" */'@/views/set/systemLayout.vue'),
  234. meta: {
  235. icon: 'icon-shezhi_xitongpeizhi',
  236. groupCode:'set',
  237. jurisdiction :['dept_manager','employee']
  238. }
  239. },
  240. {
  241. path: '/update_notice',
  242. name: '公告列表',
  243. component: () => import(/* webpackChunkName: "update_notice" */'@/views/subassembly/update_notice.vue'),
  244. hidden: true,//侧边栏隐藏
  245. meta: {
  246. icon: 'icon-shezhi_gongdaolbiao',
  247. groupCode:'abPoint',
  248. }
  249. },
  250. {
  251. path: '/approval_list',
  252. name: '审批',
  253. component: () => import(/* webpackChunkName: "approval_list" */'@/views/workbench/approval_list.vue'),
  254. meta: {
  255. icon: 'icon-shezhi_gongdaolbiao',
  256. groupCode:'workbench',
  257. }
  258. },
  259. ]
  260. },
  261. {
  262. path: '/',
  263. name: '初始化',
  264. component: () => import(/* webpackChunkName: "init" */'@/init'),
  265. },
  266. {
  267. path: '/noAccess',
  268. name: '无权限',
  269. component: () => import(/* webpackChunkName: "noAccess" */'@/noAccess'),
  270. },
  271. {
  272. path: '/deptRankSwiper',
  273. name: '轮播',
  274. component: () => import(/* webpackChunkName: "deptRankSwiper" */'@/views/ranking/deptRankSwiper.vue'),
  275. },
  276. ]
  277. const router = new VueRouter({
  278. // mode: 'history',
  279. base: process.env.BASE_URL,
  280. routes
  281. })
  282. export default router