fix(测试跟踪): 测试计划报告分享,查看性能测试报告跳转到登入页

--bug=1019052 --user=陈建星 【测试跟踪】测试报告分享链接打开的页面,过了一会自动跳到登录页面了 https://www.tapd.cn/55049933/s/1282348
--bug=1019053 --user=陈建星 【测试跟踪】测试计划报告分享,性能测试报告没有加载出来 https://www.tapd.cn/55049933/s/1282119
This commit is contained in:
chenjianxing 2022-10-28 16:54:54 +08:00 committed by 刘瑞斌
parent bfdedea1e7
commit 0183c51350
4 changed files with 76 additions and 12 deletions

View File

@ -32,6 +32,11 @@ export const microRoutes = [
path: '/performance/report/view/:reportId',
name: "perReportView",
component: () => import('@/business/report/PerformanceReportView'),
},
{
path: '/share/performance/report/view/:reportId',
name: "sharePerReportView",
component: () => import('@/template/report/performance/share/ShareLoadReportView'),
}
]

View File

@ -242,6 +242,11 @@ export default {
this.init();
}
},
created() {
if (this.reportId) {
this.init();
}
},
computed: {
showProjectEnv() {
return this.projectEnvMap && JSON.stringify(this.projectEnvMap) !== '{}';

View File

@ -0,0 +1,41 @@
<template>
<load-case-report-view :is-plan-report="isPlanReport"
:share-id="shareId"
:is-share="true"
:report-id="reportId"
ref="loadCaseReportView"/>
</template>
<script>
import LoadCaseReportView from "./LoadCaseReportView";
export default {
name: "ShareLoadReportView",
components: {LoadCaseReportView},
computed: {
reportId() {
return this.getRouteParam('reportId');
},
shareId() {
return this.getRouteParam('shareId');
},
isPlanReport() {
return this.getRouteParam('isPlanReport');
},
},
methods: {
getRouteParam(name) {
if (this.$route) {
return this.$route.params[name]
} else {
return null;
}
}
}
}
</script>
<style scoped>
</style>

View File

@ -15,12 +15,24 @@
<ms-main-container>
<div v-if="showResponse">
<micro-app v-if="!isTemplate && reportShow"
<div v-if="!isTemplate && reportShow">
<micro-app v-if="isShare"
route-name="sharePerReportView"
service="performance"
:route-params="{
reportId,
isShare,
shareId,
isPlanReport: true,
}"/>
<micro-app v-else
route-name="perReportView"
service="performance"
:route-params="{
reportId,
}"/>
</div>
<load-case-report-view v-else
:is-plan-report="true"
@ -94,6 +106,7 @@ export default {
reportId: row.loadReportId
}
if (!row.loadReportId) {
this.showResponse = false;
return;
}
if (this.isShare) {