fix(接口测试): 修复批量操作全选没有支持过滤的缺陷

--bug=1039722 --user=王孝刚
【接口测试】定义-回收站-CASE-全选所有页-筛选用例等级/状态/更新人/创建人/删除人-批量恢复-选择数量错误
https://www.tapd.cn/55049933/s/1501335
--bug=1039721 --user=王孝刚
【接口测试】定义-回收站-API-全选所有页-筛选请求类型/状态/删除人-批量恢复-选择数量错误
https://www.tapd.cn/55049933/s/1501337
--bug=1039715 --user=王孝刚
【接口测试】场景-回收站-全选所有页-筛选场景等级/状态/执行结果/创建人/更新人/删除人/搜索框搜索-批量恢复-选择数量错误
https://www.tapd.cn/55049933/s/1501340
--bug=1039714 --user=王孝刚
【接口测试】场景-全选所有页-筛选场景等级/状态/执行结果/创建人/更新人/搜索框搜索-选择数量错误
https://www.tapd.cn/55049933/s/1501341
--bug=1039712 --user=王孝刚
【接口测试】定义-API/CASE-全选所有页-筛选创建人/请求类型/状态-批量删除-选择数量不正确
https://www.tapd.cn/55049933/s/1501347
This commit is contained in:
wxg0103 2024-04-18 17:59:09 +08:00 committed by Craftsman
parent 1e355322da
commit 301146a738
9 changed files with 23 additions and 8 deletions

View File

@ -107,7 +107,7 @@
<select id="selectBaseByIds" resultType="io.metersphere.system.dto.sdk.BaseTreeNode">
SELECT id, name, parent_id AS parentId, 'module' AS type
SELECT id, name, parent_id AS parentId, 'MODULE' AS type
FROM api_definition_module
WHERE id IN
<foreach collection="ids" item="id" open="(" separator="," close=")">

View File

@ -105,7 +105,7 @@
:node-more-actions="folderMoreActions"
:default-expand-all="isExpandAll"
:expand-all="isExpandAll"
:empty-text="props.isModal ? t('apiTestManagement.noMatchModule') : t('apiTestManagement.noMatchModule')"
:empty-text="props.isModal ? t('apiTestManagement.noMatchModule') : t('apiTestManagement.noMatchModuleAndApi')"
:draggable="!props.readOnly && !props.isModal && hasAnyPermission(['PROJECT_API_DEFINITION:READ+UPDATE'])"
:virtual-list-props="virtualListProps"
:field-names="{

View File

@ -404,8 +404,11 @@
protocol: props.protocol,
condition: {
keyword: keyword.value,
filter: propsRes.value.filter,
combine: batchParams.value.condition,
filter: {
status: statusFilters.value,
method: methodFilters.value,
deleteUser: deleteUserFilters.value,
},
},
};
}
@ -456,6 +459,7 @@
*/
function handleTableBatch(event: BatchActionParams, params: BatchActionQueryParams) {
batchParams.value = { ...params };
switch (event.eventTag) {
case 'batchRecover':
batchRecover();

View File

@ -603,7 +603,14 @@
protocol: props.protocol,
condition: {
keyword: keyword.value,
filter: propsRes.value.filter,
filter: {
status: statusFilters.value,
priority: caseFilters.value,
lastReportStatus: lastReportStatusFilters.value,
createUser: createUserFilters.value,
updateUser: updateUserFilters.value,
deleteUser: deleteUserFilters.value,
},
combine: batchParams.value.condition,
},
};

View File

@ -17,7 +17,8 @@ export default {
'apiTestManagement.allCase': 'All case',
'apiTestManagement.searchTip': 'Please enter module/api name',
'apiTestManagement.moveSearchTip': 'Please enter the module name to search',
'apiTestManagement.noMatchModule': 'No matching module/api yet',
'apiTestManagement.noMatchModuleAndApi': 'No matching module/api yet',
'apiTestManagement.noMatchModule': 'No matching module yet',
'apiTestManagement.execute': 'Execute',
'apiTestManagement.executeMethod': 'Execute method',
'apiTestManagement.recycle.batchRecover': 'Recover',

View File

@ -17,7 +17,8 @@ export default {
'apiTestManagement.allCase': '全部用例',
'apiTestManagement.searchTip': '请输入模块/接口名称',
'apiTestManagement.moveSearchTip': '请输入模块名称搜索',
'apiTestManagement.noMatchModule': '暂无匹配的模块/接口',
'apiTestManagement.noMatchModuleAndApi': '暂无匹配的模块/接口',
'apiTestManagement.noMatchModule': '暂无匹配的模块',
'apiTestManagement.execute': '执行',
'apiTestManagement.executeMethod': '执行方式',
'apiTestManagement.recycle.batchRecover': '恢复',

View File

@ -59,7 +59,7 @@
:node-more-actions="folderMoreActions"
:default-expand-all="isExpandAll"
:expand-all="isExpandAll"
:empty-text="t('apiScenario.tree.noMatchModule')"
:empty-text="t('apiTestManagement.noMatchModule')"
:draggable="!props.readOnly && hasAnyPermission(['PROJECT_API_SCENARIO:READ+UPDATE'])"
:virtual-list-props="virtualListProps"
:field-names="{

View File

@ -614,6 +614,7 @@
priority: priorityFilters.value,
createUser: createUserFilters.value,
updateUser: updateUserFilters.value,
deleteUser: deleteUserFilters.value,
};
if (batchParams.value.condition) {
batchParams.value.condition.filter = { ...filterParams };

View File

@ -482,6 +482,7 @@
handleUser: handleUserFilterValue.value,
updateUser: updateUserFilterValue.value,
createUser: createUserFilterValue.value,
deleteUser: deleteUserFilterValue.value,
};
filterParams[severityColumnId.value] = severityFilterValue.value;
if (params.condition) {