From ac50bdf9063c51331111e8d27e00f0f2cb9640b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E6=8C=AF=E8=8A=B3?= Date: Thu, 16 Jan 2025 17:44:10 +0800 Subject: [PATCH] feat: move batch to cluster --- frontend/src/router/index.ts | 58 ++++++++++++------- frontend/src/views/Batch/Batch.vue | 2 +- .../src/views/Role/components/authData.ts | 16 ++++- 3 files changed, 51 insertions(+), 25 deletions(-) diff --git a/frontend/src/router/index.ts b/frontend/src/router/index.ts index 1a8d8eac..650ad99f 100644 --- a/frontend/src/router/index.ts +++ b/frontend/src/router/index.ts @@ -65,7 +65,10 @@ let sidebarRoutes = [ { name: "系统", path: "/cluster", - children: [{ name: "createBatch", menuName: "创建批次" }], + children: [ + { name: "createBatch", menuName: "创建批次" }, + { name: "BatchList", menuName: "批次列表" }, + ], }, { name: "机器列表" }, ], @@ -83,7 +86,10 @@ let sidebarRoutes = [ { name: "系统", path: "/cluster", - children: [{ name: "createBatch", menuName: "创建批次" }], + children: [ + { name: "createBatch", menuName: "创建批次" }, + { name: "BatchList", menuName: "批次列表" }, + ], }, { name: "机器列表", path: "/cluster/" }, { name: "机器详情" }, @@ -103,48 +109,56 @@ let sidebarRoutes = [ { name: "系统", path: "/cluster", - children: [{ name: "macList", menuName: "机器列表" }], + children: [ + { name: "macList", menuName: "机器列表" }, + { name: "BatchList", menuName: "批次列表" }, + ], }, { name: "创建批次" }, ], icon: "", }, }, - ], - }, - { - path: "/batch", - meta: { - title: "批次", - panel: "batch", - icon: "DocumentCopy", - breadcrumb: [{ name: "批次" }], - }, - children: [ { - path: "", - redirect: "/batch/list", - }, - { - path: "/batch/list", + path: "/cluster/batch/list", name: "BatchList", component: () => import("../views/Batch/Batch.vue"), meta: { title: "批次列表", panel: "batch", - breadcrumb: [{ name: "批次", path: "/batch" }, { name: "批次列表" }], + breadcrumb: [ + { + name: "系统", + path: "/cluster", + children: [ + { name: "macList", menuName: "机器列表" }, + { name: "createBatch", menuName: "创建批次" }, + ], + }, + { name: "批次列表" }, + ], icon: "", }, }, { - path: "/batch/detail/:id", + path: "/cluster/batch/detail/:id", name: "BatchDetail", component: () => import("../views/Batch/Detail.vue"), meta: { ignore: true, title: "批次详情", panel: "batch", - breadcrumb: [{ name: "批次", path: "/batch" }, { name: "批次详情" }], + breadcrumb: [ + { + name: "系统", + path: "/cluster", + children: [ + { name: "macList", menuName: "机器列表" }, + { name: "createBatch", menuName: "创建批次" }, + ], + }, + { name: "批次详情" }, + ], icon: "", }, }, diff --git a/frontend/src/views/Batch/Batch.vue b/frontend/src/views/Batch/Batch.vue index da6508a2..6a41acf0 100644 --- a/frontend/src/views/Batch/Batch.vue +++ b/frontend/src/views/Batch/Batch.vue @@ -32,7 +32,7 @@