basic.ts 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  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 DeviceTableRoute: AppRouteRecordRaw = {
  28. path: '/monitorChannel/deviceManager/auto',
  29. name: 'deviceManager',
  30. component: LAYOUT,
  31. meta: {
  32. title: '设备管理',
  33. hideBreadcrumb: true,
  34. hideMenu: true,
  35. },
  36. children: [
  37. {
  38. path: '/:type',
  39. name: '',
  40. component: () => import('/@/views/vent/deviceManager/deviceTable/index.vue'),
  41. meta: {
  42. title: '',
  43. hideBreadcrumb: true,
  44. hideMenu: true,
  45. },
  46. },
  47. ],
  48. };
  49. export const QIANKUN_ROUTE: AppRouteRecordRaw = {
  50. path: '/micro-:path(.*)*',
  51. name: QIANKUN_ROUTE_NAME,
  52. component: LAYOUT,
  53. meta: {
  54. title: '子应用',
  55. hideBreadcrumb: true,
  56. hideMenu: true,
  57. },
  58. children: [
  59. {
  60. path: '/micro-need-air/:path(.*)*',
  61. name: QIANKUN_ROUTE_NAME,
  62. component: QIANKUN_COMPONENT,
  63. meta: {
  64. title: '子应用',
  65. hideBreadcrumb: true,
  66. hideMenu: true,
  67. },
  68. },
  69. {
  70. path: '/micro-fire-front/:path(.*)*',
  71. name: QIANKUN_ROUTE_NAME,
  72. component: QIANKUN_COMPONENT,
  73. meta: {
  74. title: '子应用',
  75. hideBreadcrumb: true,
  76. hideMenu: true,
  77. },
  78. },
  79. // {
  80. // path: '/micro-vent-3dModal/:path(.*)*',
  81. // name: QIANKUN_ROUTE_NAME,
  82. // component: QIANKUN_COMPONENT,
  83. // meta: {
  84. // title: '子应用',
  85. // hideBreadcrumb: true,
  86. // hideMenu: true,
  87. // },
  88. // children: [
  89. // {
  90. // path: '/modelchannel/safety/VentanalyModel3D/:path(.*)*', //lxh
  91. // name: QIANKUN_ROUTE_NAME,
  92. // component: import('/@/views/demo/threejs/damper.vue'),
  93. // meta: {
  94. // title: '子应用',
  95. // hideBreadcrumb: true,
  96. // hideMenu: true,
  97. // },
  98. // },
  99. // {
  100. // path: '/modelchannel/activiti/:path(.*)*',
  101. // name: QIANKUN_ROUTE_NAME,
  102. // component: LAYOUT,
  103. // meta: {
  104. // title: '子应用',
  105. // hideBreadcrumb: true,
  106. // hideMenu: true,
  107. // },
  108. // children: [
  109. // {
  110. // path: '/:path(.*)*',
  111. // name: QIANKUN_ROUTE_NAME,
  112. // meta: {
  113. // title: '',
  114. // hideBreadcrumb: true,
  115. // hideMenu: true,
  116. // },
  117. // },
  118. // ],
  119. // },
  120. // ],
  121. // },
  122. ],
  123. };
  124. export const REDIRECT_ROUTE: AppRouteRecordRaw = {
  125. path: '/redirect',
  126. component: LAYOUT,
  127. name: 'RedirectTo',
  128. meta: {
  129. title: REDIRECT_NAME,
  130. hideBreadcrumb: true,
  131. hideMenu: true,
  132. },
  133. children: [
  134. {
  135. path: '/redirect/:path(.*)',
  136. name: REDIRECT_NAME,
  137. component: () => import('/@/views/sys/redirect/index.vue'),
  138. meta: {
  139. title: REDIRECT_NAME,
  140. hideBreadcrumb: true,
  141. },
  142. },
  143. ],
  144. };
  145. export const ERROR_LOG_ROUTE: AppRouteRecordRaw = {
  146. path: '/error-log',
  147. name: 'ErrorLog',
  148. component: LAYOUT,
  149. redirect: '/error-log/list',
  150. meta: {
  151. title: 'ErrorLog',
  152. hideBreadcrumb: true,
  153. hideChildrenInMenu: true,
  154. },
  155. children: [
  156. {
  157. path: 'list',
  158. name: 'ErrorLogList',
  159. component: () => import('/@/views/sys/error-log/index.vue'),
  160. meta: {
  161. title: t('routes.basic.errorLogList'),
  162. hideBreadcrumb: true,
  163. currentActiveMenu: '/error-log',
  164. },
  165. },
  166. ],
  167. };