mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-12-03 20:49:56 +08:00
fix: 执行场景报告查看一直转圈
This commit is contained in:
parent
ff0124d74f
commit
e93296167e
@ -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 = [];
|
||||
this.apiResult.apiCaseData.forEach(item => {
|
||||
let data = this.getDataByStatus(item.status);
|
||||
data.value = item.count;
|
||||
caseCharData.push(data);
|
||||
});
|
||||
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 = [];
|
||||
this.apiResult.apiScenarioData.forEach(item => {
|
||||
let data = this.getDataByStatus(item.status);
|
||||
data.value = item.count;
|
||||
apiScenarioData.push(data);
|
||||
});
|
||||
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
Block a user