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:
parent
1f6b8ba996
commit
27fbd9df5c
|
@ -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'),
|
||||
}
|
||||
]
|
||||
|
||||
|
|
|
@ -242,6 +242,11 @@ export default {
|
|||
this.init();
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if (this.reportId) {
|
||||
this.init();
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
showProjectEnv() {
|
||||
return this.projectEnvMap && JSON.stringify(this.projectEnvMap) !== '{}';
|
||||
|
|
|
@ -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>
|
|
@ -15,12 +15,24 @@
|
|||
<ms-main-container>
|
||||
|
||||
<div v-if="showResponse">
|
||||
<micro-app v-if="!isTemplate && reportShow"
|
||||
route-name="perReportView"
|
||||
service="performance"
|
||||
:route-params="{
|
||||
reportId,
|
||||
}"/>
|
||||
<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,18 +106,19 @@ export default {
|
|||
reportId: row.loadReportId
|
||||
}
|
||||
if (!row.loadReportId) {
|
||||
this.showResponse = false;
|
||||
return;
|
||||
}
|
||||
if (this.isShare) {
|
||||
shareCheckoutLoadReport(this.shareId, param)
|
||||
.then(r => {
|
||||
this.openReport(r.data, row.loadReportId);
|
||||
});
|
||||
.then(r => {
|
||||
this.openReport(r.data, row.loadReportId);
|
||||
});
|
||||
} else {
|
||||
checkoutLoadReport(param)
|
||||
.then(r => {
|
||||
this.openReport(r.data, row.loadReportId);
|
||||
});
|
||||
.then(r => {
|
||||
this.openReport(r.data, row.loadReportId);
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue