fix(场景报告): #1007756 场景报告没有返回键

--bug=1007756 --user=宋天阳 【接口测试】接口测试-测试报告 点进报告没有返回键
https://www.tapd.cn/55049933/s/1067857
This commit is contained in:
song-tianyang 2021-11-15 18:25:16 +08:00 committed by song-tianyang
parent 7a2ba0e9f8
commit 803206f0a5
6 changed files with 22 additions and 8 deletions

View File

@ -3,7 +3,7 @@
<ms-main-container>
<el-card>
<section class="report-container" v-if="this.report.testId">
<ms-api-report-view-header :is-plan="isPlan" :is-template="isTemplate" :debug="debug" :report="report" @reportExport="handleExport" @reportSave="handleSave"/>
<ms-api-report-view-header :show-cancel-button="showCancelButton" :is-plan="isPlan" :is-template="isTemplate" :debug="debug" :report="report" @reportExport="handleExport" @reportSave="handleSave"/>
<main v-if="isNotRunning">
<ms-metric-chart :content="content" :totalTime="totalTime"/>
<div>
@ -81,7 +81,11 @@ export default {
templateReport: Object,
isShare: Boolean,
shareId: String,
isPlan: Boolean
isPlan: Boolean,
showCancelButton: {
type: Boolean,
default: true
}
},
watch: {
reportId() {

View File

@ -138,10 +138,9 @@ export default {
screenHeight: 'calc(100vh - 200px)',
}
},
watch: {
'$route': 'init',
},
// watch: {
// '$route': 'init',
// },
methods: {
search() {

View File

@ -24,7 +24,9 @@
<el-button v-if="!isPlan && (!debug || exportFlag) && !isTemplate" v-permission="['PROJECT_API_REPORT:READ+EXPORT']" :disabled="isReadOnly" class="export-button" plain type="primary" size="mini" @click="handleExport(report.name)" style="margin-right: 10px">
{{ $t('test_track.plan_view.export_report') }}
</el-button>
<el-button v-if="showCancelButton" class="export-button" plain size="mini" @click="returnView()" >
{{$t('commons.cancel')}}
</el-button>
</el-col>
</el-row>
</header>
@ -37,6 +39,10 @@ export default {
props: {
report: {},
debug: Boolean,
showCancelButton: {
type: Boolean,
default: true,
},
isTemplate: Boolean,
exportFlag: {
type: Boolean,
@ -80,6 +86,9 @@ export default {
handleSave(name) {
this.nameIsEdit = false;
this.$emit('reportSave', name);
},
returnView(){
this.$router.push('/api/automation/report');
}
}
}

View File

@ -5,6 +5,7 @@
<section class="report-container">
<div style="margin-top: 10px">
<ms-api-report-view-header
:show-cancel-button="false"
:debug="debug"
:export-flag="exportFlag"
:report="report"

View File

@ -253,7 +253,7 @@
<el-drawer :visible.sync="showReportVisible" :destroy-on-close="true" direction="ltr" :withHeader="true"
:modal="false"
size="90%">
<ms-api-report-detail @invisible="showReportVisible = false" @refresh="search" :infoDb="infoDb"
<ms-api-report-detail @invisible="showReportVisible = false" @refresh="search" :infoDb="infoDb" :show-cancel-button="false"
:report-id="showReportId" :currentProjectId="projectId"/>
</el-drawer>
<!--测试计划-->

View File

@ -7,6 +7,7 @@
:placeholder="tip"
prefix-icon="el-icon-search"
@change="search"
@blur="search"
maxlength="60"
v-model="condition.name" clearable/>