From a59238d93caa373fe65ca932515aba7a5b3d93ca Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Fri, 18 Dec 2020 12:46:09 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=8C=96):=20=E4=BF=AE=E5=A4=8D=E5=9C=BA=E6=99=AF=E6=AD=A5?= =?UTF-8?q?=E9=AA=A4=E7=A7=BB=E9=99=A4=E7=BC=BA=E9=99=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/metersphere/api/service/ApiDefinitionService.java | 2 ++ backend/src/main/java/io/metersphere/xpack | 2 +- .../components/api/automation/scenario/EditApiScenario.vue | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java b/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java index c708e19d9c..d82500fcfa 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java @@ -201,6 +201,7 @@ public class ApiDefinitionService { test.setName(request.getName()); test.setPath(request.getPath()); test.setProjectId(request.getProjectId()); + request.getRequest().setId(request.getId()); test.setRequest(JSONObject.toJSONString(request.getRequest())); test.setUpdateTime(System.currentTimeMillis()); test.setStatus(request.getStatus()); @@ -227,6 +228,7 @@ public class ApiDefinitionService { test.setPath(request.getPath()); test.setModuleId(request.getModuleId()); test.setProjectId(request.getProjectId()); + request.getRequest().setId(request.getId()); test.setRequest(JSONObject.toJSONString(request.getRequest())); test.setCreateTime(System.currentTimeMillis()); test.setUpdateTime(System.currentTimeMillis()); diff --git a/backend/src/main/java/io/metersphere/xpack b/backend/src/main/java/io/metersphere/xpack index efb49c9b4b..61397c1672 160000 --- a/backend/src/main/java/io/metersphere/xpack +++ b/backend/src/main/java/io/metersphere/xpack @@ -1 +1 @@ -Subproject commit efb49c9b4be136ce48e9550dc9c8a2975d9f4d7f +Subproject commit 61397c16728a63493507679f7e0940d9099f337f diff --git a/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue b/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue index 3dacc7a663..0136fad3e7 100644 --- a/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue +++ b/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue @@ -552,7 +552,7 @@ remove(row, node) { const parent = node.parent const hashTree = parent.data.hashTree || parent.data; - const index = hashTree.findIndex(d => d.id != undefined && row.id != undefined && d.id === row.id) + const index = hashTree.findIndex(d => d.resourceId != undefined && row.resourceId != undefined && d.resourceId === row.resourceId) hashTree.splice(index, 1); this.sort(); this.reload();