refactor(接口测试): 优化场景报告异步加载机制
优化测试报告异步加载机制,判断接口报告数据结构来确定是否需要异步查询内容信息
This commit is contained in:
parent
db9197ee14
commit
37065f8b4f
|
@ -260,13 +260,7 @@ export default {
|
|||
element.parentNode.removeChild(element);
|
||||
},
|
||||
loadRequestInfoExpand() {
|
||||
if (!this.requestInfo.hasData) {
|
||||
if (this.request.responseResult && this.request.responseResult.body) {
|
||||
this.requestInfo = this.request;
|
||||
this.requestInfo.hasData = true;
|
||||
}
|
||||
}
|
||||
if (!this.requestInfo.hasData) {
|
||||
if(!this.request.responseResult || !this.request.responseResult.body){
|
||||
this.$get("/api/scenario/report/selectReportContent/" + this.stepId, response => {
|
||||
let requestResult = response.data;
|
||||
if (requestResult) {
|
||||
|
@ -274,11 +268,13 @@ export default {
|
|||
}
|
||||
this.$nextTick(() => {
|
||||
this.requestInfo.loading = false;
|
||||
this.requestInfo.hasData = true;
|
||||
});
|
||||
});
|
||||
}else {
|
||||
if (this.request.responseResult && this.request.responseResult.body) {
|
||||
this.requestInfo = this.request;
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
active() {
|
||||
if (this.request.unexecute) {
|
||||
|
|
Loading…
Reference in New Issue