From f874447ae256ad3cfa9c60a135e0528c47fa5dba Mon Sep 17 00:00:00 2001 From: zlwu <704541015@qq.com> Date: Thu, 6 Aug 2026 15:40:09 +0800 Subject: [PATCH] feat(oa): whitelist dept and ownerDept for condition participation Co-authored-by: Cursor --- .../src/components/oa-approval/oa-condition-fields.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/web-admin/src/components/oa-approval/oa-condition-fields.ts b/web-admin/src/components/oa-approval/oa-condition-fields.ts index 99a4588f..4153c19a 100644 --- a/web-admin/src/components/oa-approval/oa-condition-fields.ts +++ b/web-admin/src/components/oa-approval/oa-condition-fields.ts @@ -6,6 +6,8 @@ export const CONDITION_ELIGIBLE_TYPES = new Set([ 'money', 'person', 'ownerPerson', + 'dept', + 'ownerDept', 'post', 'radio', 'select', @@ -33,7 +35,14 @@ export interface ConditionCandidate { } export function opsForFieldType(type: string): Array<{ value: ConditionOp; label: string }> { - if (type === 'person' || type === 'ownerPerson' || type === 'post' || type === 'initiator') { + if ( + type === 'person' || + type === 'ownerPerson' || + type === 'dept' || + type === 'ownerDept' || + type === 'post' || + type === 'initiator' + ) { return [{ value: 'contains', label: '包含' }] } // 单选/下拉为离散选项,仅等于/不等于;输入框常填数字参与区间比较,与数字/金额/日期同套运算符