config.ts 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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. export const routes: Routes = [
  35. {
  36. name: RouteName.viewLayout,
  37. path: "/",
  38. component: () => import("@/view/layout/index.vue"),
  39. meta: { title: "VR看房管理" },
  40. children: [
  41. ...system,
  42. {
  43. name: RouteName.vrmodel,
  44. path: "home",
  45. component: () => import("@/view/vrmodel/index.vue"),
  46. meta: { title: "场景管理", icon: "iconfire_scenes" },
  47. },
  48. {
  49. name: RouteName.camera,
  50. path: "camera",
  51. component: () => import("@/view/camera/index.vue"),
  52. meta: { title: "相机管理", icon: "iconfire_camera" },
  53. },
  54. ...appRoutes,
  55. {
  56. name: RouteName.organization,
  57. path: "organization",
  58. component: () => import("@/view/organization/index.vue"),
  59. meta: { title: "组织架构", icon: "iconfire_organization" },
  60. },
  61. {
  62. name: RouteName.role,
  63. path: "role",
  64. component: () => import("@/view/role/index.vue"),
  65. meta: { title: "角色管理", icon: "iconfire_role_management" },
  66. },
  67. {
  68. name: RouteName.user,
  69. path: "user",
  70. component: () => import("@/view/user/index.vue"),
  71. meta: { title: "用户管理", icon: "iconfire_user" },
  72. },
  73. {
  74. name: RouteName.caseFile,
  75. path: "case/file/:caseId",
  76. component: () => import("@/view/case/caseFile.vue"),
  77. meta: { title: "卷宗管理" },
  78. },
  79. {
  80. name: RouteName.statistics,
  81. path: "/statistics",
  82. component: () => import("@/view/statistics/index.vue"),
  83. meta: { title: "数据统计", icon: "icon-fire_statistics" },
  84. },
  85. {
  86. name: RouteName.downloadLog,
  87. path: "download-log",
  88. component: () => import("@/view/vrmodel/downloadLog.vue"),
  89. meta: { title: "下载记录", icon: "icon-query_home" },
  90. },
  91. {
  92. name: RouteName.setting,
  93. path: "setting",
  94. component: () => import("@/view/setting/index.vue"),
  95. meta: { title: "系统设置", icon: "icon-nav-setup" },
  96. },
  97. ],
  98. },
  99. {
  100. name: RouteName.drawCaseFile,
  101. path: "/case/file/:caseId/:type/:id",
  102. component: () => import("@/view/case/draw/index.vue"),
  103. meta: { title: "绘制卷宗图" },
  104. },
  105. ];