fix(接口测试): 修复场景版本对比缺少数据问题

https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001018775
--user=郭雨琦
This commit is contained in:
guoyuqi 2022-10-24 19:18:31 +08:00 committed by 刘瑞斌
parent 21cce1ab0e
commit 0b8ccd8935
1 changed files with 6 additions and 4 deletions

View File

@ -1,5 +1,5 @@
<template> <template>
<div> <div v-show="showDiff">
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-tag>当前{{ oldData.versionName }}</el-tag> <el-tag>当前{{ oldData.versionName }}</el-tag>
@ -476,6 +476,7 @@ export default {
newEnableCookieShare: {}, newEnableCookieShare: {},
newOnSampleError: {}, newOnSampleError: {},
newProjectEnvMap: new Map, newProjectEnvMap: new Map,
showDiff: false,
} }
}, },
methods: { methods: {
@ -504,7 +505,7 @@ export default {
} }
}, },
getDffScenario() { getDffScenario() {
getScenarioById(this.dffScenarioId + "/" + this.scenarioRefId, response => { getScenarioById(this.dffScenarioId + "/" + this.scenarioRefId).then(response => {
getScenarioWithBLOBsById(response.data.id).then(res => { getScenarioWithBLOBsById(response.data.id).then(res => {
if (res.data) { if (res.data) {
if (res.data.scenarioDefinition != null) { if (res.data.scenarioDefinition != null) {
@ -543,6 +544,7 @@ export default {
this.dealWithTag(res.data); this.dealWithTag(res.data);
this.newData = res.data; this.newData = res.data;
this.closeExpansion() this.closeExpansion()
this.showDiff = true;
} }
}); });
}) })
@ -608,7 +610,7 @@ export default {
if (this.stepSize > 35 && this.expandedStatus) { if (this.stepSize > 35 && this.expandedStatus) {
nodes[i].active = false; nodes[i].active = false;
} }
if (nodes[i].hashTree && nodes[i].hashTree.length > 0) { if (nodes[i].hashTree && nodes[i].hashTree.length > 0) {
this.changeNodeStatus(nodes[i].hashTree, source); this.changeNodeStatus(nodes[i].hashTree, source);
} }
} }
@ -646,7 +648,7 @@ export default {
for (let i in nodes) { for (let i in nodes) {
if (nodes[i]) { if (nodes[i]) {
nodes[i].enable = this.stepEnable; nodes[i].enable = this.stepEnable;
if (nodes[i].hashTree && nodes[i].hashTree.length > 0) { if (nodes[i].hashTree && nodes[i].hashTree.length > 0) {
this.stepStatus(nodes[i].hashTree); this.stepStatus(nodes[i].hashTree);
} }
} }