You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

166 lines
4.0 KiB

3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
  1. import type { RouteRecordRaw } from 'vue-router'
  2. import n_debug from 'assets/images/menuIcon/n_debug.svg'
  3. import n_expe from 'assets/images/menuIcon/n_expe.svg'
  4. import n_home from 'assets/images/menuIcon/n_home.svg'
  5. import n_liquid from 'assets/images/menuIcon/n_liquid.svg'
  6. import n_liquid_config from 'assets/images/menuIcon/n_liquid_config.svg'
  7. import n_log from 'assets/images/menuIcon/n_log.svg'
  8. import n_ore from 'assets/images/menuIcon/n_ore.svg'
  9. import n_setting from 'assets/images/menuIcon/n_setting.svg'
  10. import n_user from 'assets/images/menuIcon/n_user.svg'
  11. import s_debug from 'assets/images/menuIcon/s_debug.svg'
  12. import s_expe from 'assets/images/menuIcon/s_expe.svg'
  13. import s_home from 'assets/images/menuIcon/s_home.svg'
  14. import s_liquid from 'assets/images/menuIcon/s_liquid.svg'
  15. import s_liquid_config from 'assets/images/menuIcon/s_liquid_config.svg'
  16. import s_log from 'assets/images/menuIcon/s_log.svg'
  17. import s_ore from 'assets/images/menuIcon/s_ore.svg'
  18. import s_setting from 'assets/images/menuIcon/s_setting.svg'
  19. import s_user from 'assets/images/menuIcon/s_user.svg'
  20. const authRoutes: RouteRecordRaw[] = [
  21. {
  22. path: '/home',
  23. name: 'home',
  24. component: () => import('views/home/index.vue'),
  25. meta: {
  26. isDefault: true,
  27. title: '实验操作',
  28. icon: n_home,
  29. activeIcon: s_home,
  30. },
  31. },
  32. {
  33. path: '/systemLog',
  34. name: 'systemLog',
  35. component: () => import('views/home/index.vue'),
  36. meta: {
  37. isDefault: false,
  38. title: '日志记录',
  39. icon: n_log,
  40. activeIcon: s_log,
  41. },
  42. },
  43. {
  44. path: '/experimentLog',
  45. name: 'experimentLog',
  46. component: () => import('views/taskLog/index.vue'),
  47. meta: {
  48. isDefault: true,
  49. title: '拍照记录',
  50. icon: n_expe,
  51. activeIcon: s_expe,
  52. },
  53. },
  54. {
  55. path: '/container',
  56. name: 'container',
  57. component: () => import('views/container/index.vue'),
  58. meta: {
  59. isDefault: true,
  60. title: '加液配置',
  61. icon: n_liquid,
  62. activeIcon: s_liquid,
  63. },
  64. },
  65. {
  66. path: '/solution',
  67. name: 'solution',
  68. component: () => import('views/solution/index.vue'),
  69. meta: {
  70. isDefault: true,
  71. title: '溶液管理',
  72. icon: n_liquid_config,
  73. activeIcon: s_liquid_config,
  74. },
  75. },
  76. {
  77. path: '/ore',
  78. name: 'ore',
  79. component: () => import('views/ore/index.vue'),
  80. meta: {
  81. isDefault: true,
  82. title: '矿石管理',
  83. icon: n_ore,
  84. activeIcon: s_ore,
  85. },
  86. children: [{
  87. path: 'craft',
  88. name: 'Craft',
  89. component: () => import('views/craft/index.vue'),
  90. }],
  91. },
  92. {
  93. path: '/user',
  94. name: 'user',
  95. component: () => import('views/user/index.vue'),
  96. meta: {
  97. isDefault: true,
  98. title: '用户管理',
  99. icon: n_user,
  100. activeIcon: s_user,
  101. },
  102. },
  103. {
  104. path: '/point',
  105. name: 'point',
  106. component: () => import('views/point/index.vue'),
  107. meta: {
  108. isDefault: true,
  109. title: '坐标管理',
  110. icon: n_setting,
  111. activeIcon: s_setting,
  112. },
  113. },
  114. {
  115. path: '/debug',
  116. name: 'debug',
  117. component: () => import('views/debug/index.vue'),
  118. meta: {
  119. isDefault: false,
  120. title: '调试',
  121. icon: n_debug,
  122. activeIcon: s_debug,
  123. },
  124. },
  125. {
  126. path: '/positionDebug',
  127. name: 'positionDebug',
  128. component: () => import('views/pointDebug/index.vue'),
  129. meta: {
  130. isDefault: false,
  131. title: '坐标调试',
  132. icon: n_debug,
  133. activeIcon: s_debug,
  134. },
  135. },
  136. {
  137. path: '/equipmentDebug',
  138. name: 'equipmentDebug',
  139. component: () => import('views/debug/index.vue'),
  140. meta: {
  141. isDefault: false,
  142. title: '设备调试',
  143. icon: n_debug,
  144. activeIcon: s_debug,
  145. },
  146. },
  147. ]
  148. const routes: RouteRecordRaw[] = [
  149. {
  150. path: '/login',
  151. name: 'login',
  152. component: () => import('../views/login/index.vue'),
  153. },
  154. {
  155. path: '/',
  156. component: () => import('../layouts/default.vue'),
  157. redirect: '/home',
  158. children: authRoutes,
  159. },
  160. ]
  161. export { authRoutes }
  162. export default routes