config.ts 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. import { RouteName } from "./routeName";
  2. import { 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: () => import("@/view/system/index.vue"),
  18. meta: { title: "登录" },
  19. },
  20. {
  21. name: RouteName.register,
  22. path: "/register",
  23. component: () => import("@/view/system/index.vue"),
  24. meta: { title: "注册" },
  25. },
  26. {
  27. name: RouteName.forget,
  28. path: "/forget",
  29. component: () => import("@/view/system/index.vue"),
  30. meta: { title: "重置密码" },
  31. },
  32. ];
  33. export const routes: Routes = [
  34. {
  35. name: RouteName.viewLayout,
  36. path: "/",
  37. component: () => import("@/view/layout/index.vue"),
  38. meta: { title: "VR看房管理" },
  39. children: [
  40. ...system,
  41. {
  42. name: RouteName.home,
  43. path: "home",
  44. component: () => import("@/view/home/index.vue"),
  45. meta: { title: "首页", icon: "iconfire_home" },
  46. },
  47. {
  48. name: RouteName.vrmodel,
  49. path: "vrmodel",
  50. component: () => import("@/view/vrmodel/index.vue"),
  51. meta: { title: "场景管理", icon: "iconfire_scenes" },
  52. },
  53. {
  54. name: RouteName.camera,
  55. path: "camera",
  56. component: () => import("@/view/camera/index.vue"),
  57. meta: { title: "相机管理", icon: "iconfire_camera" },
  58. },
  59. ...appRoutes,
  60. {
  61. name: RouteName.organization,
  62. path: "organization",
  63. component: () => import("@/view/organization/index.vue"),
  64. meta: { title: "组织架构", icon: "iconfire_organization" },
  65. },
  66. {
  67. name: RouteName.role,
  68. path: "role",
  69. component: () => import("@/view/role/index.vue"),
  70. meta: { title: "角色管理", icon: "iconfire_role_management" },
  71. },
  72. {
  73. name: RouteName.user,
  74. path: "user",
  75. component: () => import("@/view/user/index.vue"),
  76. meta: { title: "用户管理", icon: "iconfire_user" },
  77. },
  78. {
  79. name: RouteName.caseFile,
  80. path: "case/file/:caseId",
  81. component: () => import("@/view/case/caseFile.vue"),
  82. meta: { title: "卷宗管理" },
  83. },
  84. ],
  85. },
  86. {
  87. name: RouteName.drawCaseFile,
  88. path: "/case/file/:caseId/:type/:id",
  89. component: () => import("@/view/case/draw/index.vue"),
  90. meta: { title: "绘制卷宗图" },
  91. },
  92. ];