diff --git a/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioReferenceIdService.java b/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioReferenceIdService.java index a7446ef0e9..51f21e91af 100644 --- a/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioReferenceIdService.java +++ b/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioReferenceIdService.java @@ -81,6 +81,15 @@ public class ApiScenarioReferenceIdService { for (int index = 0; index < hashTree.length(); index++) { JSONObject item = hashTree.optJSONObject(index); if (item == null || StringUtils.equals(item.optString(PropertyConstant.TYPE), ElementConstants.SCENARIO)) { + ApiScenarioReferenceId saveItem = new ApiScenarioReferenceId(); + saveItem.setId(UUID.randomUUID().toString()); + saveItem.setApiScenarioId(scenario.getId()); + saveItem.setReferenceId(item.optString(MsHashTreeService.ID)); + saveItem.setReferenceType(item.optString(MsHashTreeService.REFERENCED)); + saveItem.setDataType(item.optString(MsHashTreeService.REF_TYPE)); + saveItem.setCreateTime(System.currentTimeMillis()); + saveItem.setCreateUserId(SessionUtils.getUserId()); + returnList.add(saveItem); continue; } diff --git a/api-test/frontend/src/business/automation/scenario/EditApiScenario.vue b/api-test/frontend/src/business/automation/scenario/EditApiScenario.vue index 9501bbe7ae..156657cb9b 100644 --- a/api-test/frontend/src/business/automation/scenario/EditApiScenario.vue +++ b/api-test/frontend/src/business/automation/scenario/EditApiScenario.vue @@ -1278,6 +1278,9 @@ export default { this.stopDebug = 'stop'; this.messageWebSocket.close(); this.reload(); + if (this.$refs.maximizeScenario) { + this.$refs.maximizeScenario.reload(); + } } }, handleCommand() { diff --git a/api-test/frontend/src/business/automation/scenario/maximize/MaximizeScenario.vue b/api-test/frontend/src/business/automation/scenario/maximize/MaximizeScenario.vue index 69114dd26c..990ef244d1 100644 --- a/api-test/frontend/src/business/automation/scenario/maximize/MaximizeScenario.vue +++ b/api-test/frontend/src/business/automation/scenario/maximize/MaximizeScenario.vue @@ -222,6 +222,8 @@ @suggestClick="suggestClick" @refReload="refReload" @openScenario="openScenario" + @runScenario="runScenario" + @stopScenario="stopScenario" v-if="selectedTreeNode && selectedNode" />
@@ -241,6 +243,8 @@ @suggestClick="suggestClick" @refReload="refReload" @openScenario="openScenario" + @runScenario="runScenario" + @stopScenario="stopScenario" v-show=" selectedTreeNode && selectedNode && stepFilter.get('ALlSamplerStep').indexOf(item.type) === -1 " />