From e5711a2351c63d65a96cb14ea5135feede050cb8 Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Tue, 18 Oct 2022 10:59:08 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BB=BB=E5=8A=A1=E4=B8=AD=E5=BF=83=E6=8A=A5?= =?UTF-8?q?=E5=91=8A=E8=B7=B3=E8=BD=AC=E9=97=AE=E9=A2=98=E5=8F=8A=E5=85=A8?= =?UTF-8?q?=E9=83=A8=E5=81=9C=E6=AD=A2=E6=8A=A5=E9=94=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1018298 --user=赵勇 【接口测试】接口自动化批量执行,任务中心点击详情名称进行跳转跳转到错误位置(系统设置) https://www.tapd.cn/55049933/s/1265592 --- .../automation/report/ApiReportViewHeader.vue | 13 +++++-------- .../io/metersphere/task/service/TaskService.java | 4 ++-- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/api-test/frontend/src/business/automation/report/ApiReportViewHeader.vue b/api-test/frontend/src/business/automation/report/ApiReportViewHeader.vue index 52339c1d26..584485c677 100644 --- a/api-test/frontend/src/business/automation/report/ApiReportViewHeader.vue +++ b/api-test/frontend/src/business/automation/report/ApiReportViewHeader.vue @@ -151,15 +151,12 @@ export default { $event.target.blur(); }, redirect() { + let uuid = getUUID().substring(1, 5); + let projectId = getCurrentProjectID(); + let workspaceId = getCurrentWorkspaceId(); + let path = `/api/automation/?redirectID=${uuid}&dataType=scenario&projectId=${projectId}&workspaceId=${workspaceId}&resourceId=${this.scenarioId}`; let data = this.$router.resolve({ - name: 'ApiAutomation', - query: { - redirectID: getUUID(), - dataType: "scenario", - projectId: getCurrentProjectID(), - workspaceId: getCurrentWorkspaceId(), - resourceId: this.scenarioId - } + path: path }); window.open(data.href, '_blank'); }, diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/task/service/TaskService.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/task/service/TaskService.java index 83e0536a43..65d88d2b3f 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/task/service/TaskService.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/task/service/TaskService.java @@ -89,7 +89,7 @@ public class TaskService { microService.postForData(MicroServiceName.API_TEST, "/api/automation/stop/batch", reportIds); } if (taskRequestMap.containsKey(PERF)) { - microService.postForData(MicroServiceName.API_TEST, "/performance/stop/batch", taskRequestMap.get(PERF)); + microService.postForData(MicroServiceName.PERFORMANCE_TEST, "/performance/stop/batch", taskRequestMap.get(PERF)); } if(taskRequestMap.containsKey(UI)){ microService.postForData(MicroServiceName.UI_TEST, "/ui/automation/stop/batch", reportIds); @@ -100,7 +100,7 @@ public class TaskService { public void stopPerf(List reportIds) { if (CollectionUtils.isNotEmpty(reportIds)) { Map taskRequestMap = reportIds.stream().collect(Collectors.toMap(TaskRequestDTO::getType, taskRequest -> taskRequest)); - microService.postForData(MicroServiceName.API_TEST, "/performance/stop/batch", taskRequestMap.get(PERF)); + microService.postForData(MicroServiceName.PERFORMANCE_TEST, "/performance/stop/batch", taskRequestMap.get(PERF)); } }