From 1dcaa8d3b2e8e2e9cd3193f699ef2ce195723eee Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Fri, 7 May 2021 11:42:32 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E6=80=A7=E8=83=BD=E6=B5=8B=E8=AF=95):?= =?UTF-8?q?=20=E4=BF=AE=E6=94=B9=E6=9F=A5=E8=AF=A2overview=E7=9A=84?= =?UTF-8?q?=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../report/PerformanceTestReportList.vue | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/frontend/src/business/components/performance/report/PerformanceTestReportList.vue b/frontend/src/business/components/performance/report/PerformanceTestReportList.vue index 17a011975a..b29d547279 100644 --- a/frontend/src/business/components/performance/report/PerformanceTestReportList.vue +++ b/frontend/src/business/components/performance/report/PerformanceTestReportList.vue @@ -193,11 +193,15 @@ export default { this.tableData.forEach(report => { if (report.status === 'Completed' && !report.maxUsers) { - this.result = this.$get('/performance/report/content/testoverview/' + report.id, response => { - this.$set(report, 'maxUsers', response.data.maxUsers); - this.$set(report, 'avgResponseTime', response.data.avgResponseTime); - this.$set(report, 'tps', response.data.avgTransactions); - }); + this.result = this.$get('/performance/report/content/testoverview/' + report.id) + .then(response => { + let data = response.data.data; + this.$set(report, 'maxUsers', data.maxUsers); + this.$set(report, 'avgResponseTime', data.avgResponseTime); + this.$set(report, 'tps', data.avgTransactions); + }) + .catch(() => { + }); } }); });