index.js 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. import {
  2. createWebHistory,
  3. createWebHashHistory,
  4. createMemoryHistory,
  5. createRouter,
  6. } from "vue-router";
  7. import Login from "../views/index/Login.vue";
  8. import VoyageList from "../views/voyage/voyageList.vue";
  9. const router = createRouter({
  10. history: createWebHashHistory(),
  11. routes: [
  12. {
  13. path: "/",
  14. name: "index",
  15. component: () => import("../views/index/Index.vue"),
  16. },
  17. {
  18. path: "/login",
  19. name: "login",
  20. meta: {
  21. title: "登录",
  22. },
  23. component: Login,
  24. },
  25. {
  26. path: "/voyage/voyageDetail",
  27. name: "voyageDetail",
  28. meta: {
  29. title: "航次详情",
  30. code: "VOYAGEDETAIL",
  31. },
  32. component: () => import("../views/voyage/voyageDetail.vue"),
  33. },
  34. {
  35. path: "/voyage/voyageList",
  36. name: "voyageList",
  37. meta: {
  38. title: "航次列表",
  39. code: "VOYAGELIST",
  40. },
  41. component: VoyageList,
  42. },
  43. {
  44. path: "/accountManage/subAccountList",
  45. name: "subAccountList",
  46. meta: {
  47. title: "子账户列表",
  48. code: "ACCOUNTLIST",
  49. },
  50. component: () => import("../views/accountManage/subAccountList.vue"),
  51. },
  52. {
  53. path: "/agencyManage/agencyCompanyList",
  54. name: "agencyCompanyList",
  55. meta: {
  56. title: "代理公司列表",
  57. code: "PROXYLIST",
  58. },
  59. component: () => import("../views/agencyManage/agencyCompanyList.vue"),
  60. },
  61. {
  62. path: "/authManage/roleList",
  63. name: "roleList",
  64. meta: {
  65. title: "角色列表",
  66. code: "ROLELIST",
  67. },
  68. component: () => import("../views/authManage/roleList.vue"),
  69. },
  70. {
  71. path: "/authManage/addRole",
  72. name: "addRole",
  73. meta: {
  74. title: "新增角色",
  75. code: "ADDUPDATEROLE",
  76. },
  77. component: () => import("../views/authManage/addRole.vue"),
  78. },
  79. {
  80. path: "/cargoManage/cargoList",
  81. name: "cargoList",
  82. meta: {
  83. title: "货种列表",
  84. code: "CARGOLIST",
  85. },
  86. component: () => import("../views/cargoManage/cargoList.vue"),
  87. },
  88. ],
  89. });
  90. export const asyncRouterList = [
  91. {
  92. path: "/accountManage/subAccountList",
  93. name: "subAccountList",
  94. meta: {
  95. title: "子账户列表",
  96. code: "ACCOUNTLIST",
  97. },
  98. component: () => import("../views/accountManage/subAccountList.vue"),
  99. },
  100. {
  101. path: "/agencyManage/agencyCompanyList",
  102. name: "agencyCompanyList",
  103. meta: {
  104. title: "代理公司列表",
  105. code: "PROXYLIST",
  106. },
  107. component: () => import("../views/agencyManage/agencyCompanyList.vue"),
  108. },
  109. {
  110. path: "/authManage/roleList",
  111. name: "roleList",
  112. meta: {
  113. title: "角色列表",
  114. code: "ROLELIST",
  115. },
  116. component: () => import("../views/authManage/roleList.vue"),
  117. },
  118. {
  119. path: "/authManage/addRole",
  120. name: "addRole",
  121. meta: {
  122. title: "新增角色",
  123. code: "ADDUPDATEROLE",
  124. },
  125. component: () => import("../views/authManage/addRole.vue"),
  126. },
  127. {
  128. path: "/cargoManage/cargoList",
  129. name: "cargoList",
  130. meta: {
  131. title: "货种列表",
  132. code: "CARGOLIST",
  133. },
  134. component: () => import("../views/cargoManage/cargoList.vue"),
  135. },
  136. ];
  137. export default router;