fix(任务中心) 修复从任务中心打不开性能报告问题
This commit is contained in:
parent
2bbb35f568
commit
35a8536d90
|
@ -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);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
|
||||
<ms-api-report-detail :reportId="reportId" v-if="reportType === 'SCENARIO'"/>
|
||||
|
||||
<performance-report-view :reportId="reportId" v-if="reportType === 'PERFORMANCE'"/>
|
||||
<performance-report-view :perReportId="reportId" v-if="reportType === 'PERFORMANCE'"/>
|
||||
|
||||
</el-card>
|
||||
<el-card style="width: 550px;float: right">
|
||||
|
@ -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("当前任务已停止,无法查看报告");
|
||||
|
|
Loading…
Reference in New Issue