staticRouter.ts 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. import { RouteRecordRaw } from 'vue-router'
  2. export const staticRouter: RouteRecordRaw[] = [
  3. {
  4. path: '/',
  5. redirect: '/index'
  6. },
  7. {
  8. path: '/index',
  9. name: 'Index',
  10. component: () => import('@/views/Index.vue'),
  11. meta: {
  12. title: '首页'
  13. },
  14. children: [
  15. {
  16. path: '/home',
  17. name: 'Home',
  18. component: () => import('@/views/home/index.vue'),
  19. meta: {
  20. title: '首页'
  21. }
  22. },
  23. {
  24. path: '/roles',
  25. name: 'Roles',
  26. component: () => import('@/views/account/roles/Roles.vue'),
  27. meta: {
  28. title: '角色管理'
  29. }
  30. },
  31. {
  32. path: '/users',
  33. name: 'Users',
  34. component: () => import('@/views/account/users/Users.vue'),
  35. meta: {
  36. title: '账户管理'
  37. }
  38. },
  39. {
  40. path: '/salary',
  41. name: 'Salary',
  42. component: () => import('@/views/salary/Salary.vue'),
  43. meta: {
  44. title: '薪资管理'
  45. }
  46. },
  47. {
  48. path: '/salaryCount',
  49. name: 'SalaryCount',
  50. component: () => import('@/views/salary/SalaryCount.vue'),
  51. meta: {
  52. title: '薪资统计'
  53. }
  54. },
  55. {
  56. path: '/salaryMy',
  57. name: 'SalaryMy',
  58. component: () => import('@/views/salary/SalaryMy.vue'),
  59. meta: {
  60. title: '我的薪资'
  61. }
  62. },
  63. {
  64. path: '/records',
  65. name: 'Records',
  66. component: () => import('@/views/workAttendance/Records.vue'),
  67. meta: {
  68. title: '统筹管理'
  69. }
  70. },
  71. {
  72. path: '/recordsFinance',
  73. name: 'RecordsFinance',
  74. component: () => import('@/views/workAttendance/RecordsFinance.vue'),
  75. meta: {
  76. title: '统筹管理(财务)'
  77. }
  78. },
  79. {
  80. path: '/overtime',
  81. name: 'Overtime',
  82. component: () => import('@/views/workAttendance/Overtime.vue'),
  83. meta: {
  84. title: '加班审批'
  85. }
  86. },
  87. {
  88. path: '/leave',
  89. name: 'Leave',
  90. component: () => import('@/views/workAttendance/Leave.vue'),
  91. meta: {
  92. title: '请假审批'
  93. }
  94. },
  95. {
  96. path: '/myOvertime',
  97. name: ' MyOvertime',
  98. component: () => import('@/views/workAttendance/MyOvertime.vue'),
  99. meta: {
  100. title: '我的加班'
  101. }
  102. },
  103. {
  104. path: '/myLeave',
  105. name: 'MyLeave',
  106. component: () => import('@/views/workAttendance/MyLeave.vue'),
  107. meta: {
  108. title: '我的请假'
  109. }
  110. }
  111. ]
  112. },
  113. {
  114. path: '/login',
  115. name: 'login',
  116. component: () => import('@/views/Login.vue'),
  117. meta: {
  118. title: '登录'
  119. }
  120. }
  121. ]
  122. export const errorRouter = [
  123. {
  124. path: '/404',
  125. name: '404',
  126. component: () => import('@/components/ErrorMessage/404.vue'),
  127. meta: {
  128. title: '404页面'
  129. }
  130. },
  131. {
  132. path: '/:pathMatch(.*)*',
  133. name: 'notFound',
  134. redirect: { name: '404' }
  135. }
  136. ]