fix:修复测试报告不存在

This commit is contained in:
wenyann 2021-03-11 16:32:47 +08:00
parent 6b46f3120b
commit 0d1d1acd3d
4 changed files with 36 additions and 10 deletions

View File

@ -253,7 +253,7 @@ public class APIBackendListenerClient extends AbstractBackendListenerClient impl
String url2 = reportUrl;
if (StringUtils.isEmpty(url)) {
url = baseSystemConfigDTO.getUrl() + "/#/api/report/view/" + report.getId();
url2 = baseSystemConfigDTO.getUrl() + "/#/api/automation/report";
url2 = baseSystemConfigDTO.getUrl() + "/#/api/automation/report/view/" + report.getId();
}
String successContext = "";
String failedContext = "";

View File

@ -68,12 +68,6 @@
:total="total"/>
</el-card>
</ms-main-container>
<el-drawer :visible.sync="debugVisible" :destroy-on-close="true" direction="ltr" :withHeader="false"
:title="$t('test_track.plan_view.test_result')" :modal="false" size="90%">
<ms-api-report-detail :report-id="reportId" :currentProjectId="currentProjectId" :info-db="true"
@refresh="search"/>
</el-drawer>
</ms-container>
</template>
@ -89,14 +83,13 @@ import ReportTriggerModeItem from "../../../common/tableItem/ReportTriggerModeIt
import {REPORT_CONFIGS} from "../../../common/components/search/search-components";
import {ApiEvent, LIST_CHANGE} from "@/business/components/common/head/ListEvent";
import ShowMoreBtn from "../../../track/case/components/ShowMoreBtn";
import MsApiReportDetail from "./ApiReportDetail";
import {_filter, _sort} from "@/common/js/tableUtils";
export default {
components: {
ReportTriggerModeItem,
MsTableOperatorButton,
MsApiReportStatus, MsMainContainer, MsContainer, MsTableHeader, MsTablePagination, ShowMoreBtn, MsApiReportDetail
MsApiReportStatus, MsMainContainer, MsContainer, MsTableHeader, MsTablePagination, ShowMoreBtn
},
data() {
return {
@ -167,7 +160,10 @@ export default {
handleView(report) {
this.reportId = report.id;
this.currentProjectId = report.projectId;
this.debugVisible = true;
this.$router.push({
path: 'report/view/' + report.id,
})
},
handleDelete(report) {
this.$alert(this.$t('api_report.delete_confirm') + report.name + "", '', {

View File

@ -0,0 +1,24 @@
<template>
<ms-api-report :report-id="reportId"></ms-api-report>
</template>
<script>
import MsApiReport from "@/business/components/api/automation/report/ApiReportDetail";
export default {
name: "ApiReportView",
components: {MsApiReport},
computed: {
reportId:function (){
return this.$route.params.reportId
}
},
created() {
console.log(this.reportId)
}
}
</script>
<style scoped>
</style>

View File

@ -63,6 +63,12 @@ export default {
name: "ApiReportList",
component: () => import('@/business/components/api/automation/report/ApiReportList'),
},
{
path:"automation/report/view/:reportId",
name:"ApiReportView",
component: () => import('@/business/components/api/automation/report/ApiReportView'),
},
{
path: 'monitor/view',
name: 'ApiMonitor',