mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-11-29 18:48:13 +08:00
报告页头部面包屑
This commit is contained in:
parent
ceb8d200c5
commit
ca45dfe66f
@ -9,4 +9,6 @@ import java.util.List;
|
||||
public interface ExtLoadTestReportMapper {
|
||||
|
||||
List<ReportDTO> getReportList(@Param("reportRequest")ReportRequest request);
|
||||
|
||||
ReportDTO getReportTestAndProInfo(@Param("id") String id);
|
||||
}
|
||||
|
@ -13,4 +13,12 @@
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="getReportTestAndProInfo" resultType="io.metersphere.dto.ReportDTO">
|
||||
select ltr.id, ltr.name, ltr.test_id as testId, ltr.description,
|
||||
ltr.create_time as createTime, ltr.update_time as updateTime, ltr.status as status, lt.name as testName,
|
||||
p.id as projectId, p.name as projectName
|
||||
from load_test_report ltr join load_test lt on ltr.test_id = lt.id join project p on lt.project_id = p.id
|
||||
where ltr.id = #{id}
|
||||
</select>
|
||||
|
||||
</mapper>
|
@ -45,4 +45,12 @@ public class ReportController {
|
||||
public void deleteReport(@PathVariable String reportId) {
|
||||
reportService.deleteReport(reportId);
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/test/pro/info/{reportId}")
|
||||
public ReportDTO getReportTestAndProInfo(@PathVariable String reportId) {
|
||||
return reportService.getReportTestAndProInfo(reportId);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -11,6 +11,24 @@ public class ReportDTO {
|
||||
private String status;
|
||||
private String content;
|
||||
private String testName;
|
||||
private String projectId;
|
||||
private String projectName;
|
||||
|
||||
public String getProjectId() {
|
||||
return projectId;
|
||||
}
|
||||
|
||||
public void setProjectId(String projectId) {
|
||||
this.projectId = projectId;
|
||||
}
|
||||
|
||||
public String getProjectName() {
|
||||
return projectName;
|
||||
}
|
||||
|
||||
public void setProjectName(String projectName) {
|
||||
this.projectName = projectName;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
|
@ -37,4 +37,8 @@ public class ReportService {
|
||||
public void deleteReport(String reportId) {
|
||||
loadTestReportMapper.deleteByPrimaryKey(reportId);
|
||||
}
|
||||
|
||||
public ReportDTO getReportTestAndProInfo(String reportId) {
|
||||
return extLoadTestReportMapper.getReportTestAndProInfo(reportId);
|
||||
}
|
||||
}
|
||||
|
@ -129,9 +129,9 @@
|
||||
handleSelectionChange(val) {
|
||||
this.multipleSelection = val;
|
||||
},
|
||||
handleEdit(testPlan) {
|
||||
handleEdit(report) {
|
||||
this.$router.push({
|
||||
path: '/reportView/' + testPlan.id
|
||||
path: '/reportView/' + report.id
|
||||
})
|
||||
},
|
||||
handleDelete(report) {
|
||||
|
@ -1,11 +1,23 @@
|
||||
<template>
|
||||
<div v-loading="result.loading">
|
||||
<div v-loading="result.loading" class="report-view-container">
|
||||
<div class="main-content">
|
||||
<el-card>
|
||||
<el-row>
|
||||
|
||||
<el-breadcrumb separator-class="el-icon-arrow-right">
|
||||
<el-breadcrumb-item :to="{ path: '/' }">{{projectName}}</el-breadcrumb-item>
|
||||
<el-breadcrumb-item>{{testName}}</el-breadcrumb-item>
|
||||
<el-breadcrumb-item>{{reportName}}</el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
</el-row>
|
||||
|
||||
<el-row style="margin-top: 15px;margin-left: -300px;">
|
||||
<el-button type="primary" plain size="mini">立即停止</el-button>
|
||||
<el-button type="success" plain size="mini">再次执行</el-button>
|
||||
<el-button type="info" plain size="mini">导出</el-button>
|
||||
<el-button type="warning" plain size="mini">比较</el-button>
|
||||
</el-row>
|
||||
<el-divider></el-divider>
|
||||
|
||||
<el-tabs v-model="active" type="border-card" :stretch="true">
|
||||
<el-tab-pane :label="$t('report.test_overview')">
|
||||
<ms-report-test-overview />
|
||||
@ -43,15 +55,43 @@
|
||||
data() {
|
||||
return {
|
||||
result: {},
|
||||
active: '0'
|
||||
active: '0',
|
||||
reportId: '',
|
||||
reportName: '',
|
||||
testName: '',
|
||||
projectName: ''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
}
|
||||
initBreadcrumb() {
|
||||
this.result = this.$get("report/test/pro/info/" + this.reportId, res => {
|
||||
let data = res.data;
|
||||
this.reportName = data.name;
|
||||
this.testName = data.testName;
|
||||
this.projectName = data.projectName;
|
||||
})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.reportId = this.$route.path.split('/')[2];
|
||||
this.initBreadcrumb();
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.report-view-container {
|
||||
float: none;
|
||||
text-align: center;
|
||||
padding: 15px;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.report-view-container .main-content {
|
||||
margin: 0 auto;
|
||||
width: 100%;
|
||||
max-width: 1200px;
|
||||
}
|
||||
</style>
|
||||
|
Loading…
Reference in New Issue
Block a user