fix: 执行场景报告查看一直转圈
This commit is contained in:
parent
af655d5fa5
commit
7fe7624ab0
|
@ -90,24 +90,32 @@ export default {
|
|||
},
|
||||
computed: {
|
||||
overviewEnable() {
|
||||
let disable = this.report.config && this.report.config.overview.enable === false;
|
||||
let disable = this.report.config
|
||||
&& this.report.config.overview && this.report.config.overview.enable === false;
|
||||
return !disable;
|
||||
},
|
||||
summaryEnable() {
|
||||
let disable = this.report.config && this.report.config.summary.enable === false;
|
||||
let disable = this.report.config && this.report.config.summary
|
||||
&& this.report.config.summary.enable === false;
|
||||
return !disable;
|
||||
},
|
||||
functionalEnable() {
|
||||
let disable = this.report.config && this.report.config.functional.enable === false;
|
||||
return !disable && this.report.functionResult && this.report.functionResult.caseData.length > 0 ;
|
||||
return !disable && this.report.functionResult
|
||||
&& this.report.functionResult.caseData && this.report.functionResult.caseData.length > 0 ;
|
||||
},
|
||||
apiEnable() {
|
||||
let disable = this.report.config && this.report.config.api.enable === false;
|
||||
return !disable && this.report.apiResult && (this.report.apiResult.apiCaseData.length > 0 || this.report.apiResult.apiScenarioData.length) > 0;
|
||||
return !disable && this.report.apiResult &&
|
||||
(
|
||||
(this.report.apiResult.apiCaseData && this.report.apiResult.apiCaseData.length > 0)
|
||||
|| (this.report.apiResult.apiScenarioData && this.report.apiResult.apiScenarioData.length > 0)
|
||||
);
|
||||
},
|
||||
loadEnable() {
|
||||
let disable = this.report.config && this.report.config.load.enable === false;
|
||||
return !disable && this.report.loadResult && this.report.loadResult.caseData.length > 0;
|
||||
return !disable && this.report.loadResult
|
||||
&& this.report.loadResult.caseData && this.report.loadResult.caseData.length > 0;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
|
|
@ -62,19 +62,23 @@ export default {
|
|||
methods: {
|
||||
getCaseCharData() {
|
||||
let caseCharData = [];
|
||||
if (this.apiResult.apiCaseData) {
|
||||
this.apiResult.apiCaseData.forEach(item => {
|
||||
let data = this.getDataByStatus(item.status);
|
||||
data.value = item.count;
|
||||
caseCharData.push(data);
|
||||
});
|
||||
}
|
||||
this.caseCharData = caseCharData;
|
||||
|
||||
let apiScenarioData = [];
|
||||
if (this.apiResult.apiScenarioData) {
|
||||
this.apiResult.apiScenarioData.forEach(item => {
|
||||
let data = this.getDataByStatus(item.status);
|
||||
data.value = item.count;
|
||||
apiScenarioData.push(data);
|
||||
});
|
||||
}
|
||||
|
||||
let stepCharData = [];
|
||||
for (let i = 0; i < this.apiResult.apiScenarioStepData.length; i++) {
|
||||
|
|
Loading…
Reference in New Issue