feat(oa): whitelist dept and ownerDept for condition participation

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
zlwuandCursor committed 2026-08-06 15:40:09 +08:00
1 parent d2de132853
commit f874447ae2
1 file changed
+10 -1
@@ -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: '包含' }]
}
// 单选/下拉为离散选项,仅等于/不等于;输入框常填数字参与区间比较,与数字/金额/日期同套运算符