feat(接口管理):接口定义用例场景列表以及回收站增加操作人的筛选
--bug=1037790 --user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001037790
This commit is contained in:
parent
aff509f431
commit
f605fb41b5
|
@ -309,14 +309,18 @@
|
||||||
and api_definition.method in
|
and api_definition.method in
|
||||||
<include refid="io.metersphere.system.mapper.BaseMapper.filterInWrapper"/>
|
<include refid="io.metersphere.system.mapper.BaseMapper.filterInWrapper"/>
|
||||||
</when>
|
</when>
|
||||||
<when test="key=='create_user'">
|
<when test="key=='createUser'">
|
||||||
and api_definition.create_user in
|
and api_definition.create_user in
|
||||||
<include refid="io.metersphere.system.mapper.BaseMapper.filterInWrapper"/>
|
<include refid="io.metersphere.system.mapper.BaseMapper.filterInWrapper"/>
|
||||||
</when>
|
</when>
|
||||||
<when test="key=='version_id'">
|
<when test="key=='versionId'">
|
||||||
and api_definition.version_id in
|
and api_definition.version_id in
|
||||||
<include refid="io.metersphere.system.mapper.BaseMapper.filterInWrapper"/>
|
<include refid="io.metersphere.system.mapper.BaseMapper.filterInWrapper"/>
|
||||||
</when>
|
</when>
|
||||||
|
<when test="key=='deleteUser'">
|
||||||
|
and api_definition.delete_user in
|
||||||
|
<include refid="io.metersphere.system.mapper.BaseMapper.filterInWrapper"/>
|
||||||
|
</when>
|
||||||
<when test="key.startsWith('custom_single')">
|
<when test="key.startsWith('custom_single')">
|
||||||
and api_definition.id in (
|
and api_definition.id in (
|
||||||
select api_id from api_definition_custom_field where concat('custom_single_', field_id) = #{key}
|
select api_id from api_definition_custom_field where concat('custom_single_', field_id) = #{key}
|
||||||
|
|
|
@ -235,11 +235,19 @@
|
||||||
and api_scenario.status in
|
and api_scenario.status in
|
||||||
<include refid="io.metersphere.system.mapper.BaseMapper.filterInWrapper"/>
|
<include refid="io.metersphere.system.mapper.BaseMapper.filterInWrapper"/>
|
||||||
</when>
|
</when>
|
||||||
<when test="key=='create_user'">
|
<when test="key=='createUser'">
|
||||||
and api_scenario.create_user in
|
and api_scenario.create_user in
|
||||||
<include refid="io.metersphere.system.mapper.BaseMapper.filterInWrapper"/>
|
<include refid="io.metersphere.system.mapper.BaseMapper.filterInWrapper"/>
|
||||||
</when>
|
</when>
|
||||||
<when test="key=='version_id'">
|
<when test="key=='updateUser'">
|
||||||
|
and api_scenario.update_user in
|
||||||
|
<include refid="io.metersphere.system.mapper.BaseMapper.filterInWrapper"/>
|
||||||
|
</when>
|
||||||
|
<when test="key=='deleteUser'">
|
||||||
|
and api_scenario.delete_user in
|
||||||
|
<include refid="io.metersphere.system.mapper.BaseMapper.filterInWrapper"/>
|
||||||
|
</when>
|
||||||
|
<when test="key=='versionId'">
|
||||||
and api_scenario.version_id in
|
and api_scenario.version_id in
|
||||||
<include refid="io.metersphere.system.mapper.BaseMapper.filterInWrapper"/>
|
<include refid="io.metersphere.system.mapper.BaseMapper.filterInWrapper"/>
|
||||||
</when>
|
</when>
|
||||||
|
|
|
@ -458,6 +458,12 @@
|
||||||
(#{value})
|
(#{value})
|
||||||
</foreach>
|
</foreach>
|
||||||
</when>
|
</when>
|
||||||
|
<when test="key=='delete_user' or key=='deleteUser'">
|
||||||
|
and atc.delete_user in
|
||||||
|
<foreach collection="values" item="value" separator="," open="(" close=")">
|
||||||
|
(#{value})
|
||||||
|
</foreach>
|
||||||
|
</when>
|
||||||
</choose>
|
</choose>
|
||||||
</if>
|
</if>
|
||||||
</foreach>
|
</foreach>
|
||||||
|
|
|
@ -129,6 +129,19 @@
|
||||||
</a-select>
|
</a-select>
|
||||||
<apiStatus v-else :status="record.status" size="small" />
|
<apiStatus v-else :status="record.status" size="small" />
|
||||||
</template>
|
</template>
|
||||||
|
<template #createUserFilter="{ columnConfig }">
|
||||||
|
<TableFilter
|
||||||
|
v-model:visible="createUserFilterVisible"
|
||||||
|
v-model:status-filters="createUserFilters"
|
||||||
|
:title="(columnConfig.title as string)"
|
||||||
|
:list="memberOptions"
|
||||||
|
@search="loadApiList"
|
||||||
|
>
|
||||||
|
<template #item="{ item }">
|
||||||
|
{{ item.label }}
|
||||||
|
</template>
|
||||||
|
</TableFilter>
|
||||||
|
</template>
|
||||||
<template #action="{ record }">
|
<template #action="{ record }">
|
||||||
<MsButton
|
<MsButton
|
||||||
v-permission="['PROJECT_API_DEFINITION:READ+UPDATE']"
|
v-permission="['PROJECT_API_DEFINITION:READ+UPDATE']"
|
||||||
|
@ -320,6 +333,7 @@
|
||||||
import apiMethodSelect from '@/views/api-test/components/apiMethodSelect.vue';
|
import apiMethodSelect from '@/views/api-test/components/apiMethodSelect.vue';
|
||||||
import apiStatus from '@/views/api-test/components/apiStatus.vue';
|
import apiStatus from '@/views/api-test/components/apiStatus.vue';
|
||||||
import moduleTree from '@/views/api-test/management/components/moduleTree.vue';
|
import moduleTree from '@/views/api-test/management/components/moduleTree.vue';
|
||||||
|
import TableFilter from '@/views/case-management/caseManagementFeature/components/tableFilter.vue';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
batchDeleteDefinition,
|
batchDeleteDefinition,
|
||||||
|
@ -330,6 +344,7 @@
|
||||||
sortDefinition,
|
sortDefinition,
|
||||||
updateDefinition,
|
updateDefinition,
|
||||||
} from '@/api/modules/api-test/management';
|
} from '@/api/modules/api-test/management';
|
||||||
|
import { getProjectOptions } from '@/api/modules/project-management/projectMember';
|
||||||
import { useI18n } from '@/hooks/useI18n';
|
import { useI18n } from '@/hooks/useI18n';
|
||||||
import useModal from '@/hooks/useModal';
|
import useModal from '@/hooks/useModal';
|
||||||
import useTableStore from '@/hooks/useTableStore';
|
import useTableStore from '@/hooks/useTableStore';
|
||||||
|
@ -450,10 +465,13 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'common.creator',
|
title: 'common.creator',
|
||||||
|
slotName: 'createUserName',
|
||||||
dataIndex: 'createUserName',
|
dataIndex: 'createUserName',
|
||||||
width: 180,
|
titleSlotName: 'createUserFilter',
|
||||||
showDrag: true,
|
showInTable: true,
|
||||||
showTooltip: true,
|
showTooltip: true,
|
||||||
|
width: 200,
|
||||||
|
showDrag: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: hasOperationPermission.value ? 'common.operation' : '',
|
title: hasOperationPermission.value ? 'common.operation' : '',
|
||||||
|
@ -534,6 +552,9 @@
|
||||||
const methodFilters = ref<string[]>([]);
|
const methodFilters = ref<string[]>([]);
|
||||||
const statusFilterVisible = ref(false);
|
const statusFilterVisible = ref(false);
|
||||||
const statusFilters = ref<string[]>([]);
|
const statusFilters = ref<string[]>([]);
|
||||||
|
const createUserFilterVisible = ref(false);
|
||||||
|
const createUserFilters = ref<string[]>([]);
|
||||||
|
const memberOptions = ref<{ label: string; value: string }[]>([]);
|
||||||
|
|
||||||
async function getModuleIds() {
|
async function getModuleIds() {
|
||||||
let moduleIds: string[] = [];
|
let moduleIds: string[] = [];
|
||||||
|
@ -548,6 +569,8 @@
|
||||||
}
|
}
|
||||||
async function loadApiList() {
|
async function loadApiList() {
|
||||||
const moduleIds = await getModuleIds();
|
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 = {
|
const params = {
|
||||||
keyword: keyword.value,
|
keyword: keyword.value,
|
||||||
|
@ -557,6 +580,7 @@
|
||||||
filter: {
|
filter: {
|
||||||
status: statusFilters.value,
|
status: statusFilters.value,
|
||||||
method: methodFilters.value,
|
method: methodFilters.value,
|
||||||
|
createUser: createUserFilters.value,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
setLoadListParams(params);
|
setLoadListParams(params);
|
||||||
|
|
|
@ -144,6 +144,19 @@
|
||||||
</template>
|
</template>
|
||||||
</a-trigger>
|
</a-trigger>
|
||||||
</template>
|
</template>
|
||||||
|
<template #createUserFilter="{ columnConfig }">
|
||||||
|
<TableFilter
|
||||||
|
v-model:visible="createUserFilterVisible"
|
||||||
|
v-model:status-filters="createUserFilters"
|
||||||
|
:title="(columnConfig.title as string)"
|
||||||
|
:list="memberOptions"
|
||||||
|
@search="loadCaseList"
|
||||||
|
>
|
||||||
|
<template #item="{ item }">
|
||||||
|
{{ item.label }}
|
||||||
|
</template>
|
||||||
|
</TableFilter>
|
||||||
|
</template>
|
||||||
<template #lastReportStatusFilter="{ columnConfig }">
|
<template #lastReportStatusFilter="{ columnConfig }">
|
||||||
<a-trigger
|
<a-trigger
|
||||||
v-model:popup-visible="lastReportStatusFilterVisible"
|
v-model:popup-visible="lastReportStatusFilterVisible"
|
||||||
|
@ -374,6 +387,7 @@
|
||||||
import BatchRunModal from '@/views/api-test/components/batchRunModal.vue';
|
import BatchRunModal from '@/views/api-test/components/batchRunModal.vue';
|
||||||
import caseAndScenarioReportDrawer from '@/views/api-test/components/caseAndScenarioReportDrawer.vue';
|
import caseAndScenarioReportDrawer from '@/views/api-test/components/caseAndScenarioReportDrawer.vue';
|
||||||
import ExecutionStatus from '@/views/api-test/report/component/reportStatus.vue';
|
import ExecutionStatus from '@/views/api-test/report/component/reportStatus.vue';
|
||||||
|
import TableFilter from '@/views/case-management/caseManagementFeature/components/tableFilter.vue';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
batchDeleteCase,
|
batchDeleteCase,
|
||||||
|
@ -386,6 +400,7 @@
|
||||||
updateCasePriority,
|
updateCasePriority,
|
||||||
updateCaseStatus,
|
updateCaseStatus,
|
||||||
} from '@/api/modules/api-test/management';
|
} from '@/api/modules/api-test/management';
|
||||||
|
import { getProjectOptions } from '@/api/modules/project-management/projectMember';
|
||||||
import { useI18n } from '@/hooks/useI18n';
|
import { useI18n } from '@/hooks/useI18n';
|
||||||
import useModal from '@/hooks/useModal';
|
import useModal from '@/hooks/useModal';
|
||||||
import useTableStore from '@/hooks/useTableStore';
|
import useTableStore from '@/hooks/useTableStore';
|
||||||
|
@ -540,7 +555,10 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'case.tableColumnCreateUser',
|
title: 'case.tableColumnCreateUser',
|
||||||
|
slotName: 'createName',
|
||||||
dataIndex: 'createName',
|
dataIndex: 'createName',
|
||||||
|
titleSlotName: 'createUserFilter',
|
||||||
|
showInTable: true,
|
||||||
showTooltip: true,
|
showTooltip: true,
|
||||||
width: 180,
|
width: 180,
|
||||||
showDrag: true,
|
showDrag: true,
|
||||||
|
@ -614,6 +632,9 @@
|
||||||
const statusFilters = ref<string[]>([]);
|
const statusFilters = ref<string[]>([]);
|
||||||
const caseFilterVisible = ref(false);
|
const caseFilterVisible = ref(false);
|
||||||
const caseFilters = ref<string[]>([]);
|
const caseFilters = ref<string[]>([]);
|
||||||
|
const createUserFilterVisible = ref(false);
|
||||||
|
const createUserFilters = ref<string[]>([]);
|
||||||
|
const memberOptions = ref<{ label: string; value: string }[]>([]);
|
||||||
const lastReportStatusFilterVisible = ref(false);
|
const lastReportStatusFilterVisible = ref(false);
|
||||||
const lastReportStatusList = computed(() => {
|
const lastReportStatusList = computed(() => {
|
||||||
return Object.keys(ReportStatus[ReportEnum.API_REPORT]);
|
return Object.keys(ReportStatus[ReportEnum.API_REPORT]);
|
||||||
|
@ -634,6 +655,9 @@
|
||||||
|
|
||||||
async function loadCaseList() {
|
async function loadCaseList() {
|
||||||
const selectModules = await getModuleIds();
|
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 = {
|
const params = {
|
||||||
apiDefinitionId: props.apiDetail?.id,
|
apiDefinitionId: props.apiDetail?.id,
|
||||||
keyword: keyword.value,
|
keyword: keyword.value,
|
||||||
|
@ -644,6 +668,7 @@
|
||||||
status: statusFilters.value,
|
status: statusFilters.value,
|
||||||
priority: caseFilters.value,
|
priority: caseFilters.value,
|
||||||
lastReportStatus: lastReportStatusFilters.value,
|
lastReportStatus: lastReportStatusFilters.value,
|
||||||
|
createUser: createUserFilters.value,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
setLoadListParams(params);
|
setLoadListParams(params);
|
||||||
|
|
|
@ -89,6 +89,19 @@
|
||||||
</template>
|
</template>
|
||||||
</a-trigger>
|
</a-trigger>
|
||||||
</template>
|
</template>
|
||||||
|
<template #deleteUserFilter="{ columnConfig }">
|
||||||
|
<TableFilter
|
||||||
|
v-model:visible="deleteUserFilterVisible"
|
||||||
|
v-model:status-filters="deleteUserFilters"
|
||||||
|
:title="(columnConfig.title as string)"
|
||||||
|
:list="memberOptions"
|
||||||
|
@search="loadApiList"
|
||||||
|
>
|
||||||
|
<template #item="{ item }">
|
||||||
|
{{ item.label }}
|
||||||
|
</template>
|
||||||
|
</TableFilter>
|
||||||
|
</template>
|
||||||
<template #deleteUserName="{ record }">
|
<template #deleteUserName="{ record }">
|
||||||
<span type="text" class="px-0">{{ record.updateUserName || '-' }}</span>
|
<span type="text" class="px-0">{{ record.updateUserName || '-' }}</span>
|
||||||
</template>
|
</template>
|
||||||
|
@ -122,6 +135,7 @@
|
||||||
import useTable from '@/components/pure/ms-table/useTable';
|
import useTable from '@/components/pure/ms-table/useTable';
|
||||||
import apiMethodName from '@/views/api-test/components/apiMethodName.vue';
|
import apiMethodName from '@/views/api-test/components/apiMethodName.vue';
|
||||||
import apiStatus from '@/views/api-test/components/apiStatus.vue';
|
import apiStatus from '@/views/api-test/components/apiStatus.vue';
|
||||||
|
import TableFilter from '@/views/case-management/caseManagementFeature/components/tableFilter.vue';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
batchCleanOutDefinition,
|
batchCleanOutDefinition,
|
||||||
|
@ -130,6 +144,7 @@
|
||||||
getDefinitionPage,
|
getDefinitionPage,
|
||||||
recoverDefinition,
|
recoverDefinition,
|
||||||
} from '@/api/modules/api-test/management';
|
} from '@/api/modules/api-test/management';
|
||||||
|
import { getProjectOptions } from '@/api/modules/project-management/projectMember';
|
||||||
import { useI18n } from '@/hooks/useI18n';
|
import { useI18n } from '@/hooks/useI18n';
|
||||||
import useModal from '@/hooks/useModal';
|
import useModal from '@/hooks/useModal';
|
||||||
import useTableStore from '@/hooks/useTableStore';
|
import useTableStore from '@/hooks/useTableStore';
|
||||||
|
@ -222,11 +237,9 @@
|
||||||
{
|
{
|
||||||
title: 'apiTestManagement.deleteUser',
|
title: 'apiTestManagement.deleteUser',
|
||||||
slotName: 'deleteUserName',
|
slotName: 'deleteUserName',
|
||||||
|
titleSlotName: 'deleteUserFilter',
|
||||||
|
showTooltip: true,
|
||||||
dataIndex: 'deleteUser',
|
dataIndex: 'deleteUser',
|
||||||
sortable: {
|
|
||||||
sortDirections: ['ascend', 'descend'],
|
|
||||||
sorter: true,
|
|
||||||
},
|
|
||||||
width: 180,
|
width: 180,
|
||||||
showDrag: true,
|
showDrag: true,
|
||||||
},
|
},
|
||||||
|
@ -275,6 +288,9 @@
|
||||||
const methodFilters = ref<string[]>([]);
|
const methodFilters = ref<string[]>([]);
|
||||||
const statusFilterVisible = ref(false);
|
const statusFilterVisible = ref(false);
|
||||||
const statusFilters = ref<string[]>([]);
|
const statusFilters = ref<string[]>([]);
|
||||||
|
const deleteUserFilterVisible = ref(false);
|
||||||
|
const deleteUserFilters = ref<string[]>([]);
|
||||||
|
const memberOptions = ref<{ label: string; value: string }[]>([]);
|
||||||
const moduleIds = computed(() => {
|
const moduleIds = computed(() => {
|
||||||
if (props.activeModule === 'all') {
|
if (props.activeModule === 'all') {
|
||||||
return [];
|
return [];
|
||||||
|
@ -283,14 +299,21 @@
|
||||||
});
|
});
|
||||||
const tableQueryParams = ref<any>();
|
const tableQueryParams = ref<any>();
|
||||||
|
|
||||||
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 = {
|
const params = {
|
||||||
keyword: keyword.value,
|
keyword: keyword.value,
|
||||||
projectId: appStore.currentProjectId,
|
projectId: appStore.currentProjectId,
|
||||||
moduleIds: moduleIds.value,
|
moduleIds: moduleIds.value,
|
||||||
deleted: true,
|
deleted: true,
|
||||||
protocol: props.protocol,
|
protocol: props.protocol,
|
||||||
filter: { status: statusFilters.value, method: methodFilters.value },
|
filter: {
|
||||||
|
status: statusFilters.value,
|
||||||
|
method: methodFilters.value,
|
||||||
|
deleteUser: deleteUserFilters.value,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
setLoadListParams(params);
|
setLoadListParams(params);
|
||||||
loadList();
|
loadList();
|
||||||
|
|
|
@ -94,6 +94,45 @@
|
||||||
</template>
|
</template>
|
||||||
</a-trigger>
|
</a-trigger>
|
||||||
</template>
|
</template>
|
||||||
|
<template #createUserFilter="{ columnConfig }">
|
||||||
|
<TableFilter
|
||||||
|
v-model:visible="createUserFilterVisible"
|
||||||
|
v-model:status-filters="createUserFilters"
|
||||||
|
:title="(columnConfig.title as string)"
|
||||||
|
:list="memberOptions"
|
||||||
|
@search="loadCaseList"
|
||||||
|
>
|
||||||
|
<template #item="{ item }">
|
||||||
|
{{ item.label }}
|
||||||
|
</template>
|
||||||
|
</TableFilter>
|
||||||
|
</template>
|
||||||
|
<template #updateUserFilter="{ columnConfig }">
|
||||||
|
<TableFilter
|
||||||
|
v-model:visible="updateUserFilterVisible"
|
||||||
|
v-model:status-filters="updateUserFilters"
|
||||||
|
:title="(columnConfig.title as string)"
|
||||||
|
:list="memberOptions"
|
||||||
|
@search="loadCaseList"
|
||||||
|
>
|
||||||
|
<template #item="{ item }">
|
||||||
|
{{ item.label }}
|
||||||
|
</template>
|
||||||
|
</TableFilter>
|
||||||
|
</template>
|
||||||
|
<template #deleteUserFilter="{ columnConfig }">
|
||||||
|
<TableFilter
|
||||||
|
v-model:visible="deleteUserFilterVisible"
|
||||||
|
v-model:status-filters="deleteUserFilters"
|
||||||
|
:title="(columnConfig.title as string)"
|
||||||
|
:list="memberOptions"
|
||||||
|
@search="loadCaseList"
|
||||||
|
>
|
||||||
|
<template #item="{ item }">
|
||||||
|
{{ item.label }}
|
||||||
|
</template>
|
||||||
|
</TableFilter>
|
||||||
|
</template>
|
||||||
<template #lastReportStatusFilter="{ columnConfig }">
|
<template #lastReportStatusFilter="{ columnConfig }">
|
||||||
<a-trigger
|
<a-trigger
|
||||||
v-model:popup-visible="lastReportStatusFilterVisible"
|
v-model:popup-visible="lastReportStatusFilterVisible"
|
||||||
|
@ -181,6 +220,7 @@
|
||||||
import caseLevel from '@/components/business/ms-case-associate/caseLevel.vue';
|
import caseLevel from '@/components/business/ms-case-associate/caseLevel.vue';
|
||||||
import apiStatus from '@/views/api-test/components/apiStatus.vue';
|
import apiStatus from '@/views/api-test/components/apiStatus.vue';
|
||||||
import ExecutionStatus from '@/views/api-test/report/component/reportStatus.vue';
|
import ExecutionStatus from '@/views/api-test/report/component/reportStatus.vue';
|
||||||
|
import TableFilter from '@/views/case-management/caseManagementFeature/components/tableFilter.vue';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
batchDeleteRecycleCase,
|
batchDeleteRecycleCase,
|
||||||
|
@ -190,6 +230,7 @@
|
||||||
recoverCase,
|
recoverCase,
|
||||||
} from '@/api/modules/api-test/management';
|
} from '@/api/modules/api-test/management';
|
||||||
import { getCaseDefaultFields } from '@/api/modules/case-management/featureCase';
|
import { getCaseDefaultFields } from '@/api/modules/case-management/featureCase';
|
||||||
|
import { getProjectOptions } from '@/api/modules/project-management/projectMember';
|
||||||
import { useI18n } from '@/hooks/useI18n';
|
import { useI18n } from '@/hooks/useI18n';
|
||||||
import useModal from '@/hooks/useModal';
|
import useModal from '@/hooks/useModal';
|
||||||
import useTableStore from '@/hooks/useTableStore';
|
import useTableStore from '@/hooks/useTableStore';
|
||||||
|
@ -304,7 +345,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'case.tableColumnUpdateUser',
|
title: 'case.tableColumnUpdateUser',
|
||||||
dataIndex: 'updateUser',
|
dataIndex: 'updateName',
|
||||||
|
titleSlotName: 'updateUserFilter',
|
||||||
showInTable: true,
|
showInTable: true,
|
||||||
showTooltip: true,
|
showTooltip: true,
|
||||||
width: 180,
|
width: 180,
|
||||||
|
@ -325,6 +367,7 @@
|
||||||
{
|
{
|
||||||
title: 'case.tableColumnCreateUser',
|
title: 'case.tableColumnCreateUser',
|
||||||
dataIndex: 'createName',
|
dataIndex: 'createName',
|
||||||
|
titleSlotName: 'createUserFilter',
|
||||||
showTooltip: true,
|
showTooltip: true,
|
||||||
width: 180,
|
width: 180,
|
||||||
showDrag: true,
|
showDrag: true,
|
||||||
|
@ -344,6 +387,7 @@
|
||||||
{
|
{
|
||||||
title: 'apiTestManagement.deleteUser',
|
title: 'apiTestManagement.deleteUser',
|
||||||
dataIndex: 'deleteName',
|
dataIndex: 'deleteName',
|
||||||
|
titleSlotName: 'deleteUserFilter',
|
||||||
showInTable: true,
|
showInTable: true,
|
||||||
showTooltip: true,
|
showTooltip: true,
|
||||||
width: 180,
|
width: 180,
|
||||||
|
@ -408,12 +452,21 @@
|
||||||
const lastReportStatusFilterVisible = ref(false);
|
const lastReportStatusFilterVisible = ref(false);
|
||||||
const lastReportStatusList = ref<string[]>(Object.keys(ReportStatus[ReportEnum.API_REPORT]));
|
const lastReportStatusList = ref<string[]>(Object.keys(ReportStatus[ReportEnum.API_REPORT]));
|
||||||
const lastReportStatusFilters = ref<string[]>([]);
|
const lastReportStatusFilters = ref<string[]>([]);
|
||||||
|
const createUserFilterVisible = ref(false);
|
||||||
|
const createUserFilters = ref<string[]>([]);
|
||||||
|
const updateUserFilterVisible = ref(false);
|
||||||
|
const updateUserFilters = ref<string[]>([]);
|
||||||
|
const deleteUserFilterVisible = ref(false);
|
||||||
|
const deleteUserFilters = ref<string[]>([]);
|
||||||
|
const memberOptions = ref<{ label: string; value: string }[]>([]);
|
||||||
|
|
||||||
const moduleIds = computed(() => {
|
const moduleIds = computed(() => {
|
||||||
return props.activeModule === 'all' ? [] : [props.activeModule];
|
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 = {
|
const params = {
|
||||||
keyword: keyword.value,
|
keyword: keyword.value,
|
||||||
projectId: appStore.currentProjectId,
|
projectId: appStore.currentProjectId,
|
||||||
|
@ -423,6 +476,9 @@
|
||||||
status: statusFilters.value,
|
status: statusFilters.value,
|
||||||
priority: caseFilters.value,
|
priority: caseFilters.value,
|
||||||
lastReportStatus: lastReportStatusFilters.value,
|
lastReportStatus: lastReportStatusFilters.value,
|
||||||
|
createUser: createUserFilters.value,
|
||||||
|
updateUser: updateUserFilters.value,
|
||||||
|
deleteUser: deleteUserFilters.value,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
setLoadListParams(params);
|
setLoadListParams(params);
|
||||||
|
|
|
@ -216,6 +216,32 @@
|
||||||
:status="record.lastReportStatus"
|
:status="record.lastReportStatus"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
<template #createUserFilter="{ columnConfig }">
|
||||||
|
<TableFilter
|
||||||
|
v-model:visible="createUserFilterVisible"
|
||||||
|
v-model:status-filters="createUserFilters"
|
||||||
|
:title="(columnConfig.title as string)"
|
||||||
|
:list="memberOptions"
|
||||||
|
@search="loadScenarioList"
|
||||||
|
>
|
||||||
|
<template #item="{ item }">
|
||||||
|
{{ item.label }}
|
||||||
|
</template>
|
||||||
|
</TableFilter>
|
||||||
|
</template>
|
||||||
|
<template #updateUserFilter="{ columnConfig }">
|
||||||
|
<TableFilter
|
||||||
|
v-model:visible="updateUserFilterVisible"
|
||||||
|
v-model:status-filters="updateUserFilters"
|
||||||
|
:title="(columnConfig.title as string)"
|
||||||
|
:list="memberOptions"
|
||||||
|
@search="loadScenarioList"
|
||||||
|
>
|
||||||
|
<template #item="{ item }">
|
||||||
|
{{ item.label }}
|
||||||
|
</template>
|
||||||
|
</TableFilter>
|
||||||
|
</template>
|
||||||
<template #operation="{ record }">
|
<template #operation="{ record }">
|
||||||
<MsButton
|
<MsButton
|
||||||
v-permission="['PROJECT_API_SCENARIO:READ+UPDATE']"
|
v-permission="['PROJECT_API_SCENARIO:READ+UPDATE']"
|
||||||
|
@ -564,6 +590,7 @@
|
||||||
import BatchRunModal from '@/views/api-test/components/batchRunModal.vue';
|
import BatchRunModal from '@/views/api-test/components/batchRunModal.vue';
|
||||||
import ExecutionStatus from '@/views/api-test/report/component/reportStatus.vue';
|
import ExecutionStatus from '@/views/api-test/report/component/reportStatus.vue';
|
||||||
import operationScenarioModuleTree from '@/views/api-test/scenario/components/operationScenarioModuleTree.vue';
|
import operationScenarioModuleTree from '@/views/api-test/scenario/components/operationScenarioModuleTree.vue';
|
||||||
|
import TableFilter from '@/views/case-management/caseManagementFeature/components/tableFilter.vue';
|
||||||
|
|
||||||
import { getEnvList, getPoolId, getPoolOption } from '@/api/modules/api-test/management';
|
import { getEnvList, getPoolId, getPoolOption } from '@/api/modules/api-test/management';
|
||||||
import {
|
import {
|
||||||
|
@ -578,6 +605,7 @@
|
||||||
updateScenarioPro,
|
updateScenarioPro,
|
||||||
updateScenarioStatus,
|
updateScenarioStatus,
|
||||||
} from '@/api/modules/api-test/scenario';
|
} from '@/api/modules/api-test/scenario';
|
||||||
|
import { getProjectOptions } from '@/api/modules/project-management/projectMember';
|
||||||
import { useI18n } from '@/hooks/useI18n';
|
import { useI18n } from '@/hooks/useI18n';
|
||||||
import useModal from '@/hooks/useModal';
|
import useModal from '@/hooks/useModal';
|
||||||
import useTableStore from '@/hooks/useTableStore';
|
import useTableStore from '@/hooks/useTableStore';
|
||||||
|
@ -610,6 +638,11 @@
|
||||||
const lastReportStatusFilters = computed(() => {
|
const lastReportStatusFilters = computed(() => {
|
||||||
return Object.keys(ReportStatus[ReportEnum.API_SCENARIO_REPORT]);
|
return Object.keys(ReportStatus[ReportEnum.API_SCENARIO_REPORT]);
|
||||||
});
|
});
|
||||||
|
const createUserFilterVisible = ref(false);
|
||||||
|
const createUserFilters = ref<string[]>([]);
|
||||||
|
const updateUserFilterVisible = ref(false);
|
||||||
|
const updateUserFilters = ref<string[]>([]);
|
||||||
|
const memberOptions = ref<{ label: string; value: string }[]>([]);
|
||||||
const appStore = useAppStore();
|
const appStore = useAppStore();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const { openModal } = useModal();
|
const { openModal } = useModal();
|
||||||
|
@ -783,6 +816,7 @@
|
||||||
title: 'apiScenario.table.columns.createUser',
|
title: 'apiScenario.table.columns.createUser',
|
||||||
dataIndex: 'createUserName',
|
dataIndex: 'createUserName',
|
||||||
slotName: 'createUserName',
|
slotName: 'createUserName',
|
||||||
|
titleSlotName: 'createUserFilter',
|
||||||
showTooltip: true,
|
showTooltip: true,
|
||||||
showDrag: true,
|
showDrag: true,
|
||||||
width: 109,
|
width: 109,
|
||||||
|
@ -791,6 +825,7 @@
|
||||||
title: 'apiScenario.table.columns.updateUser',
|
title: 'apiScenario.table.columns.updateUser',
|
||||||
dataIndex: 'updateUserName',
|
dataIndex: 'updateUserName',
|
||||||
slotName: 'updateUserName',
|
slotName: 'updateUserName',
|
||||||
|
titleSlotName: 'updateUserFilter',
|
||||||
showTooltip: true,
|
showTooltip: true,
|
||||||
showDrag: true,
|
showDrag: true,
|
||||||
width: 109,
|
width: 109,
|
||||||
|
@ -923,6 +958,8 @@
|
||||||
moduleIds = [props.activeModule, ...props.offspringIds];
|
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 = {
|
const params = {
|
||||||
keyword: keyword.value,
|
keyword: keyword.value,
|
||||||
projectId: appStore.currentProjectId,
|
projectId: appStore.currentProjectId,
|
||||||
|
@ -931,6 +968,8 @@
|
||||||
lastReportStatus: lastReportStatusListFilters.value,
|
lastReportStatus: lastReportStatusListFilters.value,
|
||||||
status: statusFilters.value,
|
status: statusFilters.value,
|
||||||
priority: priorityFilters.value,
|
priority: priorityFilters.value,
|
||||||
|
createUser: createUserFilters.value,
|
||||||
|
updateUser: updateUserFilters.value,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
setLoadListParams(params);
|
setLoadListParams(params);
|
||||||
|
|
|
@ -45,6 +45,7 @@ export default {
|
||||||
'apiScenario.table.columns.createTime': 'Create time',
|
'apiScenario.table.columns.createTime': 'Create time',
|
||||||
'apiScenario.table.columns.updateUser': 'Update user',
|
'apiScenario.table.columns.updateUser': 'Update user',
|
||||||
'apiScenario.table.columns.updateTime': 'Update time',
|
'apiScenario.table.columns.updateTime': 'Update time',
|
||||||
|
'apiScenario.table.columns.deleteUser': 'Delete User',
|
||||||
'apiScenario.table.columns.operation': 'Operation',
|
'apiScenario.table.columns.operation': 'Operation',
|
||||||
'apiScenario.table.columns.deleteTime': 'Delete time',
|
'apiScenario.table.columns.deleteTime': 'Delete time',
|
||||||
'api_scenario.table.tableNoDataAndPlease': 'No data yet, please',
|
'api_scenario.table.tableNoDataAndPlease': 'No data yet, please',
|
||||||
|
|
|
@ -45,6 +45,7 @@ export default {
|
||||||
'apiScenario.table.columns.updateUser': '更新人',
|
'apiScenario.table.columns.updateUser': '更新人',
|
||||||
'apiScenario.table.columns.updateTime': '更新时间',
|
'apiScenario.table.columns.updateTime': '更新时间',
|
||||||
'apiScenario.table.columns.operation': '操作人',
|
'apiScenario.table.columns.operation': '操作人',
|
||||||
|
'apiScenario.table.columns.deleteUser': '删除人',
|
||||||
'apiScenario.table.columns.deleteTime': '删除时间',
|
'apiScenario.table.columns.deleteTime': '删除时间',
|
||||||
'api_scenario.table.searchPlaceholder': '通过 ID/名称/标签搜索',
|
'api_scenario.table.searchPlaceholder': '通过 ID/名称/标签搜索',
|
||||||
'api_scenario.table.batchModalSubTitle': '(已选 {count} 个场景)',
|
'api_scenario.table.batchModalSubTitle': '(已选 {count} 个场景)',
|
||||||
|
|
|
@ -139,6 +139,45 @@
|
||||||
:status="record.lastReportStatus"
|
:status="record.lastReportStatus"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
<template #createUserFilter="{ columnConfig }">
|
||||||
|
<TableFilter
|
||||||
|
v-model:visible="createUserFilterVisible"
|
||||||
|
v-model:status-filters="createUserFilters"
|
||||||
|
:title="(columnConfig.title as string)"
|
||||||
|
:list="memberOptions"
|
||||||
|
@search="loadScenarioList"
|
||||||
|
>
|
||||||
|
<template #item="{ item }">
|
||||||
|
{{ item.label }}
|
||||||
|
</template>
|
||||||
|
</TableFilter>
|
||||||
|
</template>
|
||||||
|
<template #updateUserFilter="{ columnConfig }">
|
||||||
|
<TableFilter
|
||||||
|
v-model:visible="updateUserFilterVisible"
|
||||||
|
v-model:status-filters="updateUserFilters"
|
||||||
|
:title="(columnConfig.title as string)"
|
||||||
|
:list="memberOptions"
|
||||||
|
@search="loadScenarioList"
|
||||||
|
>
|
||||||
|
<template #item="{ item }">
|
||||||
|
{{ item.label }}
|
||||||
|
</template>
|
||||||
|
</TableFilter>
|
||||||
|
</template>
|
||||||
|
<template #deleteUserFilter="{ columnConfig }">
|
||||||
|
<TableFilter
|
||||||
|
v-model:visible="deleteUserFilterVisible"
|
||||||
|
v-model:status-filters="deleteUserFilters"
|
||||||
|
:title="(columnConfig.title as string)"
|
||||||
|
:list="memberOptions"
|
||||||
|
@search="loadScenarioList"
|
||||||
|
>
|
||||||
|
<template #item="{ item }">
|
||||||
|
{{ item.label }}
|
||||||
|
</template>
|
||||||
|
</TableFilter>
|
||||||
|
</template>
|
||||||
<template #operation="{ record }">
|
<template #operation="{ record }">
|
||||||
<MsButton
|
<MsButton
|
||||||
v-permission="['PROJECT_API_SCENARIO:READ+DELETED']"
|
v-permission="['PROJECT_API_SCENARIO:READ+DELETED']"
|
||||||
|
@ -176,6 +215,7 @@
|
||||||
import type { CaseLevel } from '@/components/business/ms-case-associate/types';
|
import type { CaseLevel } from '@/components/business/ms-case-associate/types';
|
||||||
import apiStatus from '@/views/api-test/components/apiStatus.vue';
|
import apiStatus from '@/views/api-test/components/apiStatus.vue';
|
||||||
import ExecutionStatus from '@/views/api-test/report/component/reportStatus.vue';
|
import ExecutionStatus from '@/views/api-test/report/component/reportStatus.vue';
|
||||||
|
import TableFilter from '@/views/case-management/caseManagementFeature/components/tableFilter.vue';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
batchDeleteScenario,
|
batchDeleteScenario,
|
||||||
|
@ -184,6 +224,7 @@
|
||||||
getTrashScenarioPage,
|
getTrashScenarioPage,
|
||||||
recoverScenario,
|
recoverScenario,
|
||||||
} from '@/api/modules/api-test/scenario';
|
} from '@/api/modules/api-test/scenario';
|
||||||
|
import { getProjectOptions } from '@/api/modules/project-management/projectMember';
|
||||||
import { useI18n } from '@/hooks/useI18n';
|
import { useI18n } from '@/hooks/useI18n';
|
||||||
import useModal from '@/hooks/useModal';
|
import useModal from '@/hooks/useModal';
|
||||||
import useTableStore from '@/hooks/useTableStore';
|
import useTableStore from '@/hooks/useTableStore';
|
||||||
|
@ -329,8 +370,8 @@
|
||||||
{
|
{
|
||||||
title: 'apiScenario.table.columns.createUser',
|
title: 'apiScenario.table.columns.createUser',
|
||||||
dataIndex: 'createUserName',
|
dataIndex: 'createUserName',
|
||||||
|
titleSlotName: 'createUserFilter',
|
||||||
showTooltip: true,
|
showTooltip: true,
|
||||||
titleSlotName: 'createUser',
|
|
||||||
width: 109,
|
width: 109,
|
||||||
showDrag: true,
|
showDrag: true,
|
||||||
},
|
},
|
||||||
|
@ -338,15 +379,15 @@
|
||||||
title: 'apiScenario.table.columns.updateUser',
|
title: 'apiScenario.table.columns.updateUser',
|
||||||
dataIndex: 'updateUserName',
|
dataIndex: 'updateUserName',
|
||||||
showTooltip: true,
|
showTooltip: true,
|
||||||
titleSlotName: 'updateUser',
|
titleSlotName: 'updateUserFilter',
|
||||||
width: 109,
|
width: 109,
|
||||||
showDrag: true,
|
showDrag: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'apiScenario.table.columns.operation',
|
title: 'apiScenario.table.columns.deleteUser',
|
||||||
dataIndex: 'deleteUserName',
|
dataIndex: 'deleteUserName',
|
||||||
showTooltip: true,
|
showTooltip: true,
|
||||||
titleSlotName: 'deleteUser',
|
titleSlotName: 'deleteUserFilter',
|
||||||
width: 109,
|
width: 109,
|
||||||
showDrag: true,
|
showDrag: true,
|
||||||
},
|
},
|
||||||
|
@ -406,6 +447,13 @@
|
||||||
|
|
||||||
const statusFilterVisible = ref(false);
|
const statusFilterVisible = ref(false);
|
||||||
const statusFilters = ref<string[]>([]);
|
const statusFilters = ref<string[]>([]);
|
||||||
|
const createUserFilterVisible = ref(false);
|
||||||
|
const createUserFilters = ref<string[]>([]);
|
||||||
|
const updateUserFilterVisible = ref(false);
|
||||||
|
const updateUserFilters = ref<string[]>([]);
|
||||||
|
const deleteUserFilterVisible = ref(false);
|
||||||
|
const deleteUserFilters = ref<string[]>([]);
|
||||||
|
const memberOptions = ref<{ label: string; value: string }[]>([]);
|
||||||
const tableStore = useTableStore();
|
const tableStore = useTableStore();
|
||||||
async function loadScenarioList(refreshTreeCount?: boolean) {
|
async function loadScenarioList(refreshTreeCount?: boolean) {
|
||||||
let moduleIds: string[] = [];
|
let moduleIds: string[] = [];
|
||||||
|
@ -416,7 +464,8 @@
|
||||||
moduleIds = [props.activeModule, ...props.offspringIds];
|
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 = {
|
const params = {
|
||||||
keyword: keyword.value,
|
keyword: keyword.value,
|
||||||
projectId: appStore.currentProjectId,
|
projectId: appStore.currentProjectId,
|
||||||
|
@ -425,6 +474,9 @@
|
||||||
lastReportStatus: lastReportStatusListFilters.value,
|
lastReportStatus: lastReportStatusListFilters.value,
|
||||||
status: statusFilters.value,
|
status: statusFilters.value,
|
||||||
priority: priorityFilters.value,
|
priority: priorityFilters.value,
|
||||||
|
createUser: createUserFilters.value,
|
||||||
|
updateUser: updateUserFilters.value,
|
||||||
|
deleteUser: deleteUserFilters.value,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
setLoadListParams(params);
|
setLoadListParams(params);
|
||||||
|
|
Loading…
Reference in New Issue