chenrui  2 лет назад
Родитель
Сommit
7a2955a4e5

+ 2 - 1
src/router/index.ts

@@ -5,6 +5,7 @@ import routesOne from "./routes/routes-file-one";
 import routesTwo from "./routes/routes-file-two";
 import routesThree from "./routes/routes-file-three";
 import routesFour from "./routes/routes-file-four";
+import routesFive from "./routes/routes-file-five";
 const routesPush = (arr, routes) => {
   if (!Array.isArray(arr)) return "请传入数组格式路由表";
   for (let i = 0; i < arr.length; i++) {
@@ -52,7 +53,7 @@ export const asyncRoutes: RouterTy = [
 
 // 插入路由
 routesPush(
-  [...routesOne, ...routesTwo, ...routesThree, ...routesFour],
+  [...routesOne, ...routesTwo, ...routesThree, ...routesFour, ...routesFive],
   asyncRoutes
 );
 

+ 32 - 0
src/router/routes/routes-file-five.ts

@@ -0,0 +1,32 @@
+import Layout from "@/layout";
+
+const HomeRoutes = {
+  path: "/dataQuery",
+  component: Layout,
+  name: "dataQuery",
+  redirect: "/dataQuery/flightQuery",
+  //using el svg icon, the elSvgIcon first when at the same time using elSvgIcon and icon
+  meta: { title: "数据查询", elSvgIcon: "Fold" },
+  children: [
+    {
+      path: "/dataQuery/flightQuery",
+      name: "FlightQuery",
+      meta: { title: "航班查询", elSvgIcon: "Fold", icon: "table" },
+      component: () => import("@/views/dataQuery/flightQuery/index.vue"),
+    },
+    {
+      path: "/dataQuery/waybillQuery",
+      name: "WaybillQuery",
+      meta: { title: "运单查询", elSvgIcon: "Fold", icon: "table" },
+      component: () => import("@/views/dataQuery/waybillQuery/index.vue"),
+    },
+    {
+      path: "/dataQuery/freightInquiry",
+      name: "FreightInquiry",
+      meta: { title: "货物查询", elSvgIcon: "Fold", icon: "table" },
+      component: () => import("@/views/dataQuery/freightInquiry/index.vue"),
+    },
+  ],
+};
+
+export default [HomeRoutes];

+ 11 - 0
src/views/dataQuery/flightQuery/index.vue

@@ -0,0 +1,11 @@
+<template>
+  <div></div>
+</template>
+<script lang="ts">
+import { defineComponent } from "vue";
+
+export default defineComponent({
+  setup() {},
+});
+</script>
+<style lang="scss" scoped></style>

+ 11 - 0
src/views/dataQuery/freightInquiry/index.vue

@@ -0,0 +1,11 @@
+<template>
+  <div></div>
+</template>
+<script lang="ts">
+import { defineComponent } from "vue";
+
+export default defineComponent({
+  setup() {},
+});
+</script>
+<style lang="scss" scoped></style>

+ 5 - 0
src/views/dataQuery/index.vue

@@ -0,0 +1,5 @@
+<template>
+  <div>
+    <router-view />
+  </div>
+</template>

+ 11 - 0
src/views/dataQuery/waybillQuery/index.vue

@@ -0,0 +1,11 @@
+<template>
+  <div></div>
+</template>
+<script lang="ts">
+import { defineComponent } from "vue";
+
+export default defineComponent({
+  setup() {},
+});
+</script>
+<style lang="scss" scoped></style>