fix(接口测试): 编辑某个场景页面收起问题

This commit is contained in:
fit2-zhao 2021-05-12 16:04:34 +08:00 committed by fit2-zhao
parent 87e35bbbc6
commit 95dca84106
2 changed files with 8 additions and 3 deletions

View File

@ -889,10 +889,14 @@
}
},
nodeExpand(data, node) {
node.expanded = true;
if (data && data.resourceId && this.expandedNode.indexOf(data.resourceId) === -1) {
this.expandedNode.push(data.resourceId);
}
},
nodeCollapse(data, node) {
node.expanded = false;
if (data && data.resourceId) {
this.expandedNode.splice(this.expandedNode.indexOf(data.resourceId), 1);
}
},
setFiles(item, bodyUploadFiles, obj) {
if (item.body) {
@ -1166,7 +1170,7 @@
//
for (let i in this.scenarioDefinition) {
if (this.scenarioDefinition[i]) {
if (this.expandedStatus) {
if (this.expandedStatus && this.expandedNode.indexOf(this.scenarioDefinition[i].resourceId) === -1) {
this.expandedNode.push(this.scenarioDefinition[i].resourceId);
}
this.scenarioDefinition[i].active = this.expandedStatus;

View File

@ -61,6 +61,7 @@
let data = JSON.parse(response.data.content);
this.response = data;
this.$set(this.apiItem, 'responseData', data);
this.isActive = true;
}
});
}