From 2a2edf8d6f8f081b60de70ac3957dc833516e8ef Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Wed, 24 Aug 2022 17:09:43 +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=E5=A4=8D=E5=88=B6=E5=9C=BA=E6=99=AF=E6=AD=A5?= =?UTF-8?q?=E9=AA=A4=E6=95=B0=E6=8D=AE=E6=BA=90=E5=9B=9E=E6=98=BE=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1016260 --user=赵勇 【接口测试】场景A复制场景B,场景B勾选使用原场景环境没生效 https://www.tapd.cn/55049933/s/1233098 --- .../scenario/component/ApiScenarioComponent.vue | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/frontend/src/business/components/api/automation/scenario/component/ApiScenarioComponent.vue b/frontend/src/business/components/api/automation/scenario/component/ApiScenarioComponent.vue index 02eff750e8..5eabd31147 100644 --- a/frontend/src/business/components/api/automation/scenario/component/ApiScenarioComponent.vue +++ b/frontend/src/business/components/api/automation/scenario/component/ApiScenarioComponent.vue @@ -133,7 +133,7 @@ export default { this.isShowNum = this.scenario.num ? true : false; if (this.scenario.id && this.scenario.referenced === 'REF' && !this.scenario.loaded && this.scenario.hashTree) { this.scenario.root = this.node.parent.parent ? false : true; - this.recursive(this.scenario.hashTree, this.scenario.projectId); + this.recursive(this.scenario.hashTree, this.scenario.projectId, true); } }, components: {ApiBaseComponent, MsSqlBasisParameters, MsTcpBasisParameters, MsDubboBasisParameters, MsApiRequestForm}, @@ -232,6 +232,9 @@ export default { this.node.expanded = !this.node.expanded; } } + if (this.scenario && this.scenario.hashTree && this.node.expanded) { + this.recursive(this.scenario.hashTree, this.scenario.projectId, false); + } this.reload(); }, copyRow() { @@ -246,9 +249,9 @@ export default { this.loading = false }) }, - recursive(arr, id) { + recursive(arr, id, disabled) { for (let i in arr) { - arr[i].disabled = true; + arr[i].disabled = disabled; arr[i].projectId = this.calcProjectId(arr[i].projectId, id); // 处理子请求环境 let typeArray = ["JDBCPostProcessor", "JDBCSampler", "JDBCPreProcessor"]