diff --git a/frontend/src/api/modules/api-test/scenario.ts b/frontend/src/api/modules/api-test/scenario.ts index c4c92d793a..e8b1887ea0 100644 --- a/frontend/src/api/modules/api-test/scenario.ts +++ b/frontend/src/api/modules/api-test/scenario.ts @@ -46,6 +46,7 @@ import { ExecuteConditionProcessor } from '@/models/apiTest/common'; import { ApiScenarioBatchDeleteParams, ApiScenarioBatchEditParams, + ApiScenarioBatchOptionResult, ApiScenarioBatchRunParams, ApiScenarioDebugRequest, ApiScenarioGetModuleParams, @@ -147,10 +148,10 @@ export function batchOptionScenario( } ) { if (optionType === 'batchMove') { - return MSR.post({ url: BatchMoveScenarioUrl, data }); + return MSR.post({ url: BatchMoveScenarioUrl, data }); } if (optionType === 'batchCopy') { - return MSR.post({ url: BatchCopyScenarioUrl, data }); + return MSR.post({ url: BatchCopyScenarioUrl, data }); } } diff --git a/frontend/src/models/apiTest/scenario.ts b/frontend/src/models/apiTest/scenario.ts index 37aaf5f252..0437fa1c9e 100644 --- a/frontend/src/models/apiTest/scenario.ts +++ b/frontend/src/models/apiTest/scenario.ts @@ -472,3 +472,9 @@ export interface GetSystemRequestParams { scenarioRequest?: GetSystemRequestTypeParams; refType: ScenarioStepRefType.COPY | ScenarioStepRefType.REF; } + +// 场景批量操作结果 +export interface ApiScenarioBatchOptionResult { + success: number; + error: number; +} diff --git a/frontend/src/views/api-test/scenario/components/scenarioTable.vue b/frontend/src/views/api-test/scenario/components/scenarioTable.vue index 3f7a6406cb..ecc5d3bb9c 100644 --- a/frontend/src/views/api-test/scenario/components/scenarioTable.vue +++ b/frontend/src/views/api-test/scenario/components/scenarioTable.vue @@ -790,6 +790,7 @@ dataIndex: 'environmentName', showDrag: true, width: 159, + showTooltip: true, }, { title: 'apiScenario.table.columns.steps', @@ -1361,7 +1362,7 @@ } else if (isBatchCopy.value) { optionType = 'batchCopy'; } - await batchOptionScenario(optionType, { + const res = await batchOptionScenario(optionType, { selectIds: batchParams.value?.selectedIds || [], selectAll: !!batchParams.value?.selectAll, excludeIds: batchParams.value?.excludeIds || [], @@ -1374,7 +1375,8 @@ Message.success( t('api_scenario.batch_operation.success', { opt: batchOptionType.value, - name: selectedBatchOptModuleName?.value, + success: res?.success, + error: res?.error, }) ); tableSelected.value = []; 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 4ca034b0e8..cbe916c800 100644 --- a/frontend/src/views/api-test/scenario/locale/en-US.ts +++ b/frontend/src/views/api-test/scenario/locale/en-US.ts @@ -57,7 +57,7 @@ export default { 'apiScenario.times': 'bout', 'apiScenario.executionResult': 'Execution result', // 批量操作文案 - 'api_scenario.batch_operation.success': 'Success {opt} to {name}', + 'api_scenario.batch_operation.success': 'Success {success} ,error {error} ', 'api_scenario.table.batchMoveConfirm': 'Ready to {opt} {count} scenarios', 'apiScenario.name': 'Scene name', 'apiScenario.nameRequired': 'Scene name cannot be empty', 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 594ce15f62..4df1876120 100644 --- a/frontend/src/views/api-test/scenario/locale/zh-CN.ts +++ b/frontend/src/views/api-test/scenario/locale/zh-CN.ts @@ -72,7 +72,7 @@ export default { 'apiScenario.updateRefScenarioSuccess': '引用场景数据已更新', 'apiScenario.replaceSuccess': '步骤替换成功', // 批量操作文案 - 'api_scenario.batch_operation.success': '成功{opt}至 {name}', + 'api_scenario.batch_operation.success': '成功{opt} {success} 条,失败 {error} 条', 'api_scenario.table.batchMoveConfirm': '{opt}{count}个场景至已选模块', 'apiScenario.name': '场景名称', 'apiScenario.nameRequired': '场景名称不能为空',