diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/mapper/ExtApiDefinitionMapper.xml b/backend/services/api-test/src/main/java/io/metersphere/api/mapper/ExtApiDefinitionMapper.xml index c7c245458a..962d812144 100644 --- a/backend/services/api-test/src/main/java/io/metersphere/api/mapper/ExtApiDefinitionMapper.xml +++ b/backend/services/api-test/src/main/java/io/metersphere/api/mapper/ExtApiDefinitionMapper.xml @@ -309,14 +309,18 @@ and api_definition.method in - + and api_definition.create_user in - + and api_definition.version_id in + + and api_definition.delete_user in + + and api_definition.id in ( select api_id from api_definition_custom_field where concat('custom_single_', field_id) = #{key} diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/mapper/ExtApiScenarioMapper.xml b/backend/services/api-test/src/main/java/io/metersphere/api/mapper/ExtApiScenarioMapper.xml index 0724815d89..3cc772ba67 100644 --- a/backend/services/api-test/src/main/java/io/metersphere/api/mapper/ExtApiScenarioMapper.xml +++ b/backend/services/api-test/src/main/java/io/metersphere/api/mapper/ExtApiScenarioMapper.xml @@ -235,11 +235,19 @@ and api_scenario.status in - + and api_scenario.create_user in - + + and api_scenario.update_user in + + + + and api_scenario.delete_user in + + + and api_scenario.version_id in diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/mapper/ExtApiTestCaseMapper.xml b/backend/services/api-test/src/main/java/io/metersphere/api/mapper/ExtApiTestCaseMapper.xml index c68ccdb343..eae85f556a 100644 --- a/backend/services/api-test/src/main/java/io/metersphere/api/mapper/ExtApiTestCaseMapper.xml +++ b/backend/services/api-test/src/main/java/io/metersphere/api/mapper/ExtApiTestCaseMapper.xml @@ -458,6 +458,12 @@ (#{value}) + + and atc.delete_user in + + (#{value}) + + diff --git a/frontend/src/views/api-test/management/components/management/api/apiTable.vue b/frontend/src/views/api-test/management/components/management/api/apiTable.vue index 7bac05c122..e639223c2d 100644 --- a/frontend/src/views/api-test/management/components/management/api/apiTable.vue +++ b/frontend/src/views/api-test/management/components/management/api/apiTable.vue @@ -129,6 +129,19 @@ + + + @@ -122,6 +135,7 @@ import useTable from '@/components/pure/ms-table/useTable'; import apiMethodName from '@/views/api-test/components/apiMethodName.vue'; import apiStatus from '@/views/api-test/components/apiStatus.vue'; + import TableFilter from '@/views/case-management/caseManagementFeature/components/tableFilter.vue'; import { batchCleanOutDefinition, @@ -130,6 +144,7 @@ getDefinitionPage, recoverDefinition, } from '@/api/modules/api-test/management'; + import { getProjectOptions } from '@/api/modules/project-management/projectMember'; import { useI18n } from '@/hooks/useI18n'; import useModal from '@/hooks/useModal'; import useTableStore from '@/hooks/useTableStore'; @@ -222,11 +237,9 @@ { title: 'apiTestManagement.deleteUser', slotName: 'deleteUserName', + titleSlotName: 'deleteUserFilter', + showTooltip: true, dataIndex: 'deleteUser', - sortable: { - sortDirections: ['ascend', 'descend'], - sorter: true, - }, width: 180, showDrag: true, }, @@ -275,6 +288,9 @@ const methodFilters = ref([]); const statusFilterVisible = ref(false); const statusFilters = ref([]); + const deleteUserFilterVisible = ref(false); + const deleteUserFilters = ref([]); + const memberOptions = ref<{ label: string; value: string }[]>([]); const moduleIds = computed(() => { if (props.activeModule === 'all') { return []; @@ -283,14 +299,21 @@ }); const tableQueryParams = ref(); - function loadApiList() { + async function loadApiList() { + memberOptions.value = await getProjectOptions(appStore.currentProjectId, keyword.value); + memberOptions.value = memberOptions.value.map((e: any) => ({ label: e.name, value: e.id })); + const params = { keyword: keyword.value, projectId: appStore.currentProjectId, moduleIds: moduleIds.value, deleted: true, protocol: props.protocol, - filter: { status: statusFilters.value, method: methodFilters.value }, + filter: { + status: statusFilters.value, + method: methodFilters.value, + deleteUser: deleteUserFilters.value, + }, }; setLoadListParams(params); loadList(); diff --git a/frontend/src/views/api-test/management/components/recycle/case/caseTable.vue b/frontend/src/views/api-test/management/components/recycle/case/caseTable.vue index 8ee48d2bba..2dc269f0a5 100644 --- a/frontend/src/views/api-test/management/components/recycle/case/caseTable.vue +++ b/frontend/src/views/api-test/management/components/recycle/case/caseTable.vue @@ -94,6 +94,45 @@ + + + + + + + +