index.js 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. import { createRouter, createWebHistory } from 'vue-router'
  2. const constantRouterMap = [
  3. {
  4. path: '/',
  5. name: 'Scrren',
  6. component: () => import('@/views/screen/ScreenViewBlack/index.vue'),
  7. meta: {
  8. title: "智慧总控"
  9. }
  10. },
  11. {
  12. path: '/screen-light',
  13. name: 'ScreenLight',
  14. component: () => import('@/views/screen/ScreenView.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: '/water-warn-content',
  29. name: 'WaterWarnContent',
  30. component: () => import('@/views/single/WaterWarnContent.vue'),
  31. meta: {
  32. title: "报警详情"
  33. }
  34. },
  35. {
  36. path: '/env',
  37. name: 'Env',
  38. component: () => import('@/views/env/index.vue'),
  39. meta: {
  40. title: "环境区分"
  41. }
  42. },
  43. {
  44. path: '/login',
  45. name: 'Login',
  46. component: () => import('@/views/login/LoginView.vue'),
  47. meta: {
  48. title: "登录"
  49. }
  50. },
  51. {
  52. path: '/',
  53. name: 'theBaseLayout',
  54. component: () => import('@/components/Layout/ThePublicLayout.vue'),
  55. children: [
  56. {
  57. path: 'answer',
  58. name: 'Answer',
  59. component: () => import('@/views/answer/AnswerView.vue'),
  60. meta: {
  61. title: '专家问答'
  62. }
  63. },
  64. {
  65. path: 'water-warn',
  66. name: 'WaterWarn',
  67. component: () => import('@/views/analyse/WaterView.vue'),
  68. meta: {
  69. title: '水质报警'
  70. }
  71. },
  72. {
  73. path: 'pymol-warn',
  74. name: 'PymolWarn',
  75. component: () => import('@/views/analyse/PymolView.vue'),
  76. meta: {
  77. title: '生化报警'
  78. }
  79. },
  80. {
  81. path: 'forecast-warn',
  82. name: 'ForecastView',
  83. component: () => import('@/views/analyse/ForecastView.vue'),
  84. meta: {
  85. title: '水质报警'
  86. }
  87. },
  88. {
  89. path: 'work-order',
  90. name: 'WorKOrder',
  91. component: () => import('@/views/analyse/WorkOrder.vue'),
  92. meta: {
  93. title: '工艺运行诊断'
  94. }
  95. },
  96. {
  97. path: 'work',
  98. name: 'WorkView',
  99. component: () => import('@/views/work/WorkView.vue'),
  100. meta: {
  101. title: '辅助办公'
  102. }
  103. },
  104. {
  105. path: 'medicinal',
  106. name: 'MedicinalView',
  107. component: () => import('@/views/control/MedicinalView.vue'),
  108. meta: {
  109. title: '智适应投药'
  110. }
  111. },
  112. {
  113. path: 'laboratory',
  114. name: 'DataView',
  115. component: () => import('@/views/data/DataView.vue'),
  116. meta: {
  117. title: '智能国标化验室数据'
  118. }
  119. },
  120. {
  121. path: 'comparison',
  122. name: 'ComparisonView',
  123. component: () => import('@/views/data/ComparisonView.vue'),
  124. meta: {
  125. title: '预测数据'
  126. }
  127. },
  128. ]
  129. },
  130. {
  131. path: '/',
  132. name: 'userLayout',
  133. component: () => import('@/components/Layout/ThePublicLayout.vue'),
  134. children: [
  135. {
  136. path: 'user',
  137. name: 'User',
  138. component: () => import('@/views/user/index.vue'),
  139. meta: {
  140. title: '用户中心'
  141. }
  142. },
  143. ]
  144. },
  145. ]
  146. const router = createRouter({
  147. history: createWebHistory(import.meta.env.BASE_URL),
  148. routes: constantRouterMap,
  149. scrollBehavior: () => ({ left: 0, top: 0 })
  150. })
  151. export default router;