staticRouter.ts 3.5 KB

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