fix(版本对比): 场景用例tags_id对比时显示错误

--bug=1009677--user=郭雨琦 【ID1009677】【接口自动化】-版本对比-标签显示错误+标记对比信息错误
This commit is contained in:
guoyuqi 2022-01-19 11:07:56 +08:00 committed by 刘瑞斌
parent c5841066d5
commit c2aefc7690
1 changed files with 10 additions and 0 deletions

View File

@ -343,9 +343,11 @@
<el-dialog
:fullscreen="true"
:visible.sync="dialogVisible"
:destroy-on-close="true"
width="100%"
>
<scenario-diff
v-if="dialogVisible"
:old-data="currentScenario"
:new-data="newData"
:custom-num="customNum"
@ -1770,11 +1772,19 @@ export default {
}
res.data.userName = response.data.userName
this.newData = res.data;
this.dealWithTag();
this.dialogVisible = true;
}
});
})
},
dealWithTag(){
if(this.currentScenario.tags){
if(Object.prototype.toString.call(this.currentScenario.tags)==="[object String]"){
this.currentScenario.tags = JSON.parse(this.currentScenario.tags);
}
}
},
checkout(row) {
let api = this.versionData.filter(v => v.versionId === row.id)[0];
if (api.tags && api.tags.length > 0) {