From 531ccaeb9a6d98ec4ffbca5e6e44ed5d31e411e9 Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Tue, 1 Nov 2022 12:03:51 +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=BC=95=E7=94=A8=E5=9C=BA=E6=99=AF=E6=AD=A5?= =?UTF-8?q?=E9=AA=A4=E8=83=BD=E6=B7=BB=E5=8A=A0=E5=90=8C=E7=BA=A7=E6=AD=A5?= =?UTF-8?q?=E9=AA=A4=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/business/automation/scenario/EditApiScenario.vue | 5 +++++ .../automation/scenario/component/ApiScenarioComponent.vue | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/api-test/frontend/src/business/automation/scenario/EditApiScenario.vue b/api-test/frontend/src/business/automation/scenario/EditApiScenario.vue index 6c9540fcd3..9d27b73e10 100644 --- a/api-test/frontend/src/business/automation/scenario/EditApiScenario.vue +++ b/api-test/frontend/src/business/automation/scenario/EditApiScenario.vue @@ -1172,6 +1172,11 @@ export default { } }, addComponent(type, plugin) { + if (this.selectedNode && this.selectedNode.parent + && this.selectedNode.parent.data && this.selectedNode.parent.data.disabled) { + this.$warning(this.$t('api_test.scenario.scenario_warning')); + return; + } setComponent(type, this, plugin); }, nodeClick(data, node) { diff --git a/api-test/frontend/src/business/automation/scenario/component/ApiScenarioComponent.vue b/api-test/frontend/src/business/automation/scenario/component/ApiScenarioComponent.vue index d002a352d3..fc811603e9 100644 --- a/api-test/frontend/src/business/automation/scenario/component/ApiScenarioComponent.vue +++ b/api-test/frontend/src/business/automation/scenario/component/ApiScenarioComponent.vue @@ -234,7 +234,7 @@ export default { } } if (this.scenario && this.scenario.hashTree && this.node.expanded) { - this.scenario.disabled = true; + this.scenario.disabled = (this.scenario.id && this.scenario.referenced === 'REF'); this.recursive(this.scenario.hashTree, this.scenario.projectId, (this.scenario.id && this.scenario.referenced === 'REF')); } this.reload();