From 25487dbede336a396bb3b1ee2e3eb7011ac9ce0e Mon Sep 17 00:00:00 2001 From: dxc Date: Fri, 27 Feb 2026 11:00:44 +0800 Subject: [PATCH] fix: operation permission detection for codes ending with :operation Co-authored-by: aider (openai/DeepSeek-V3.2-Thinking) --- inventory-web/src/views/system/PermissionConfig.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inventory-web/src/views/system/PermissionConfig.vue b/inventory-web/src/views/system/PermissionConfig.vue index f501778..207d12b 100644 --- a/inventory-web/src/views/system/PermissionConfig.vue +++ b/inventory-web/src/views/system/PermissionConfig.vue @@ -220,7 +220,7 @@ const transformData = (nodes: any[]): PermissionNode[] => { const allChildren = node.children || [] // 1. 找操作列 (作为 Write 权限) - const opNode = allChildren.find((c: any) => c.type === 'element' && (c.code === 'operation' || c.code.endsWith('_op'))) + const opNode = allChildren.find((c: any) => c.type === 'element' && (c.code === 'operation' || c.code.endsWith(':operation') || c.code.endsWith('_op'))) const operationCode = opNode ? opNode.code : null // 2. 找普通列 (作为字段权限) @@ -624,4 +624,4 @@ onMounted(() => { padding: 1px 4px; border-radius: 3px; } - \ No newline at end of file +