mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-30 17:52:48 +00:00
feat: 隐藏命中测试
This commit is contained in:
parent
c859678779
commit
1e7ba06560
|
|
@ -161,8 +161,10 @@ function changeMenu(id: string) {
|
|||
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` })
|
||||
if (type === 'WORK_FLOW') {
|
||||
if (lastMatched.name === 'AppSetting' || lastMatched.name === 'AppHitTest') {
|
||||
router.push({ path: `/application/${id}/${type}/overview` })
|
||||
}
|
||||
} else {
|
||||
router.push({
|
||||
name: lastMatched.name,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div v-if="!menu.meta || !menu.meta.hidden" class="sidebar-item">
|
||||
<div v-if="(!menu.meta || !menu.meta.hidden) && showMenu()" class="sidebar-item">
|
||||
<el-menu-item
|
||||
ref="subMenu"
|
||||
:index="menu.path"
|
||||
|
|
@ -23,15 +23,22 @@ const props = defineProps<{
|
|||
activeMenu: any
|
||||
}>()
|
||||
|
||||
const route = useRoute()
|
||||
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
const {
|
||||
params: { id, type }
|
||||
} = route as any
|
||||
|
||||
function showMenu() {
|
||||
if (type === 'WORK_FLOW') {
|
||||
return props.menu.name !== 'AppHitTest'
|
||||
} else {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
function clickHandle(item: any) {
|
||||
if (item.name === 'AppSetting' && type === 'WORK_FLOW') {
|
||||
if (type === 'WORK_FLOW' && item.name === 'AppSetting') {
|
||||
router.push({ path: `/application/${id}/workflow` })
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue