fix(接口测试): 修复复制场景步骤数据源回显错误问题

--bug=1016260 --user=赵勇 【接口测试】场景A复制场景B,场景B勾选使用原场景环境没生效 https://www.tapd.cn/55049933/s/1233098
This commit is contained in:
fit2-zhao 2022-08-24 17:09:43 +08:00 committed by f2c-ci-robot[bot]
parent dc378ca02f
commit 2a2edf8d6f
1 changed files with 6 additions and 3 deletions

View File

@ -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"]