From 6cf7d72d0a3487e01df94de8d6919c32b7abf4fd Mon Sep 17 00:00:00 2001 From: wangdan-fit2cloud Date: Thu, 20 Jun 2024 14:43:27 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=AB=98=E7=BA=A7=E7=BC=96=E6=8E=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/src/layout/components/breadcrumb/index.vue | 20 ++++++++++++------- ui/src/views/dataset/DatasetSetting.vue | 4 ++-- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/ui/src/layout/components/breadcrumb/index.vue b/ui/src/layout/components/breadcrumb/index.vue index 6656c63f9..1f529ee39 100644 --- a/ui/src/layout/components/breadcrumb/index.vue +++ b/ui/src/layout/components/breadcrumb/index.vue @@ -145,12 +145,6 @@ const current = computed(() => { } = route return list.value?.filter((v) => v.id === id)?.[0] }) -// const current = computed(() => { -// const { -// params: { id } -// } = route -// return list.value?.filter((v) => v.id === id)?.[0]?.type -// }) const isApplication = computed(() => { const { meta } = route as any @@ -163,7 +157,19 @@ const isDataset = computed(() => { function changeMenu(id: string) { const lastMatched = route.matched[route.matched.length - 1] if (lastMatched) { - router.push({ name: lastMatched.name, params: { id: id } }) + if (isDataset.value) { + router.push({ name: lastMatched.name, params: { id: id } }) + } else if (isApplication.value) { + const type = list.value?.filter((v) => v.id === id)?.[0]?.type + if (lastMatched.name === 'AppSetting' && type === 'WORK_FLOW') { + router.push({ path: `/application/${id}/${type}/overview` }) + } else { + router.push({ + name: lastMatched.name, + params: { id: id, type: type } + }) + } + } } } diff --git a/ui/src/views/dataset/DatasetSetting.vue b/ui/src/views/dataset/DatasetSetting.vue index 361555221..457ec625e 100644 --- a/ui/src/views/dataset/DatasetSetting.vue +++ b/ui/src/views/dataset/DatasetSetting.vue @@ -51,7 +51,7 @@ /> - +
保存