index.js 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. import { createRouter, createWebHistory, createWebHashHistory } 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: '/test',
  13. // name: 'TempTest',
  14. // component: () => import('@/views/screen/ScreenView2.vue'),
  15. // meta: {
  16. // title: "测试建模文件"
  17. // }
  18. // },
  19. /**
  20. * 模版筛选使用
  21. * 注释时间: 2024年08月05日15:03:02
  22. *
  23. * */
  24. // {
  25. // path: '/count1',
  26. // name: 'count1',
  27. // component: () => import('@/views/count/index1.vue'),
  28. // meta: {
  29. // title: "临时统计1"
  30. // }
  31. // },
  32. // {
  33. // path: '/count2',
  34. // name: 'count2',
  35. // component: () => import('@/views/count/index2.vue'),
  36. // meta: {
  37. // title: "临时统计2"
  38. // }
  39. // },
  40. // {
  41. // path: '/count3',
  42. // name: 'count3',
  43. // component: () => import('@/views/count/index3.vue'),
  44. // meta: {
  45. // title: "临时统计3"
  46. // }
  47. // },
  48. {
  49. path: '/env',
  50. name: 'Env',
  51. component: () => import('@/views/env/index.vue'),
  52. meta: {
  53. title: "环境区分"
  54. }
  55. },
  56. {
  57. path: '/login',
  58. name: 'Login',
  59. component: () => import('@/views/login/LoginView.vue'),
  60. meta: {
  61. title: "登录"
  62. }
  63. },
  64. {
  65. path: '/',
  66. name: 'theBaseLayout',
  67. component: () => import('@/components/Layout/ThePublicLayout.vue'),
  68. children: [
  69. {
  70. path: 'answer',
  71. name: 'Answer',
  72. component: () => import('@/views/answer/AnswerView.vue'),
  73. meta: {
  74. title: '专家问答'
  75. }
  76. },
  77. {
  78. path: 'water-warn',
  79. name: 'WaterWarn',
  80. component: () => import('@/views/analyse/WaterView.vue'),
  81. meta: {
  82. title: '水质报警'
  83. }
  84. },
  85. {
  86. path: 'pymol-warn',
  87. name: 'PymolWarn',
  88. component: () => import('@/views/analyse/PymolView.vue'),
  89. meta: {
  90. title: '生化报警'
  91. }
  92. },
  93. {
  94. path: 'forecast-warn',
  95. name: 'ForecastView',
  96. component: () => import('@/views/analyse/ForecastView.vue'),
  97. meta: {
  98. title: '预测预警'
  99. }
  100. },
  101. {
  102. path: 'work-order',
  103. name: 'WorKOrder',
  104. component: () => import('@/views/analyse/WorkOrder.vue'),
  105. meta: {
  106. title: '智慧工单'
  107. }
  108. },
  109. {
  110. path: 'work',
  111. name: 'WorkView',
  112. component: () => import('@/views/work/WorkView.vue'),
  113. meta: {
  114. title: '智能办公'
  115. }
  116. }
  117. ]
  118. },
  119. {
  120. path: '/',
  121. name: 'userLayout',
  122. component: () => import('@/components/Layout/ThePublicLayout.vue'),
  123. children: [
  124. {
  125. path: 'user',
  126. name: 'User',
  127. component: () => import('@/views/user/index.vue'),
  128. meta: {
  129. title: '用户中心'
  130. }
  131. },
  132. ]
  133. },
  134. ]
  135. const router = createRouter({
  136. history: createWebHistory(import.meta.env.BASE_URL),
  137. routes: constantRouterMap,
  138. scrollBehavior: () => ({ left: 0, top: 0 })
  139. })
  140. export default router;