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 @@
+
+
+
+ {{ item.label }}
+
+
+
([]);
const statusFilterVisible = ref(false);
const statusFilters = ref([]);
+ const createUserFilterVisible = ref(false);
+ const createUserFilters = ref([]);
+ const memberOptions = ref<{ label: string; value: string }[]>([]);
async function getModuleIds() {
let moduleIds: string[] = [];
@@ -548,6 +569,8 @@
}
async function loadApiList() {
const moduleIds = await getModuleIds();
+ 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,
@@ -557,6 +580,7 @@
filter: {
status: statusFilters.value,
method: methodFilters.value,
+ createUser: createUserFilters.value,
},
};
setLoadListParams(params);
diff --git a/frontend/src/views/api-test/management/components/management/case/caseTable.vue b/frontend/src/views/api-test/management/components/management/case/caseTable.vue
index 721f26ec5a..54d8c2fe7d 100644
--- a/frontend/src/views/api-test/management/components/management/case/caseTable.vue
+++ b/frontend/src/views/api-test/management/components/management/case/caseTable.vue
@@ -144,6 +144,19 @@
+
+
+
+ {{ item.label }}
+
+
+
([]);
const caseFilterVisible = ref(false);
const caseFilters = ref([]);
+ const createUserFilterVisible = ref(false);
+ const createUserFilters = ref([]);
+ const memberOptions = ref<{ label: string; value: string }[]>([]);
const lastReportStatusFilterVisible = ref(false);
const lastReportStatusList = computed(() => {
return Object.keys(ReportStatus[ReportEnum.API_REPORT]);
@@ -634,6 +655,9 @@
async function loadCaseList() {
const selectModules = await getModuleIds();
+ memberOptions.value = await getProjectOptions(appStore.currentProjectId, keyword.value);
+ memberOptions.value = memberOptions.value.map((e: any) => ({ label: e.name, value: e.id }));
+
const params = {
apiDefinitionId: props.apiDetail?.id,
keyword: keyword.value,
@@ -644,6 +668,7 @@
status: statusFilters.value,
priority: caseFilters.value,
lastReportStatus: lastReportStatusFilters.value,
+ createUser: createUserFilters.value,
},
};
setLoadListParams(params);
diff --git a/frontend/src/views/api-test/management/components/recycle/api/apiTable.vue b/frontend/src/views/api-test/management/components/recycle/api/apiTable.vue
index 9e7496e58f..acacaf9782 100644
--- a/frontend/src/views/api-test/management/components/recycle/api/apiTable.vue
+++ b/frontend/src/views/api-test/management/components/recycle/api/apiTable.vue
@@ -89,6 +89,19 @@
+
+
+
+ {{ item.label }}
+
+
+
{{ record.updateUserName || '-' }}
@@ -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 @@
+
+
+
+ {{ item.label }}
+
+
+
+
+
+
+ {{ item.label }}
+
+
+
+
+
+
+ {{ item.label }}
+
+
+
(Object.keys(ReportStatus[ReportEnum.API_REPORT]));
const lastReportStatusFilters = ref([]);
+ const createUserFilterVisible = ref(false);
+ const createUserFilters = ref([]);
+ const updateUserFilterVisible = ref(false);
+ const updateUserFilters = ref([]);
+ const deleteUserFilterVisible = ref(false);
+ const deleteUserFilters = ref([]);
+ const memberOptions = ref<{ label: string; value: string }[]>([]);
const moduleIds = computed(() => {
return props.activeModule === 'all' ? [] : [props.activeModule];
});
- function loadCaseList() {
+ async function loadCaseList() {
+ 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,
@@ -423,6 +476,9 @@
status: statusFilters.value,
priority: caseFilters.value,
lastReportStatus: lastReportStatusFilters.value,
+ createUser: createUserFilters.value,
+ updateUser: updateUserFilters.value,
+ deleteUser: deleteUserFilters.value,
},
};
setLoadListParams(params);
diff --git a/frontend/src/views/api-test/scenario/components/scenarioTable.vue b/frontend/src/views/api-test/scenario/components/scenarioTable.vue
index 4cd6ae03a5..a099103b23 100644
--- a/frontend/src/views/api-test/scenario/components/scenarioTable.vue
+++ b/frontend/src/views/api-test/scenario/components/scenarioTable.vue
@@ -216,6 +216,32 @@
:status="record.lastReportStatus"
/>
+
+
+
+ {{ item.label }}
+
+
+
+
+
+
+ {{ item.label }}
+
+
+
{
return Object.keys(ReportStatus[ReportEnum.API_SCENARIO_REPORT]);
});
+ const createUserFilterVisible = ref(false);
+ const createUserFilters = ref([]);
+ const updateUserFilterVisible = ref(false);
+ const updateUserFilters = ref([]);
+ const memberOptions = ref<{ label: string; value: string }[]>([]);
const appStore = useAppStore();
const { t } = useI18n();
const { openModal } = useModal();
@@ -783,6 +816,7 @@
title: 'apiScenario.table.columns.createUser',
dataIndex: 'createUserName',
slotName: 'createUserName',
+ titleSlotName: 'createUserFilter',
showTooltip: true,
showDrag: true,
width: 109,
@@ -791,6 +825,7 @@
title: 'apiScenario.table.columns.updateUser',
dataIndex: 'updateUserName',
slotName: 'updateUserName',
+ titleSlotName: 'updateUserFilter',
showTooltip: true,
showDrag: true,
width: 109,
@@ -923,6 +958,8 @@
moduleIds = [props.activeModule, ...props.offspringIds];
}
}
+ 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,
@@ -931,6 +968,8 @@
lastReportStatus: lastReportStatusListFilters.value,
status: statusFilters.value,
priority: priorityFilters.value,
+ createUser: createUserFilters.value,
+ updateUser: updateUserFilters.value,
},
};
setLoadListParams(params);
diff --git a/frontend/src/views/api-test/scenario/locale/en-US.ts b/frontend/src/views/api-test/scenario/locale/en-US.ts
index 9eceb2a941..4ca034b0e8 100644
--- a/frontend/src/views/api-test/scenario/locale/en-US.ts
+++ b/frontend/src/views/api-test/scenario/locale/en-US.ts
@@ -45,6 +45,7 @@ export default {
'apiScenario.table.columns.createTime': 'Create time',
'apiScenario.table.columns.updateUser': 'Update user',
'apiScenario.table.columns.updateTime': 'Update time',
+ 'apiScenario.table.columns.deleteUser': 'Delete User',
'apiScenario.table.columns.operation': 'Operation',
'apiScenario.table.columns.deleteTime': 'Delete time',
'api_scenario.table.tableNoDataAndPlease': 'No data yet, please',
diff --git a/frontend/src/views/api-test/scenario/locale/zh-CN.ts b/frontend/src/views/api-test/scenario/locale/zh-CN.ts
index c0e7944cfc..95a531806a 100644
--- a/frontend/src/views/api-test/scenario/locale/zh-CN.ts
+++ b/frontend/src/views/api-test/scenario/locale/zh-CN.ts
@@ -45,6 +45,7 @@ export default {
'apiScenario.table.columns.updateUser': '更新人',
'apiScenario.table.columns.updateTime': '更新时间',
'apiScenario.table.columns.operation': '操作人',
+ 'apiScenario.table.columns.deleteUser': '删除人',
'apiScenario.table.columns.deleteTime': '删除时间',
'api_scenario.table.searchPlaceholder': '通过 ID/名称/标签搜索',
'api_scenario.table.batchModalSubTitle': '(已选 {count} 个场景)',
diff --git a/frontend/src/views/api-test/scenario/recycle/recycleTable.vue b/frontend/src/views/api-test/scenario/recycle/recycleTable.vue
index b35098748d..d70eed044d 100644
--- a/frontend/src/views/api-test/scenario/recycle/recycleTable.vue
+++ b/frontend/src/views/api-test/scenario/recycle/recycleTable.vue
@@ -139,6 +139,45 @@
:status="record.lastReportStatus"
/>
+
+
+
+ {{ item.label }}
+
+
+
+
+
+
+ {{ item.label }}
+
+
+
+
+
+
+ {{ item.label }}
+
+
+
([]);
+ const createUserFilterVisible = ref(false);
+ const createUserFilters = ref([]);
+ const updateUserFilterVisible = ref(false);
+ const updateUserFilters = ref([]);
+ const deleteUserFilterVisible = ref(false);
+ const deleteUserFilters = ref([]);
+ const memberOptions = ref<{ label: string; value: string }[]>([]);
const tableStore = useTableStore();
async function loadScenarioList(refreshTreeCount?: boolean) {
let moduleIds: string[] = [];
@@ -416,7 +464,8 @@
moduleIds = [props.activeModule, ...props.offspringIds];
}
}
-
+ 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,
@@ -425,6 +474,9 @@
lastReportStatus: lastReportStatusListFilters.value,
status: statusFilters.value,
priority: priorityFilters.value,
+ createUser: createUserFilters.value,
+ updateUser: updateUserFilters.value,
+ deleteUser: deleteUserFilters.value,
},
};
setLoadListParams(params);