fix (接口测试): 修复场景报告路由失效问题
This commit is contained in:
parent
e8de501e83
commit
82f26d7719
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue