index.js 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491
  1. import Vue from 'vue'
  2. import Router from 'vue-router'
  3. Vue.use(Router)
  4. /* Layout */
  5. import Layout from '@/views/layout/Layout'
  6. export const constantRouterMap = [
  7. {
  8. path: '/l',
  9. name: 'l',
  10. component: () => import('@/views/l'),
  11. hidden: true
  12. },
  13. {
  14. path: '/invite_new_company',
  15. name: 'invite_new_company',
  16. component: () => import('@/views/login/invite_new_company'),
  17. hidden: false
  18. },
  19. {
  20. path: '/login',
  21. name: 'login',
  22. component: () => import('@/views/login/index1'),
  23. hidden: true,
  24. meta: { pushindex : true},
  25. },
  26. {
  27. path: '/loginTransfer',
  28. name: 'loginTransfer',
  29. component: () => import('@/views/login/loginTransfer'),
  30. hidden: true,
  31. },
  32. // {
  33. // path: '/login',
  34. // name: 'login',
  35. // component: () => import('@/views/login/index'),
  36. // hidden: true
  37. // },
  38. {
  39. path: '/autoLogin',
  40. name: 'autoLogin',
  41. component: () => import('@/views/login/autoLogin'),
  42. hidden: true
  43. },
  44. {
  45. path: '/reg',
  46. name: 'reg',
  47. component: () => import('@/views/login/reg'),
  48. hidden: true
  49. },
  50. {
  51. path: '/create_company',
  52. name: 'create_company',
  53. component: () => import('@/views/login/create_company'),
  54. hidden: true
  55. },
  56. {
  57. path: '/forgetPwd',
  58. name: 'forgetPwd',
  59. component: () => import('@/views/login/forgetPwd'),
  60. hidden: true
  61. },
  62. {
  63. path: '/deptRankSwiper',
  64. name: 'deptRankSwiper',
  65. component: () => import('@/views/login/deptRankSwiper'),
  66. hidden: true
  67. },
  68. {
  69. path: '/resetPwd',
  70. name: 'resetPwd',
  71. component: () => import('@/views/login/resetPwd'),
  72. hidden: true
  73. },
  74. {
  75. path: '/android',
  76. name: 'android',
  77. component: () => import('@/views/login/android_and_ios'),
  78. hidden: true
  79. },
  80. {
  81. path: '/authredirect',
  82. component: () => import('@/views/login/authredirect'),
  83. hidden: true
  84. },
  85. {
  86. path: '/loginbytoken/:token',
  87. component: () => import('@/views/login/loginbytoken'),
  88. hidden: true
  89. },
  90. {
  91. path: '/noAccess',
  92. name: '无权限',
  93. component: () => import(/* webpackChunkName: "noAccess" */'@/views/noAccess'),
  94. hidden: true
  95. },
  96. {
  97. path: '/404',
  98. component: () => import('@/views/errorPage/404'),
  99. hidden: true
  100. },
  101. {
  102. path: '/401',
  103. component: () => import('@/views/errorPage/401'),
  104. hidden: true
  105. }
  106. ]
  107. export default new Router({
  108. // mode: 'history', // require service support
  109. scrollBehavior: () => ({ y: 0 }),
  110. routes: constantRouterMap
  111. })
  112. // 这些是要进行过滤的路由,在permission.js里面过滤
  113. export const asyncRouterMap = [
  114. {
  115. path: '/',
  116. component: Layout,
  117. redirect: '/index',
  118. hidden: true, // 不在侧边栏线上
  119. meta: { title: '首页', icon: 'department', noCache: true},
  120. children: [
  121. {
  122. path: '/index',
  123. name: 'index',
  124. component: () => import('@/views/dashboard/index'),
  125. meta: { title: '首页', icon: 'workCenter', noCache: true }
  126. }
  127. ]
  128. },
  129. {
  130. path: '/award_punish',
  131. component: Layout,
  132. redirect: '/award_punish',
  133. meta: { title: '工作台', icon: 'department', show: false, noCache: true},
  134. children: [
  135. {
  136. path: '/workbench',
  137. name: 'workbench',
  138. component: () => import('@/views/workbench/workbench'),
  139. meta: { title: 'A/B分', icon: 'abf', show: true, noCache: true },
  140. alwaysShow: true, // 一直显示根路由
  141. children: [
  142. {
  143. path: '/award_punish',
  144. name: 'award_punish',
  145. component: () => import('@/views/workbench/grade/award_punish'),
  146. meta: { title: '我奖扣的', noCache: true , jurisdiction:['employee']}
  147. },
  148. {
  149. path: '/apply_list',
  150. name: 'apply_list',
  151. component: () => import('@/views/workbench/grade/apply_list'),
  152. meta: { title: '我的申请', noCache: true , jurisdiction:['creator']}
  153. },
  154. ]
  155. },
  156. {
  157. path: '/performance',
  158. name: 'performance',
  159. component: () => import('@/views/workbench/workbench'),
  160. meta: { title: '绩效分', icon: 'jxf', show: true, noCache: true },
  161. alwaysShow: true, // 一直显示根路由
  162. children: [
  163. {
  164. path: '/team_performance',
  165. name: 'team_performance',
  166. component: () => import('@/views/workbench/performance/team_performance'),
  167. meta: { title: '团队绩效', noCache: true , jurisdiction:['employee']}
  168. },
  169. {
  170. path: '/my_performance',
  171. name: 'my_performance',
  172. component: () => import('@/views/workbench/performance/my_performance'),
  173. meta: { title: '我的绩效', noCache: true , jurisdiction:['creator']}
  174. },
  175. {
  176. path: '/performance_review',
  177. name: 'performance_review',
  178. component: () => import('@/views/workbench/performance/performance_review'),
  179. meta: { title: '绩效评审', noCache: true , jurisdiction:['employee']}
  180. },
  181. {
  182. path: '/examine_unit',
  183. name: 'examine_unit',
  184. component: () => import('@/views/workbench/performance/examine_unit'),
  185. hidden: true, // 不在侧边栏线上
  186. meta: { title: '绩效评审详情', noCache: true }
  187. },
  188. {
  189. path: '/participation_detail',
  190. name: 'participation_detail',
  191. component: () => import('@/views/workbench/performance/participation_detail'),
  192. hidden: true, // 不在侧边栏线上
  193. meta: { title: '绩效评审(我参与)详情', noCache: true }
  194. },
  195. {
  196. path: '/team_detail',
  197. name: 'team_detail',
  198. component: () => import('@/views/workbench/performance/team_detail'),
  199. hidden: true, // 不在侧边栏线上
  200. meta: { title: '团队绩效详情', noCache: true }
  201. },
  202. {
  203. path: '/add_team_performance',
  204. name: 'add_team_performance',
  205. component: () => import('@/views/workbench/performance/add_team_performance'),
  206. hidden: true, // 不在侧边栏线上
  207. meta: { title: '创建团队月绩效', noCache: true }
  208. }
  209. ]
  210. },
  211. {
  212. path: '/task',
  213. name: 'task',
  214. component: () => import('@/views/workbench/workbench'),
  215. meta: { title: '任务', icon: 'rw', show: true, noCache: true },
  216. alwaysShow: true, // 一直显示根路由
  217. children: [
  218. {
  219. path: '/my_issue',
  220. name: 'my_issue',
  221. component: () => import('@/views/workbench/task/my_issue'),
  222. meta: { title: '我发布的', noCache: true , jurisdiction:['employee']}
  223. },
  224. {
  225. path: '/get_task',
  226. name: 'get_task',
  227. component: () => import('@/views/workbench/task/get_task'),
  228. meta: { title: '领任务', noCache: true }
  229. },
  230. {
  231. path: '/my_task',
  232. name: 'my_task',
  233. component: () => import('@/views/workbench/task/my_task'),
  234. meta: { title: '我的任务', noCache: true , jurisdiction:['creator']}
  235. }
  236. ]
  237. },
  238. {
  239. path: '/approval_list',
  240. name: 'approval_list',
  241. component: () => import('@/views/workbench/approval_list'),
  242. meta: { title: '审批', icon: 'set_basics_icon', noCache: true , jurisdiction:['employee']}
  243. },
  244. ]
  245. },
  246. {
  247. path: '/attendancenew',
  248. component: Layout,
  249. redirect: '/attendance_classnew',
  250. meta: { title: '考勤', icon: 'attendance_classnew_icon', show: false, noCache: true , jurisdiction:['creator','point_manager','admin','dept_manager','employee'] },
  251. children: [
  252. {
  253. path: '/attendance_classnew',
  254. name: 'att_schedule',
  255. component: () => import('@/views/attendance/attendance_classnew'),
  256. meta: { title: '班次管理', icon: 'attendance_classnew_icon', noCache: true },
  257. hidden: false
  258. },
  259. {
  260. path: '/attendance_overtime_rulenew',
  261. name: 'att_ot_rule',
  262. component: () => import('@/views/attendance/attendance_overtime_rulenew'),
  263. meta: { title: '加班规则', icon: 'attendance_overtime_rulenew_icon', noCache: true }
  264. },
  265. {
  266. path: '/attendance_groupnew',
  267. name: 'att_group',
  268. component: () => import('@/views/attendance/attendance_groupnew'),
  269. meta: { title: '考勤组', icon: 'attendance_groupnew_icon', noCache: true }
  270. },
  271. {
  272. path: '/attendance_machinenew',
  273. name: 'att_machine',
  274. component: () => import('@/views/attendance/attendance_machinenew'),
  275. meta: { title: '考勤机', icon: 'attendance_machinenew_icon', noCache: true }
  276. },
  277. // {
  278. // path: '/attendance_data',
  279. // name: 'attendance_data',
  280. // component: () => import('@/views/integral/AttendanceManage'),
  281. // meta: { title: '考勤统计', icon: 'data', noCache: true }
  282. // },
  283. {
  284. path: '/attendance_datanew',
  285. name: 'att_sign_daily',
  286. component: () => import('@/views/attendance/attendance_datanew'),
  287. meta: { title: '日打卡明细', icon: 'attendance_datanew_icon', noCache: true }
  288. },
  289. {
  290. path: '/attendance_statisticnew',
  291. name: 'att_report_monthly',
  292. component: () => import('@/views/attendance/attendance_statisticnew'),
  293. meta: { title: '考勤月报表', icon: 'attendance_statisticnew_icon', noCache: true }
  294. },
  295. {
  296. path: '/attendance_reviewnew',
  297. name: 'att_review',
  298. component: () => import('@/views/attendance/attendance_reviewnew'),
  299. meta: { title: '考勤审批', icon: 'attendance_reviewnew_icon', noCache: true }
  300. },
  301. // {
  302. // path: '/attendance_setting',
  303. // name: 'attendance_setting',
  304. // component: () => import('@/views/attendance/attendance_setting'),
  305. // meta: { title: '考勤设置', icon: 'sys', noCache: true }
  306. // }
  307. // {
  308. // path: '/attendance_settingnew',
  309. // name: 'attendance_settingnew',
  310. // component: () => import('@/views/attendance/attendance_settingnew'),
  311. // meta: { title: '考勤设置', icon: 'sys', noCache: true }
  312. // },
  313. {
  314. path: '/attendance_hioldaynew',
  315. name: 'att_holiday',
  316. component: () => import('@/views/attendance/attendance_hiolday'),
  317. meta: { title: '假期管理', icon: 'attendance_hioldaynew_icon', noCache: true }
  318. },
  319. {
  320. path: '/attendance_rating',
  321. name: 'attendance_rating',
  322. component: () => import('@/views/attendance/attendance_rating'),
  323. meta: { title: '考勤分排名', icon: 'attendance_rating_icon', noCache: true }
  324. },
  325. {
  326. path: '/attendance_integral_event',
  327. name: 'attendance_integral_event',
  328. component: () => import('@/views/attendance/attendance_integral_event'),
  329. meta: { title: '考勤积分事件', icon: 'integral_event_icon', noCache: true }
  330. }
  331. ]
  332. },
  333. {
  334. path: '/integral',
  335. component: Layout,
  336. redirect: '/dept_rank',
  337. // hidden: true, // 不在侧边栏线上
  338. meta: { title: '统计', icon: 'department', show: false, noCache: true },
  339. children: [
  340. {
  341. path: '/workbench',
  342. name: 'ranking',
  343. component: () => import('@/views/workbench/workbench'),
  344. meta: { title: '排名', icon: 'Statistical_rankings', show: true, noCache: true },
  345. alwaysShow: true, // 一直显示根路由
  346. children: [
  347. {
  348. path: '/dept_rank',
  349. name: 'dept_rank',
  350. component: () => import('@/views/statistics_new/dept_rank'),
  351. meta: { title: '阶段排名', noCache: true }
  352. },
  353. {
  354. path: '/total_rank',
  355. name: 'total_rank',
  356. component: () => import('@/views/statistics_new/total_rank'),
  357. meta: { title: '累计B分排名', noCache: true }
  358. },
  359. {
  360. path: '/custom_rank',
  361. name: 'custom_rank',
  362. component: () => import('@/views/statistics_new/custom_rank'),
  363. meta: { title: '自定义B分排名', noCache: true }
  364. }
  365. ]
  366. },
  367. {
  368. path: '/integral_statistics',
  369. name: 'integral_statistics',
  370. component: () => import('@/views/statistics_new/integral_statistics'),
  371. meta: { title: '积分统计', icon: 'integral_statistics_icon', noCache: true , jurisdiction:['employee'] ,}
  372. // hidden: true
  373. },
  374. {
  375. path: '/manager_statistics',
  376. name: 'manager_statistics',
  377. component: () => import('@/views/statistics_new/manager_statistics'),
  378. meta: { title: '管理者奖扣', icon: 'manager_statistics_icon', noCache: true , jurisdiction:['employee'] ,}
  379. },
  380. {
  381. path: '/integral_event',
  382. name: 'integral_event',
  383. component: () => import('@/views/statistics_new/integral_event'),
  384. meta: { title: '积分事件', icon: 'integral_event_icon', noCache: true }
  385. },
  386. {
  387. path: '/balanceA',
  388. name: 'balanceA',
  389. component: () => import('@/views/statistics_new/balanceA'),
  390. meta: { title: 'A分余额', icon: 'A_points', noCache: true , jurisdiction:['dept_manager','employee'] ,}
  391. },
  392. {
  393. path: '/department_statistics',
  394. name: 'department_statistics',
  395. component: () => import('@/views/statistics_new/department_statistics'),
  396. meta: { title: '部门统计', icon: 'department_statistics', noCache: true , jurisdiction:['employee']}
  397. },
  398. {
  399. path: '/individual_statistics',
  400. name: 'individual_statistics',
  401. component: () => import('@/views/statistics_new/individual_statistics'),
  402. meta: { title: '个人统计', icon: 'individual_statistics', noCache: true }
  403. },
  404. {
  405. path: '/lotteryTicket_statistics',
  406. name: 'lotteryTicket_statistics',
  407. component: () => import('@/views/statistics_new/lotteryTicket_statistics'),
  408. meta: { title: '奖票统计', icon: 'Lottery_ticket_statistics', noCache: true , jurisdiction:['employee']}
  409. },
  410. ]
  411. },
  412. {
  413. path: '/employee',
  414. component: Layout,
  415. redirect: '/employee_table',
  416. // hidden: true, // 不在侧边栏线上
  417. meta: { title: '设置', icon: 'department', show: false, noCache: true , jurisdiction:['dept_manager','employee'] },
  418. children: [
  419. {
  420. path: '/employee_table',
  421. name: 'employee_table',
  422. component: () => import('@/views/integral/EmployeeTable'),
  423. // component: () => import('@/views/integral/framework'),
  424. meta: { title: '组织架构', icon: 'employee_table_icon', noCache: true }
  425. },
  426. {
  427. path: '/new_employee',
  428. name: 'new_employee',
  429. component: () => import('@/views/setting/new_employee'),
  430. hidden: true,
  431. meta: { title: '新成员列表', icon: 'employee_table_icon', noCache: true },
  432. },
  433. {
  434. path: '/set_role',
  435. name: 'set_role',
  436. component: () => import('@/views/setting/set_role'),
  437. meta: { title: '角色权限', icon: 'set_role_icon', noCache: true }
  438. },
  439. // {
  440. // path: '/integral_rule',
  441. // name: 'integral_rule',
  442. // component: () => import('@/views/setting/integral_rule'),
  443. // meta: { title: '积分规则', icon: 'workCenter', noCache: true }
  444. // },
  445. {
  446. path: '/set_basics',
  447. name: 'set_basics',
  448. component: () => import('@/views/setting/set_basics'),
  449. meta: { title: '基础设置', icon: 'set_basics_icon', noCache: true }
  450. },
  451. {
  452. path: '/fixed_integral',
  453. name: 'fixed_integral',
  454. component: () => import('@/views/setting/fixed_integral'),
  455. meta: { title: '自动积分', icon: 'fixed_integral_icon', noCache: true }
  456. },
  457. {
  458. path: '/company_info',
  459. name: 'company_info',
  460. component: () => import('@/views/setting/company_info'),
  461. meta: { title: '企业信息', icon: 'company_info_icon', noCache: true }
  462. },
  463. {
  464. path: '/rule_manage',
  465. name: 'integral_rule',
  466. component: () => import('@/views/integral/rule/rule_category'),
  467. meta: { title: '积分规则', icon: 'rule_manage_icon', noCache: true }
  468. },
  469. // {
  470. // path: '/approver_set',
  471. // name: 'approver_set',
  472. // component: () => import('@/views/setting/approver_set'),
  473. // meta: { title: '审批人设置', icon: 'employee_table_icon', noCache: true }
  474. // },
  475. ]
  476. }
  477. ]
  478. // Router.afterEach((to, from) => {
  479. // wxAuth(to);
  480. // });