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