diff --git a/frontend/src/business/components/performance/report/PerformanceReportView.vue b/frontend/src/business/components/performance/report/PerformanceReportView.vue index 69be5a8980..09260244a1 100644 --- a/frontend/src/business/components/performance/report/PerformanceReportView.vue +++ b/frontend/src/business/components/performance/report/PerformanceReportView.vue @@ -443,7 +443,7 @@ export default { created() { this.isReadOnly = !hasPermission('PROJECT_PERFORMANCE_REPORT:READ+DELETE'); this.reportId = this.$route.path.split('/')[4]; - if (!this.reportId && this.perReportId) { + if (this.perReportId) { this.reportId = this.perReportId; } this.getReport(this.reportId); @@ -452,6 +452,9 @@ export default { '$route'(to) { if (to.name === "perReportView") { this.reportId = to.path.split('/')[4]; + if (this.perReportId) { + this.reportId = this.perReportId; + } this.getReport(this.reportId); this.initBreadcrumb((response) => { this.initReportTimeInfo(); diff --git a/frontend/src/business/components/performance/report/components/MonitorCard.vue b/frontend/src/business/components/performance/report/components/MonitorCard.vue index aa39133a06..73c676fd44 100644 --- a/frontend/src/business/components/performance/report/components/MonitorCard.vue +++ b/frontend/src/business/components/performance/report/components/MonitorCard.vue @@ -171,7 +171,6 @@ export default { created() { this.data = []; this.instances = []; - this.id = this.$route.path.split('/')[4]; this.getResource(); }, methods: { @@ -350,13 +349,6 @@ export default { }, }, watch: { - '$route'(to) { - if (to.name === "perReportView") { - this.id = to.path.split('/')[4]; - this.init = false; - this.getResource(); - } - }, report: { handler(val) { if (!val.status || !val.id) {