fix 打开一个测试报告后,再打开另外一个测试报告,显示的还是之前打开的测试报告

This commit is contained in:
2025-06-13 15:45:52 +08:00
parent 614aa05b42
commit ffed752170
3 changed files with 4 additions and 3 deletions

View File

@@ -187,7 +187,7 @@ export const constantRoutes = [
]
},
{
path: '/ui-test/report/detail',
path: '/ui-test/report/detail/:id',
component: Layout,
hidden: true,
children: [

View File

@@ -96,7 +96,8 @@ export default {
},
// 查看
handleClickDetail(val) {
this.$tab.openPage("测试报告详情", "/ui-test/report/detail", { id: val.id });
// 打开新的测试报告详情,使用唯一的路径
this.$tab.openPage(`测试报告详情_${val.id}`, `/ui-test/report/detail/${val.id}`, { id: val.id });
},
// 分页
handleSizeChange(val) {

View File

@@ -262,7 +262,7 @@ export default {
handleClick() { },
// 获取详情
getDetailDAta() {
getTestReportDetail(this.$route.query.id).then(res => {
getTestReportDetail(this.$route.params.id).then(res => {
if (res.code === 200) {
this.detailData = res.data
this.uiSceneStepsAllReportVOList = res.data.uiSceneStepsAllReportVOList