index.js 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. import { createRouter, createWebHistory } from 'vue-router'
  2. const routes = [
  3. {
  4. path: '/',
  5. name: 'home',
  6. component: function () {
  7. return import('../views/HomePage.vue')
  8. }
  9. },
  10. // 例子(开发时参考,生产环境中相关文件无意义)
  11. {
  12. path: '/example',
  13. name: 'example',
  14. component: function () {
  15. return import('../views/Example.vue')
  16. },
  17. children: [ // 子路由配置开始
  18. {
  19. path: 'example',
  20. component: function () {
  21. return import('../views/example/Example.vue')
  22. },
  23. },
  24. {
  25. path: 'map',
  26. component: function () {
  27. return import('../views/example/Map.vue')
  28. },
  29. }
  30. ], // 子路由配置结束
  31. },
  32. // 时空算子库
  33. {
  34. path: '/skszk',
  35. name: 'skszk',
  36. component: function () {
  37. return import('../views/skszk/Example.vue')
  38. }
  39. },
  40. // 时空门户
  41. {
  42. path: '/skmh',
  43. name: 'skmh',
  44. component: function () {
  45. return import('../views/Skmh.vue')
  46. },
  47. children: [ // 子路由配置开始
  48. {
  49. path: 'example',
  50. component: function () {
  51. return import('../views/skmh/Example.vue')
  52. },
  53. }
  54. ], // 子路由配置结束
  55. },
  56. // 微功能
  57. {
  58. path: '/wgn',
  59. name: 'wgn',
  60. component: function () {
  61. return import('../views/wgn/index.vue')
  62. },
  63. // children: [ // 子路由配置开始
  64. // {
  65. // path: 'example',
  66. // component: function () {
  67. // return import('../views/wgn/Example.vue')
  68. // },
  69. // }
  70. // ], // 子路由配置结束
  71. },
  72. // 应用管理
  73. {
  74. path: '/yygl',
  75. name: 'yygl',
  76. component: function () {
  77. return import('../views/Yygl.vue')
  78. },
  79. children: [ // 子路由配置开始
  80. {
  81. path: 'example',
  82. component: function () {
  83. return import('../views/yygl/Example.vue')
  84. },
  85. }
  86. ], // 子路由配置结束
  87. },
  88. // 信息反馈
  89. {
  90. path: '/xxfk',
  91. name: 'xxfk',
  92. component: function () {
  93. return import('../views/Xxfk.vue')
  94. },
  95. children: [ // 子路由配置开始
  96. {
  97. path: 'example',
  98. component: function () {
  99. return import('../views/xxfk/Example.vue')
  100. },
  101. }
  102. ], // 子路由配置结束
  103. },
  104. // 运行管理
  105. {
  106. path: '/yxgl',
  107. name: 'yxgl',
  108. component: function () {
  109. return import('../views/Yxgl.vue')
  110. },
  111. children: [ // 子路由配置开始
  112. {
  113. path: 'StatisticalAnalysis',
  114. component: function () {
  115. return import('../views/yxgl/StatisticalAnalysis.vue')
  116. },
  117. }
  118. ], // 子路由配置结束
  119. },
  120. ]
  121. const router = createRouter({
  122. history: createWebHistory(process.env.BASE_URL),
  123. routes
  124. })
  125. export default router