chenrui  il y a 2 ans
Parent
commit
51a5f5a4c8
1 fichiers modifiés avec 46 ajouts et 20 suppressions
  1. 46 20
      src/router/routes/routes-file-four.ts

+ 46 - 20
src/router/routes/routes-file-four.ts

@@ -27,14 +27,27 @@ const HomeRoutes = {
       path: "/systemSettings/warningSet",
       name: "WarningSet",
       meta: { title: "预警告警策略", elSvgIcon: "Fold", icon: "table" },
-      component: () => import("@/views/systemSettings/warningSet/index.vue"),
-    },
-    {
-      path: "/systemSettings/warningEdit",
-      name: "WarningEdit",
-      hidden: true,
-      meta: { title: "预警告警策略编辑", elSvgIcon: "Fold", icon: "table" },
-      component: () => import("@/views/systemSettings/warningEdit/index.vue"),
+      redirect: "/systemSettings/warningSet",
+      component: {
+        render: () => h(resolveComponent("router-view")),
+      },
+      children: [
+        {
+          path: "/systemSettings/warningSet",
+          name: "WarningSet",
+          hidden: true,
+          component: () =>
+            import("@/views/systemSettings/warningSet/index.vue"),
+        },
+        {
+          path: "/systemSettings/warningEdit",
+          name: "WarningEdit",
+          hidden: true,
+          meta: { title: "预警告警策略编辑", elSvgIcon: "Fold", icon: "table" },
+          component: () =>
+            import("@/views/systemSettings/warningEdit/index.vue"),
+        },
+      ],
     },
     {
       path: "/systemSettings/log",
@@ -53,18 +66,31 @@ const HomeRoutes = {
       path: "/systemSettings/serviceMonitor",
       name: "ServiceMonitor",
       meta: { title: "服务监控", elSvgIcon: "Fold", icon: "table" },
-      component: () =>
-        import("@/views/systemSettings/serviceManagement/serviceMonitor.vue"),
-    },
-    {
-      path: "/systemSettings/serviceMonitorEdit",
-      name: "ServiceMonitorEdit",
-      hidden: true,
-      meta: { title: "服务监控编辑", elSvgIcon: "Fold", icon: "table" },
-      component: () =>
-        import(
-          "@/views/systemSettings/serviceManagement/serviceMonitorEdit.vue"
-        ),
+      redirect: "/systemSettings/serviceMonitor",
+      component: {
+        render: () => h(resolveComponent("router-view")),
+      },
+      children: [
+        {
+          path: "/systemSettings/serviceMonitor",
+          name: "ServiceMonitor",
+          hidden: true,
+          component: () =>
+            import(
+              "@/views/systemSettings/serviceManagement/serviceMonitor.vue"
+            ),
+        },
+        {
+          path: "/systemSettings/serviceMonitorEdit",
+          name: "ServiceMonitorEdit",
+          hidden: true,
+          meta: { title: "服务监控编辑", elSvgIcon: "Fold", icon: "table" },
+          component: () =>
+            import(
+              "@/views/systemSettings/serviceManagement/serviceMonitorEdit.vue"
+            ),
+        },
+      ],
     },
     {
       path: "/systemSettings/queryTemplate",