style(测试计划): 修改计划报告名太长页面展示问题

--bug=1012014 --user=刘瑞斌 【测试跟踪】—测试名称过长时,报告页面命称超出 需要兼容处理下 https://www.tapd.cn/55049933/s/1131672
This commit is contained in:
CaptainB 2022-04-08 12:59:38 +08:00 committed by shiziyuan9527
parent a9aa7348c3
commit d8da1c6494
2 changed files with 73 additions and 35 deletions

View File

@ -1,39 +1,50 @@
<template> <template>
<el-drawer <el-drawer
:visible.sync="showDialog" :visible.sync="showDialog"
:with-header="false" :with-header="false"
:modal-append-to-body="false" :modal-append-to-body="false"
size="100%" size="100%"
ref="drawer" ref="drawer"
v-loading="result.loading"> v-loading="result.loading">
<template v-slot:default="scope"> <template v-slot:default="scope">
<el-scrollbar> <el-scrollbar>
<el-row type="flex" class="head-bar"> <el-row type="flex" class="head-bar">
<el-col :span="12"> <el-col :span="12">
<div class="name-edit"> <div>
<el-button plain size="mini" icon="el-icon-back" @click="handleClose">{{$t('test_track.return')}} <el-button plain size="mini" icon="el-icon-back" @click="handleClose"
</el-button>&nbsp; style="float: left; margin-top: 8px; margin-right: 5px">
<span class="title">{{report.name}}</span> {{ $t('test_track.return') }}
</div> </el-button>
</el-col> <el-tooltip
<el-col :span="12" class="head-right"> effect="dark"
<!-- <el-button v-permission="['PROJECT_TRACK_REPORT:READ+EXPORT']" :disabled="!isTestManagerOrTestUser" plain size="mini" @click="handleExport(report.name)">--> :content="report.name"
<!-- {{$t('test_track.plan_view.export_report')}}--> placement="bottom">
<!-- </el-button>--> <div class="title">
</el-col> <span>{{report.name}}</span>
</el-row> </div>
<div class="container"> </el-tooltip>
<test-plan-report-content v-if="showReport" :is-db="true" :report-id="report.id" :plan-id="report.testPlanId"/> </div>
</div> </el-col>
</el-scrollbar> <el-col :span="12" class="head-right">
</template> <!-- <el-button v-permission="['PROJECT_TRACK_REPORT:READ+EXPORT']" :disabled="!isTestManagerOrTestUser" plain size="mini" @click="handleExport(report.name)">-->
</el-drawer> <!-- {{$t('test_track.plan_view.export_report')}}-->
<!-- </el-button>-->
</el-col>
</el-row>
<div class="container">
<test-plan-report-content v-if="showReport" :is-db="true" :report-id="report.id"
:plan-id="report.testPlanId"/>
</div>
</el-scrollbar>
</template>
</el-drawer>
</template> </template>
<script> <script>
import TestPlanReportContent from "@/business/components/track/plan/view/comonents/report/detail/TestPlanReportContent"; import TestPlanReportContent from "@/business/components/track/plan/view/comonents/report/detail/TestPlanReportContent";
export default { export default {
name: "TestPlanDbReport", name: "TestPlanDbReport",
components: { components: {
@ -47,7 +58,7 @@ export default {
isTestManagerOrTestUser: false, isTestManagerOrTestUser: false,
showReport: false, showReport: false,
originUlr: '' originUlr: ''
} };
}, },
mounted() { mounted() {
this.isTestManagerOrTestUser = true; this.isTestManagerOrTestUser = true;
@ -87,7 +98,7 @@ export default {
this.showDialog = false; this.showDialog = false;
}, },
} }
} };
</script> </script>
<style scoped> <style scoped>
@ -110,4 +121,13 @@ export default {
text-align: right; text-align: right;
} }
.title {
font-size: 16px;
font-weight: 500;
margin-top: 0;
text-overflow: ellipsis;
overflow: hidden;
word-wrap: break-word;
white-space: nowrap;
}
</style> </style>

View File

@ -12,10 +12,19 @@
<el-row type="flex" class="head-bar"> <el-row type="flex" class="head-bar">
<el-col :span="12"> <el-col :span="12">
<div class="name-edit"> <div>
<el-button plain size="mini" icon="el-icon-back" @click="handleClose">{{$t('test_track.return')}} <el-button plain size="mini" icon="el-icon-back" @click="handleClose"
</el-button>&nbsp; style="float: left; margin-top: 8px; margin-right: 5px">
<span class="title">{{report.name}}</span> {{ $t('test_track.return') }}
</el-button>
<el-tooltip
effect="dark"
:content="report.name"
placement="bottom">
<div class="title">
<span>{{report.name}}</span>
</div>
</el-tooltip>
</div> </div>
</el-col> </el-col>
<el-col :span="12" class="head-right"> <el-col :span="12" class="head-right">
@ -233,4 +242,13 @@
text-align: right; text-align: right;
} }
.title {
font-size: 16px;
font-weight: 500;
margin-top: 0;
text-overflow: ellipsis;
overflow: hidden;
word-wrap: break-word;
white-space: nowrap;
}
</style> </style>