index.js 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. import Vue from 'vue'
  2. import Router from 'vue-router'
  3. import { getStore } from '@/utils/store'
  4. Vue.use(Router)
  5. export default new Router({
  6. routes: [
  7. {
  8. path: '/punch',
  9. name: '打卡',
  10. component: () => import('@/views/base/punch'),
  11. meta: {
  12. keepAlive: false,
  13. isTab: false,
  14. isAuth: true
  15. }
  16. }, {
  17. path: '/statistics',
  18. name: '统计',
  19. component: () => import('@/views/base/statistics'),
  20. meta: {
  21. keepAlive: false,
  22. isTab: false,
  23. isAuth: true
  24. }
  25. }, {
  26. path: '/peopleManage',
  27. name: '人员管理',
  28. component: () => import('@/views/base/peopleManage'),
  29. meta: {
  30. keepAlive: false,
  31. isTab: false,
  32. isAuth: true
  33. }
  34. }, {
  35. path: '/departmentStatistics',
  36. name: '部门签到统计',
  37. component: () => import('@/views/base/departmentStatistics'),
  38. meta: {
  39. keepAlive: false,
  40. isTab: false,
  41. isAuth: true
  42. }
  43. }, {
  44. path: '/chooseProject',
  45. name: '选择项目',
  46. component: () => import('@/views/base/chooseProject'),
  47. meta: {
  48. keepAlive: false,
  49. isTab: false,
  50. isAuth: true
  51. }
  52. }, {
  53. path: '/trajectory',
  54. name: '工作轨迹',
  55. component: () => import('@/views/trajectory/trajectory'),
  56. meta: {
  57. keepAlive: false,
  58. isTab: false,
  59. isAuth: true
  60. }
  61. }
  62. ]
  63. })
  64. // export default new Router({
  65. // routes: [{
  66. // path: '/',
  67. // name: 'Index',
  68. // redirect: function () {
  69. // let type = getStore({'name':'type','type':'','debug':''})
  70. // if(type == 1){
  71. // return '/punch'
  72. // } else {
  73. // return '/peopleManage'
  74. // }
  75. // },
  76. // component: () => import('@/views/Index'),
  77. // meta: {
  78. // keepAlive: true,
  79. // isTab: false,
  80. // isAuth: true
  81. // },
  82. // children: [ {
  83. // path: '/punch',
  84. // name: '打卡',
  85. // component: () => import('@/views/base/punch'),
  86. // meta: {
  87. // keepAlive: false,
  88. // isTab: false,
  89. // isAuth: true
  90. // }
  91. // }, {
  92. // path: '/statistics',
  93. // name: '统计',
  94. // component: () => import('@/views/base/statistics'),
  95. // meta: {
  96. // keepAlive: false,
  97. // isTab: false,
  98. // isAuth: true
  99. // }
  100. // }, {
  101. // path: '/peopleManage',
  102. // name: '人员管理',
  103. // component: () => import('@/views/base/peopleManage'),
  104. // meta: {
  105. // keepAlive: false,
  106. // isTab: false,
  107. // isAuth: true
  108. // }
  109. // }, {
  110. // path: '/departmentStatistics',
  111. // name: '部门签到统计',
  112. // component: () => import('@/views/base/departmentStatistics'),
  113. // meta: {
  114. // keepAlive: false,
  115. // isTab: false,
  116. // isAuth: true
  117. // }
  118. // }, {
  119. // path: '/chooseProject',
  120. // name: '选择项目',
  121. // component: () => import('@/views/base/chooseProject'),
  122. // meta: {
  123. // keepAlive: false,
  124. // isTab: false,
  125. // isAuth: true
  126. // }
  127. // }, {
  128. // path: '/trajectory',
  129. // name: '工作轨迹',
  130. // component: () => import('@/views/trajectory/trajectory'),
  131. // meta: {
  132. // keepAlive: false,
  133. // isTab: false,
  134. // isAuth: true
  135. // }
  136. // }]
  137. // }]
  138. // })