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 3094a8947f..bf2eb50a53 100644 --- a/frontend/src/business/components/api/automation/scenario/component/ApiScenarioComponent.vue +++ b/frontend/src/business/components/api/automation/scenario/component/ApiScenarioComponent.vue @@ -124,7 +124,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}, @@ -223,6 +223,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() { @@ -237,9 +240,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"]