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.

155 lines
3.7 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
  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: '/dataModel',
  34. name: 'dataModel',
  35. component: () => import('views/dataModel/index.vue'),
  36. meta: {
  37. isDefault: true,
  38. title: '数据模型',
  39. icon: n_home,
  40. activeIcon: s_home,
  41. },
  42. },
  43. {
  44. path: '/systemLog',
  45. name: 'systemLog',
  46. component: () => import('views/home/index.vue'),
  47. meta: {
  48. isDefault: false,
  49. title: '日志记录',
  50. icon: n_log,
  51. activeIcon: s_log,
  52. },
  53. },
  54. {
  55. path: '/experimentLog',
  56. name: 'experimentLog',
  57. component: () => import('views/home/index.vue'),
  58. meta: {
  59. isDefault: false,
  60. title: '实验记录',
  61. icon: n_expe,
  62. activeIcon: s_expe,
  63. },
  64. },
  65. {
  66. path: '/container',
  67. name: 'container',
  68. component: () => import('views/container/index.vue'),
  69. meta: {
  70. isDefault: true,
  71. title: '加液配置',
  72. icon: n_liquid,
  73. activeIcon: s_liquid,
  74. },
  75. },
  76. {
  77. path: '/solution',
  78. name: 'solution',
  79. component: () => import('views/solution/index.vue'),
  80. meta: {
  81. isDefault: true,
  82. title: '溶液管理',
  83. icon: n_liquid_config,
  84. activeIcon: s_liquid_config,
  85. },
  86. },
  87. {
  88. path: '/ore',
  89. name: 'ore',
  90. component: () => import('views/ore/index.vue'),
  91. meta: {
  92. isDefault: true,
  93. title: '矿石管理',
  94. icon: n_ore,
  95. activeIcon: s_ore,
  96. },
  97. children: [{
  98. path: 'craft',
  99. name: 'Craft',
  100. component: () => import('views/craft/index.vue'),
  101. }],
  102. },
  103. {
  104. path: '/user',
  105. name: 'user',
  106. component: () => import('views/user/index.vue'),
  107. meta: {
  108. isDefault: true,
  109. title: '用户管理',
  110. icon: n_user,
  111. activeIcon: s_user,
  112. },
  113. },
  114. {
  115. path: '/point',
  116. name: 'point',
  117. component: () => import('views/point/index.vue'),
  118. meta: {
  119. isDefault: true,
  120. title: '坐标管理',
  121. icon: n_setting,
  122. activeIcon: s_setting,
  123. },
  124. },
  125. {
  126. path: '/debug',
  127. name: 'debug',
  128. component: () => import('views/debug/index.vue'),
  129. meta: {
  130. isDefault: true,
  131. title: '调试',
  132. icon: n_debug,
  133. activeIcon: s_debug,
  134. },
  135. },
  136. ]
  137. const routes: RouteRecordRaw[] = [
  138. {
  139. path: '/login',
  140. name: 'login',
  141. component: () => import('../views/login/index.vue'),
  142. },
  143. {
  144. path: '/',
  145. component: () => import('../layouts/default.vue'),
  146. redirect: '/home',
  147. children: authRoutes,
  148. },
  149. ]
  150. export { authRoutes }
  151. export default routes