fix(测试计划): 修复报告统计结果错误

This commit is contained in:
shiziyuan9527 2021-01-22 17:14:12 +08:00
parent 2cdf1e6730
commit 4b41e9df0c
1 changed files with 7 additions and 4 deletions

View File

@ -119,7 +119,7 @@
this.functionalCharData = [];
if (this.executeResult.functionalResult) {
this.executeResult.functionalResult.forEach(item => {
let data = this.dataMap.get(item.status);
let data = this.copyData(item.status);
data.value = item.count;
this.functionalCharData.push(data);
});
@ -129,7 +129,7 @@
this.apiCharData = [];
if (this.executeResult.apiResult) {
this.executeResult.apiResult.forEach(item => {
let data = this.dataMap.get(item.status);
let data = this.copyData(item.status);
data.value = item.count;
this.apiCharData.push(data);
});
@ -139,7 +139,7 @@
this.scenarioCharData = [];
if (this.executeResult.apiResult) {
this.executeResult.scenarioResult.forEach(item => {
let data = this.dataMap.get(item.status);
let data = this.copyData(item.status);
data.value = item.count;
this.scenarioCharData.push(data);
});
@ -149,12 +149,15 @@
this.loadCharData = [];
if (this.executeResult.loadResult) {
this.executeResult.loadResult.forEach(item => {
let data = this.dataMap.get(item.status);
let data = this.copyData(item.status);
data.value = item.count;
this.loadCharData.push(data);
});
}
},
copyData(status) {
return JSON.parse(JSON.stringify(this.dataMap.get(status)))
},
reload() {
this.isShow = false;
this.$nextTick(function () {