From b9d48bd00e6e3a4f47dd597cc45b34b43f9a7071 Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Fri, 31 Jul 2020 15:45:01 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=AE=BF=E9=97=AE?= =?UTF-8?q?=E6=9C=80=E8=BF=91=E6=8A=A5=E5=91=8A=E4=B8=AD=E5=B7=B2=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E7=9A=84=E6=8A=A5=E5=91=8A=E6=8A=A5=E9=94=99=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/api/report/ApiReportView.vue | 23 +++++++----- .../report/PerformanceReportView.vue | 37 +++++++++++-------- frontend/src/i18n/en-US.js | 2 + frontend/src/i18n/zh-CN.js | 2 + frontend/src/i18n/zh-TW.js | 2 + 5 files changed, 42 insertions(+), 24 deletions(-) diff --git a/frontend/src/business/components/api/report/ApiReportView.vue b/frontend/src/business/components/api/report/ApiReportView.vue index d1f4323b5e..5b471a53e5 100644 --- a/frontend/src/business/components/api/report/ApiReportView.vue +++ b/frontend/src/business/components/api/report/ApiReportView.vue @@ -62,17 +62,22 @@ export default { let url = "/api/report/get/" + this.reportId; this.$get(url, response => { this.report = response.data || {}; - if (this.isNotRunning) { - try { - this.content = JSON.parse(this.report.content); - } catch (e) { - console.log(this.report.content) - throw e; + if (response.data) { + if (this.isNotRunning) { + try { + this.content = JSON.parse(this.report.content); + } catch (e) { + console.log(this.report.content) + throw e; + } + this.getFails(); + this.loading = false; + } else { + setTimeout(this.getReport, 2000) } - this.getFails(); - this.loading = false; } else { - setTimeout(this.getReport, 2000) + this.loading = false; + this.$error(this.$t('api_report.not_exist')); } }); } diff --git a/frontend/src/business/components/performance/report/PerformanceReportView.vue b/frontend/src/business/components/performance/report/PerformanceReportView.vue index e2cab7ec1e..d9c40394f9 100644 --- a/frontend/src/business/components/performance/report/PerformanceReportView.vue +++ b/frontend/src/business/components/performance/report/PerformanceReportView.vue @@ -43,12 +43,12 @@ - + - + @@ -63,8 +63,8 @@ -

-

+

+