basic.ts 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. import type { AppRouteRecordRaw } from '/@/router/types';
  2. import { t } from '/@/hooks/web/useI18n';
  3. import { REDIRECT_NAME, LAYOUT, EXCEPTION_COMPONENT, PAGE_NOT_FOUND_NAME, QIANKUN_ROUTE_NAME, QIANKUN_COMPONENT } from '/@/router/constant';
  4. // 404 on a page
  5. export const PAGE_NOT_FOUND_ROUTE: AppRouteRecordRaw = {
  6. path: '/:path(.*)*',
  7. name: PAGE_NOT_FOUND_NAME,
  8. component: LAYOUT,
  9. meta: {
  10. title: 'ErrorPage',
  11. hideBreadcrumb: true,
  12. hideMenu: true,
  13. },
  14. children: [
  15. {
  16. path: '/:path(.*)*',
  17. name: PAGE_NOT_FOUND_NAME,
  18. component: EXCEPTION_COMPONENT,
  19. meta: {
  20. title: 'ErrorPage',
  21. hideBreadcrumb: true,
  22. hideMenu: true,
  23. },
  24. },
  25. ],
  26. };
  27. export const QIANKUN_ROUTE: AppRouteRecordRaw = {
  28. path: '/micro-:path(.*)*',
  29. name: QIANKUN_ROUTE_NAME,
  30. component: LAYOUT,
  31. meta: {
  32. title: '子应用',
  33. hideBreadcrumb: true,
  34. hideMenu: true,
  35. },
  36. children: [
  37. {
  38. path: '/micro-need-air/:path(.*)*',
  39. name: QIANKUN_ROUTE_NAME,
  40. component: QIANKUN_COMPONENT,
  41. meta: {
  42. title: '子应用',
  43. hideBreadcrumb: true,
  44. hideMenu: true,
  45. },
  46. },
  47. {
  48. path: '/micro-fire-front/:path(.*)*',
  49. name: QIANKUN_ROUTE_NAME,
  50. component: QIANKUN_COMPONENT,
  51. meta: {
  52. title: '子应用',
  53. hideBreadcrumb: true,
  54. hideMenu: true,
  55. },
  56. },
  57. {
  58. path: '/micro-vent-3dModal/:path(.*)*',
  59. name: QIANKUN_ROUTE_NAME,
  60. component: QIANKUN_COMPONENT,
  61. meta: {
  62. title: '子应用',
  63. hideBreadcrumb: true,
  64. hideMenu: true,
  65. },
  66. children: [
  67. {
  68. path: '/modelchannel/safety/VentanalyModel3D',
  69. name: QIANKUN_ROUTE_NAME,
  70. component: import('/@/views/demo/threejs/damper.vue'),
  71. meta: {
  72. title: '子应用',
  73. hideBreadcrumb: true,
  74. hideMenu: true,
  75. },
  76. },
  77. ],
  78. },
  79. ],
  80. };
  81. export const REDIRECT_ROUTE: AppRouteRecordRaw = {
  82. path: '/redirect',
  83. component: LAYOUT,
  84. name: 'RedirectTo',
  85. meta: {
  86. title: REDIRECT_NAME,
  87. hideBreadcrumb: true,
  88. hideMenu: true,
  89. },
  90. children: [
  91. {
  92. path: '/redirect/:path(.*)',
  93. name: REDIRECT_NAME,
  94. component: () => import('/@/views/sys/redirect/index.vue'),
  95. meta: {
  96. title: REDIRECT_NAME,
  97. hideBreadcrumb: true,
  98. },
  99. },
  100. ],
  101. };
  102. export const ERROR_LOG_ROUTE: AppRouteRecordRaw = {
  103. path: '/error-log',
  104. name: 'ErrorLog',
  105. component: LAYOUT,
  106. redirect: '/error-log/list',
  107. meta: {
  108. title: 'ErrorLog',
  109. hideBreadcrumb: true,
  110. hideChildrenInMenu: true,
  111. },
  112. children: [
  113. {
  114. path: 'list',
  115. name: 'ErrorLogList',
  116. component: () => import('/@/views/sys/error-log/index.vue'),
  117. meta: {
  118. title: t('routes.basic.errorLogList'),
  119. hideBreadcrumb: true,
  120. currentActiveMenu: '/error-log',
  121. },
  122. },
  123. ],
  124. };