fix: 测试报告详情页 修改完测试报告名称后,点击导出仍显示之前的报告名称

This commit is contained in:
zhangdahai112 2022-02-16 20:30:55 +08:00 committed by jianxing
parent 174c06aed0
commit 34ca2feeea
2 changed files with 5 additions and 2 deletions

View File

@ -39,7 +39,7 @@
</el-tabs> </el-tabs>
</div> </div>
<ms-api-report-export v-if="reportExportVisible" id="apiTestReport" :title="report.testName" <ms-api-report-export v-if="reportExportVisible" id="apiTestReport" :title="report.name"
:content="content" :total-time="totalTime"/> :content="content" :total-time="totalTime"/>
</main> </main>
</section> </section>

View File

@ -3,7 +3,7 @@
<el-row> <el-row>
<el-col> <el-col>
<span v-if="!debug"> <span v-if="!debug">
<el-input v-if="nameIsEdit" size="mini" @blur="handleSave(report.name)" style="width: 200px" v-model="report.name" maxlength="60" show-word-limit/> <el-input v-if="nameIsEdit" size="mini" @blur="handleSave(report.name)" @keyup.enter.native="handleSaveKeyUp" style="width: 200px" v-model="report.name" maxlength="60" show-word-limit/>
<span v-else> <span v-else>
<router-link v-if="isSingleScenario" :to="{name: 'ApiAutomation', params: { dataSelectRange: 'edit:' + scenarioId }}"> <router-link v-if="isSingleScenario" :to="{name: 'ApiAutomation', params: { dataSelectRange: 'edit:' + scenarioId }}">
{{ report.name }} {{ report.name }}
@ -86,6 +86,9 @@ export default {
this.nameIsEdit = false; this.nameIsEdit = false;
this.$emit('reportSave', name); this.$emit('reportSave', name);
}, },
handleSaveKeyUp($event) {
$event.target.blur();
},
returnView(){ returnView(){
this.$router.push('/api/automation/report'); this.$router.push('/api/automation/report');
} }