mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-12-04 21:19:52 +08:00
测试报告下拉列表路由跳转
This commit is contained in:
parent
145b478545
commit
468491bffe
@ -5,7 +5,7 @@
|
||||
{{$t('load_test.recent')}}
|
||||
</div>
|
||||
<el-menu-item :key="p.id" v-for="p in recentReports"
|
||||
:index="'/report/' + p.id" :route="{name:'report', params:{projectId:p.id, projectName:p.name}}">
|
||||
:index="'/reportView/' + p.id" :route="{path: '/reportView/' + p.id}">
|
||||
{{ p.name }}
|
||||
</el-menu-item>
|
||||
</el-menu>
|
||||
|
@ -91,6 +91,17 @@
|
||||
this.reportId = this.$route.path.split('/')[2];
|
||||
this.initBreadcrumb();
|
||||
},
|
||||
watch: {
|
||||
'$route'(to) {
|
||||
let reportId = to.path.split('/')[2]; // find testId
|
||||
this.$get("report/test/pro/info/" + reportId, response => {
|
||||
let data = response.data;
|
||||
this.reportName = data.name;
|
||||
this.testName = data.testName;
|
||||
this.projectName = data.projectName;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
@ -119,16 +119,9 @@ const router = new VueRouter({
|
||||
},
|
||||
{
|
||||
path: "/reportView/:reportId",
|
||||
name: "ReportView",
|
||||
name: "reportView",
|
||||
components: {
|
||||
content: ReportView
|
||||
},
|
||||
props: {
|
||||
content: (route) => {
|
||||
return {
|
||||
...route.params
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user