index.js 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. import { createRouter, createWebHistory } from 'vue-router'
  2. const constantRouterMap = [
  3. // {
  4. // path: '/',
  5. // name: 'Scrren',
  6. // component: () => import('@/views/screen/ScreenView.vue'),
  7. // meta: {
  8. // title: "智慧总控"
  9. // }
  10. // },
  11. {
  12. path: '/',
  13. name: 'Scrren',
  14. component: () => import('@/views/screen/ScreenViewBlack/index.vue'),
  15. meta: {
  16. title: "智慧总控"
  17. }
  18. },
  19. {
  20. path: '/carbon',
  21. name: 'carbon',
  22. component: () => import('@/views/carbon/index.vue'),
  23. meta: {
  24. title: "碳排放"
  25. }
  26. },
  27. // {
  28. // path: '/test',
  29. // name: 'TempTest',
  30. // component: () => import('@/views/screen/ScreenView2.vue'),
  31. // meta: {
  32. // title: "测试建模文件"
  33. // }
  34. // },
  35. /**
  36. * 模版筛选使用
  37. * 注释时间: 2024年08月05日15:03:02
  38. *
  39. * */
  40. // {
  41. // path: '/count1',
  42. // name: 'count1',
  43. // component: () => import('@/views/count/index1.vue'),
  44. // meta: {
  45. // title: "临时统计1"
  46. // }
  47. // },
  48. // {
  49. // path: '/count2',
  50. // name: 'count2',
  51. // component: () => import('@/views/count/index2.vue'),
  52. // meta: {
  53. // title: "临时统计2"
  54. // }
  55. // },
  56. // {
  57. // path: '/count3',
  58. // name: 'count3',
  59. // component: () => import('@/views/count/index3.vue'),
  60. // meta: {
  61. // title: "临时统计3"
  62. // }
  63. // },
  64. {
  65. path: '/env',
  66. name: 'Env',
  67. component: () => import('@/views/env/index.vue'),
  68. meta: {
  69. title: "环境区分"
  70. }
  71. },
  72. {
  73. path: '/login',
  74. name: 'Login',
  75. component: () => import('@/views/login/LoginView.vue'),
  76. meta: {
  77. title: "登录"
  78. }
  79. },
  80. {
  81. path: '/',
  82. name: 'theBaseLayout',
  83. component: () => import('@/components/Layout/ThePublicLayout.vue'),
  84. children: [
  85. {
  86. path: 'answer',
  87. name: 'Answer',
  88. component: () => import('@/views/answer/AnswerView.vue'),
  89. meta: {
  90. title: '专家问答'
  91. }
  92. },
  93. {
  94. path: 'water-warn',
  95. name: 'WaterWarn',
  96. component: () => import('@/views/analyse/WaterView.vue'),
  97. meta: {
  98. title: '水质报警'
  99. }
  100. },
  101. {
  102. path: 'pymol-warn',
  103. name: 'PymolWarn',
  104. component: () => import('@/views/analyse/PymolView.vue'),
  105. meta: {
  106. title: '生化报警'
  107. }
  108. },
  109. {
  110. path: 'forecast-warn',
  111. name: 'ForecastView',
  112. component: () => import('@/views/analyse/ForecastView.vue'),
  113. meta: {
  114. title: '预测预警'
  115. }
  116. },
  117. {
  118. path: 'work-order',
  119. name: 'WorKOrder',
  120. component: () => import('@/views/analyse/WorkOrder.vue'),
  121. meta: {
  122. title: '智慧工单'
  123. }
  124. },
  125. {
  126. path: 'work',
  127. name: 'WorkView',
  128. component: () => import('@/views/work/WorkView.vue'),
  129. meta: {
  130. title: '智能办公'
  131. }
  132. },
  133. {
  134. path: 'medicinal',
  135. name: 'MedicinalView',
  136. component: () => import('@/views/control/MedicinalView.vue'),
  137. meta: {
  138. title: '智适应碳源投加'
  139. }
  140. },
  141. {
  142. path: 'laboratory',
  143. name: 'DataView',
  144. component: () => import('@/views/data/DataView.vue'),
  145. meta: {
  146. title: '智能国标化验室数据'
  147. }
  148. },
  149. {
  150. path: 'comparison',
  151. name: 'ComparisonView',
  152. component: () => import('@/views/data/ComparisonView.vue'),
  153. meta: {
  154. title: '预测数据'
  155. }
  156. },
  157. ]
  158. },
  159. {
  160. path: '/',
  161. name: 'userLayout',
  162. component: () => import('@/components/Layout/ThePublicLayout.vue'),
  163. children: [
  164. {
  165. path: 'user',
  166. name: 'User',
  167. component: () => import('@/views/user/index.vue'),
  168. meta: {
  169. title: '用户中心'
  170. }
  171. },
  172. ]
  173. },
  174. ]
  175. const router = createRouter({
  176. history: createWebHistory(import.meta.env.BASE_URL),
  177. routes: constantRouterMap,
  178. scrollBehavior: () => ({ left: 0, top: 0 })
  179. })
  180. export default router;