diff --git a/frontend/src/business/components/performance/report/PerformanceReportView.vue b/frontend/src/business/components/performance/report/PerformanceReportView.vue index 2e8879ae4a..d7a053d1d1 100644 --- a/frontend/src/business/components/performance/report/PerformanceReportView.vue +++ b/frontend/src/business/components/performance/report/PerformanceReportView.vue @@ -155,6 +155,9 @@ export default { MsReportTestDetails, MsPerformancePressureConfig }, + props: { + perReportId: String + }, data() { return { result: {}, @@ -414,6 +417,9 @@ export default { created() { this.isReadOnly = !hasPermission('PROJECT_PERFORMANCE_REPORT:READ+DELETE'); this.reportId = this.$route.path.split('/')[4]; + if (!this.reportId && this.perReportId) { + this.reportId = this.perReportId; + } this.getReport(this.reportId); }, watch: { @@ -428,6 +434,9 @@ export default { // console.log("close socket."); this.websocket.close(); //离开路由之后断开websocket连接 } + }, + perReportId() { + this.getReport(this.perReportId); } } }; diff --git a/frontend/src/business/components/task/TaskCenter.vue b/frontend/src/business/components/task/TaskCenter.vue index c624aeb8ae..fd99bbf481 100644 --- a/frontend/src/business/components/task/TaskCenter.vue +++ b/frontend/src/business/components/task/TaskCenter.vue @@ -32,7 +32,7 @@ - + @@ -237,7 +237,7 @@ export default { let taskTotal = e.data; this.runningTotal = taskTotal; this.initIndex++; - if (this.taskVisible && this.initEnd) { + if (this.taskVisible && this.initEnd) { setTimeout(() => { this.initEnd = false; this.init(); @@ -307,14 +307,8 @@ export default { this.size = 1400; this.reportId = row.id; this.reportType = row.executionModule; - switch (row.executionModule) { - case "SCENARIO": - break; - case "PERFORMANCE": - break; - case "API": - this.getExecResult(row.id); - break; + if (row.executionModule === "API") { + this.getExecResult(row.id); } } else if (status === 'stop') { this.$warning("当前任务已停止,无法查看报告");