refactor(接口测试): 优化场景报告异步加载机制
优化测试报告异步加载机制,判断接口报告数据结构来确定是否需要异步查询内容信息
This commit is contained in:
parent
4d8d0e7613
commit
b3004be2fc
|
@ -234,13 +234,7 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
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) {
|
||||
|
@ -248,11 +242,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