完善企业编辑页面并修复采购建单重试

This commit is contained in:
2026-10-30 15:42:38 +08:00
parent d6ef770e48
commit 55868177cd
19 changed files with 568 additions and 224 deletions
+6 -2
View File
@@ -5,6 +5,7 @@ import {
clientNavigation,
filterNavigationByPermissions,
getNavigationParentKeys,
getNavigationLeaves,
} from '@/navigation/clientNavigation'
import { useAuthStore } from '@/modules/auth/public'
import { useCustomsPendingStore } from '@/modules/first-leg/public'
@@ -40,8 +41,11 @@ onBeforeUnmount(() => {
})
const visibleNavigation = computed(() => filterNavigationByPermissions(clientNavigation, auth.permissionCodes))
const activeNavigationPath = computed(() => getNavigationLeaves(visibleNavigation.value)
.filter(node => node.path === props.activePath || (node.path !== '/' && props.activePath.startsWith(`${node.path}/`)))
.sort((left, right) => right.path.length - left.path.length)[0]?.path ?? props.activePath)
const activeParentKeys = computed(() => new Set(getNavigationParentKeys(visibleNavigation.value, props.activePath)))
const activeParentKeys = computed(() => new Set(getNavigationParentKeys(visibleNavigation.value, activeNavigationPath.value)))
const openedKeys = ref<ReadonlySet<string>>(new Set(activeParentKeys.value))
// Expand the order group by default so the three customer order shortcuts are visible.
openedKeys.value = new Set([...openedKeys.value, 'order-center'])
@@ -73,7 +77,7 @@ function handleSelect(path: string) {
:key="node.key"
:node="node"
:badges="badges"
:active-path="activePath"
:active-path="activeNavigationPath"
:opened-keys="openedKeys"
:active-parent-keys="activeParentKeys"
:level="0"