fix (接口测试): 修复场景报告路由失效问题

This commit is contained in:
fit2-zhao 2022-03-14 19:10:26 +08:00 committed by fit2-zhao
parent e8de501e83
commit 82f26d7719
1 changed files with 6 additions and 15 deletions

View File

@ -1,37 +1,28 @@
<template>
<ms-api-report :report-id="reportIdValue" :share-id="shareId" :is-share="isShare" :is-plan="isPlanReport" :is-template="false"></ms-api-report>
<ms-api-report :report-id="reportIdByPath" :share-id="shareId" :is-share="isShare" :is-plan="isPlanReport" :is-template="false"></ms-api-report>
</template>
<script>
import MsApiReport from "@/business/components/api/automation/report/ApiReportDetail";
export default {
name: "ApiReportView",
components: {MsApiReport},
props: {
reportId:String,
reportId: String,
isShare: Boolean,
shareId: String,
isPlanReport: Boolean,
},
computed: {
reportIdByPath:function (){
if(this.$route){
reportIdByPath: function () {
if (this.$route) {
return this.$route.params.reportId
}else{
} else {
return null;
}
}
},
data(){
return {
reportIdValue:'',
}
},
created() {
if(!this.reportIdValue){
this.reportIdValue = this.reportIdByPath ? this.reportIdByPath:this.reportId;
}
}
}
</script>