refactor: Search ignores capitalization
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run

--story=1017866 --user=王孝刚 【Bug转需求】【搜索】-函数库、模型、团队成员界面搜索不支持忽略大小写 #2126 https://www.tapd.cn/57709429/s/1654282
This commit is contained in:
wxg0103 2025-02-14 10:55:36 +08:00 committed by wxg
parent a8d79c5e60
commit 9c67f6bfe1
3 changed files with 11 additions and 4 deletions

View File

@ -105,7 +105,7 @@ class FunctionLibSerializer(serializers.Serializer):
query_set = QuerySet(FunctionLib).filter(
(Q(user_id=self.data.get('user_id')) | Q(permission_type='PUBLIC')))
if self.data.get('name') is not None:
query_set = query_set.filter(name__contains=self.data.get('name'))
query_set = query_set.filter(name__icontains=self.data.get('name'))
if self.data.get('desc') is not None:
query_set = query_set.filter(desc__contains=self.data.get('desc'))
if self.data.get('is_active') is not None:

View File

@ -106,7 +106,7 @@ class ModelSerializer(serializers.Serializer):
model_query_set = QuerySet(Model).filter((Q(user_id=user_id) | Q(permission_type='PUBLIC')))
query_params = {}
if name is not None:
query_params['name__contains'] = name
query_params['name__icontains'] = name
if self.data.get('model_type') is not None:
query_params['model_type'] = self.data.get('model_type')
if self.data.get('model_name') is not None:

View File

@ -57,7 +57,12 @@
/>
</template>
</el-table-column>
<el-table-column :label="$t('views.team.setting.check')" align="center" width="100" fixed="right">
<el-table-column
:label="$t('views.team.setting.check')"
align="center"
width="100"
fixed="right"
>
<template #header>
<el-checkbox
:disabled="props.manage"
@ -135,7 +140,9 @@ const allChecked: any = ref({
const filterText = ref('')
const filterData = computed(() => props.data.filter((v: any) => v.name.includes(filterText.value)))
const filterData = computed(() =>
props.data.filter((v: any) => v.name.toLowerCase().includes(filterText.value.toLowerCase()))
)
const allIndeterminate: any = ref({
[TeamEnum.MANAGE]: computed(() => {