测试报告下拉列表路由跳转
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>
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
</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 />
|
||||
|
@ -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