diff --git a/apps/jingrow/frontend/src/core/pagetype/GenericListPage.vue b/apps/jingrow/frontend/src/core/pagetype/GenericListPage.vue index 71b1c69..40c39f0 100644 --- a/apps/jingrow/frontend/src/core/pagetype/GenericListPage.vue +++ b/apps/jingrow/frontend/src/core/pagetype/GenericListPage.vue @@ -574,8 +574,20 @@ async function loadData() { // 多选字段使用 in 操作符 filterConditions.push([fieldName, 'in', value]) } else { - // 单选字段使用 = 操作符 - filterConditions.push([fieldName, '=', value]) + // 根据字段类型选择操作符 + const fieldMeta = metaFields.value.find(f => f.fieldname === fieldName) + const fieldType = fieldMeta?.fieldtype || '' + + // 文本类型字段使用 like 操作符进行模糊搜索 + const isTextLikeField = ['Data', 'Text', 'Long Text', 'Comment', 'Link'].includes(fieldType) + + if (isTextLikeField && typeof value === 'string') { + // 使用 like 操作符,值前后添加 % 通配符 + filterConditions.push([fieldName, 'like', `%${value}%`]) + } else { + // 其他类型字段使用精确匹配 + filterConditions.push([fieldName, '=', value]) + } } } })