修改: 权限重复
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 4m27s

This commit is contained in:
sexygoat
2026-02-26 17:34:11 +08:00
parent 3570b062a1
commit f1cb1e53c8
7 changed files with 140 additions and 127 deletions

View File

@@ -734,15 +734,15 @@
const getLeftCheckedKeysWithHalf = (): number[] => {
if (!leftTreeRef.value) return []
const checkedKeys = leftTreeRef.value.getCheckedKeys(false)
const parentIds = new Set<number>()
const allIds = new Set<number>(checkedKeys)
// 为每个勾选的节点找到所有父节点
checkedKeys.forEach((key: number) => {
const parents = getParentNodeIds(key)
parents.forEach(parentId => parentIds.add(parentId))
parents.forEach(parentId => allIds.add(parentId))
})
return [...checkedKeys, ...Array.from(parentIds)]
return Array.from(allIds)
}
// 添加权限