From bfb64d4dcee2177d46f5a479ba1c6ac7958738f8 Mon Sep 17 00:00:00 2001 From: logan Date: Sun, 31 May 2026 23:35:58 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20WorkflowEditor=20=E4=B8=8B=E6=8B=89?= =?UTF-8?q?=E8=BF=87=E6=BB=A4=E7=A6=81=E7=94=A8=E7=94=A8=E6=88=B7=20?= =?UTF-8?q?=E2=80=94=20getEligibleUsers=20=E5=A2=9E=E5=8A=A0=20is=5Factive?= =?UTF-8?q?=20=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 审核阶段: 只显示 is_active=true 且角色为 admin/dba/auditor 的用户 - 执行阶段: 只显示 is_active=true 且角色为 admin/dba 的用户 - 禁用用户不再出现在审批流程编辑器下拉列表中 --- frontend/src/pages/WorkflowPage.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/frontend/src/pages/WorkflowPage.tsx b/frontend/src/pages/WorkflowPage.tsx index 201dbdd..ffd39bd 100644 --- a/frontend/src/pages/WorkflowPage.tsx +++ b/frontend/src/pages/WorkflowPage.tsx @@ -281,9 +281,10 @@ function WorkflowEditorModal({ workflow, users, onClose, onSaved }: EditorProps) }; const getEligibleUsers = (stepType: string) => { - if (stepType === 'audit') return users.filter(u => ['admin', 'superadmin', 'dba', 'auditor'].includes(u.role)); - if (stepType === 'execute') return users.filter(u => ['admin', 'superadmin', 'dba'].includes(u.role)); - return users; + const active = users.filter(u => u.is_active); + if (stepType === 'audit') return active.filter(u => ['admin', 'superadmin', 'dba', 'auditor'].includes(u.role)); + if (stepType === 'execute') return active.filter(u => ['admin', 'superadmin', 'dba'].includes(u.role)); + return active; }; const toggleAllUsers = (idx: number) => {