feat: 高级编排

This commit is contained in:
wangdan-fit2cloud 2024-06-20 14:43:27 +08:00
parent 26b4a716f7
commit 6cf7d72d0a
2 changed files with 15 additions and 9 deletions

View File

@ -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 }
})
}
}
}
}

View File

@ -51,7 +51,7 @@
/>
</el-form-item>
</el-form>
<!--
<h4 class="title-decoration-1 mb-16">关联应用</h4>
<el-row :gutter="12">
@ -79,7 +79,7 @@
{{ item.name }}
</CardCheckbox>
</el-col>
</el-row> -->
</el-row>
<div class="text-right">
<el-button @click="submit" type="primary"> 保存 </el-button>