1
0

config.ts 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. import { RouteName } from "./routeName";
  2. import { appConstant, appRoutes } from "@/app";
  3. export { RouteName };
  4. export type Routes = Route[];
  5. export type RouteMeta = { title: string; icon?: string };
  6. export type Route = {
  7. name: string;
  8. path: string;
  9. component: any;
  10. meta: RouteMeta;
  11. children?: Routes;
  12. };
  13. export const system: Routes = [
  14. {
  15. name: RouteName.login,
  16. path: "/login",
  17. component:
  18. appConstant.loginComponent || (() => import("@/view/system/index.vue")),
  19. meta: { title: "登录" },
  20. },
  21. {
  22. name: RouteName.register,
  23. path: "/register",
  24. component: () => import("@/view/system/index.vue"),
  25. meta: { title: "注册" },
  26. },
  27. {
  28. name: RouteName.forget,
  29. path: "/forget",
  30. component: () => import("@/view/system/index.vue"),
  31. meta: { title: "重置密码" },
  32. },
  33. {
  34. name: 'mediaLibrary',
  35. path: "/mediaLibrary",
  36. component: () => import("@/view/mediaLibrary/index.vue"),
  37. meta: { title: "媒体库" },
  38. },
  39. ];
  40. export const routes: Routes = [
  41. {
  42. name: RouteName.viewLayout,
  43. path: "/",
  44. component: () => import("@/view/layout/index.vue"),
  45. meta: { title: "VR看房管理" },
  46. children: [
  47. ...system,
  48. {
  49. name: RouteName.vrmodel,
  50. path: "home/:caseId",
  51. component: () => import("@/view/vrmodel/index.vue"),
  52. meta: { title: "场景管理", icon: "icon-shiyongwendang" },
  53. },
  54. {
  55. name: RouteName.abstract,
  56. path: "abstract/:caseId",
  57. component: () => import("@/view/abstract/index.vue"),
  58. meta: { title: "简要案情", icon: "icon-liebiao" },
  59. },
  60. {
  61. name: RouteName.originalPhoto,
  62. path: "originalPhoto/:caseId",
  63. component: () => import("@/view/originalPhoto/index.vue"),
  64. meta: { title: "原始照片", icon: "icon-zhaopian" },
  65. },
  66. {
  67. name: RouteName.material,
  68. path: "material/:caseId",
  69. component: () => import("@/view/material/index.vue"),
  70. meta: { title: "三录材料", icon: "icon-tidangan" },
  71. },
  72. {
  73. name: RouteName.other,
  74. path: "other/:caseId",
  75. component: () => import("@/view/other/index.vue"),
  76. meta: { title: "其他材料", icon: "icon-fuzhi" },
  77. },
  78. {
  79. name: RouteName.aiList,
  80. path: "aiList/:caseId",
  81. component: () => import("@/view/aiList/index.vue"),
  82. meta: { title: "AI 勘查", icon: "icon-chaxun" },
  83. },
  84. {
  85. name: RouteName.dossier,
  86. path: "dossier/:caseId",
  87. component: () => import("@/view/dossier/index.vue"),
  88. meta: { title: "案件卷宗", icon: "icon-juanzongguanli" },
  89. },
  90. {
  91. name: RouteName.camera,
  92. path: "camera",
  93. component: () => import("@/view/camera/index.vue"),
  94. meta: { title: "相机管理", icon: "iconfire_camera" },
  95. },
  96. ...appRoutes,
  97. {
  98. name: RouteName.organization,
  99. path: "organization",
  100. component: () => import("@/view/organization/index.vue"),
  101. meta: { title: "组织架构", icon: "iconfire_organization" },
  102. },
  103. {
  104. name: RouteName.role,
  105. path: "role",
  106. component: () => import("@/view/role/index.vue"),
  107. meta: { title: "角色管理", icon: "iconfire_role_management" },
  108. },
  109. {
  110. name: RouteName.user,
  111. path: "user",
  112. component: () => import("@/view/user/index.vue"),
  113. meta: { title: "用户管理", icon: "iconfire_user" },
  114. },
  115. {
  116. name: RouteName.statistics,
  117. path: "/statistics",
  118. component: () => import("@/view/statistics/index.vue"),
  119. meta: { title: "数据统计", icon: "icon-fire_statistics" },
  120. },
  121. {
  122. name: RouteName.downloadLog,
  123. path: "download-log",
  124. component: () => import("@/view/vrmodel/downloadLog.vue"),
  125. meta: { title: "下载记录", icon: "icon-query_home" },
  126. },
  127. {
  128. name: RouteName.caseFile,
  129. path: "case/file/:caseId",
  130. component: () => import("@/view/case/caseFile.vue"),
  131. meta: { title: "卷宗管理" },
  132. },
  133. {
  134. name: RouteName.drawCasePhotos,
  135. path: "/case/photos/:caseId",
  136. component: () => import("@/view/case/photos/index.vue"),
  137. meta: { title: "照片制卷" },
  138. },
  139. {
  140. name: RouteName.records,
  141. path: "/case/records/:caseId/:fileId",
  142. component: () => import("@/view/case/records/index.vue"),
  143. meta: { title: "现场勘验笔录" },
  144. },
  145. {
  146. name: 'homes',
  147. path: "homes/:caseId",
  148. component: () => import("@/view/vrmodel/index.vue"),
  149. meta: { title: "场景管理", icon: "icon-shiyongwendang" },
  150. },
  151. ],
  152. },
  153. {
  154. name: RouteName.drawCaseFile,
  155. path: "/case/file/:caseId/:type/:id",
  156. component: () => import("@/view/case/draw/index.vue"),
  157. meta: { title: "绘制卷宗图" },
  158. },
  159. ];