From c53fe5ac4a2ecbc113f7b32a517cd2e0d2c2a07a Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Fri, 27 Nov 2020 17:57:23 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E5=BC=95=E7=94=A8=E7=9A=84=E5=9C=BA=E6=99=AF=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E7=A6=81=E7=94=A8=E5=90=AF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/dto/scenario/Scenario.java | 1 + .../components/api/test/ApiTestConfig.vue | 6 +++++- .../api/test/components/ApiScenarioConfig.vue | 20 ++++++++++++++----- .../components/request/ApiRequestConfig.vue | 7 +++++-- .../api/test/model/ScenarioModel.js | 11 +++++++++- 5 files changed, 36 insertions(+), 9 deletions(-) diff --git a/backend/src/main/java/io/metersphere/api/dto/scenario/Scenario.java b/backend/src/main/java/io/metersphere/api/dto/scenario/Scenario.java index e245cbdc09..20bc993991 100644 --- a/backend/src/main/java/io/metersphere/api/dto/scenario/Scenario.java +++ b/backend/src/main/java/io/metersphere/api/dto/scenario/Scenario.java @@ -21,4 +21,5 @@ public class Scenario { private TCPConfig tcpConfig; private List databaseConfigs; private Boolean enable; + private Boolean referenceEnable; } diff --git a/frontend/src/business/components/api/test/ApiTestConfig.vue b/frontend/src/business/components/api/test/ApiTestConfig.vue index b20dd09439..504b3f3d38 100644 --- a/frontend/src/business/components/api/test/ApiTestConfig.vue +++ b/frontend/src/business/components/api/test/ApiTestConfig.vue @@ -171,7 +171,11 @@ export default { let scenarios = []; this.test.scenarioDefinition.forEach(scenario => { if (scenario.isReference()) { - if (scenarioMap[scenario.id]) scenarios.push(scenarioMap[scenario.id]); + if (scenarioMap[scenario.id]) { + let item = scenarioMap[scenario.id]; + item.referenceEnable = scenario.referenceEnable; + scenarios.push(item); + } } else { scenarios.push(scenario); } diff --git a/frontend/src/business/components/api/test/components/ApiScenarioConfig.vue b/frontend/src/business/components/api/test/components/ApiScenarioConfig.vue index 98f388dfc0..cff3eefaa8 100644 --- a/frontend/src/business/components/api/test/components/ApiScenarioConfig.vue +++ b/frontend/src/business/components/api/test/components/ApiScenarioConfig.vue @@ -5,7 +5,7 @@ + :title="scenario.name" :name="index" :class="{'disable-scenario': !scenario.isEnable()}">