fix(测试跟踪): 修复table高度和全选checkbox

This commit is contained in:
Captain.B 2021-05-26 17:41:52 +08:00 committed by 刘瑞斌
parent 0b8b329c19
commit adff3b26f0
3 changed files with 29 additions and 19 deletions

View File

@ -82,8 +82,8 @@ export default {
}, },
props: { props: {
screenHeight: { screenHeight: {
type: Number, type: String,
default: 400, default: '400',
}, },
selectNodeIds: { selectNodeIds: {
type: Array, type: Array,

View File

@ -16,6 +16,7 @@
:page-size.sync="page.pageSize" :page-size.sync="page.pageSize"
:operators="operators" :operators="operators"
:show-select-all="false" :show-select-all="false"
:screen-height="screenHeight"
@handlePageChange="getIssues" @handlePageChange="getIssues"
@refresh="getIssues"> @refresh="getIssues">
@ -104,6 +105,7 @@ export default {
data() { data() {
return { return {
page: getPageInfo(), page: getPageInfo(),
screenHeight: 'calc(100vh - 310px)',
operators: [ operators: [
{ {
tip: this.$t('commons.edit'), icon: "el-icon-edit", tip: this.$t('commons.edit'), icon: "el-icon-edit",

View File

@ -10,15 +10,18 @@
@select="handleSelect" @select="handleSelect"
:height="screenHeight" :height="screenHeight"
ref="testPlanReportTable" ref="testPlanReportTable"
row-key="id" class="test-content adjust-table ms-select-all" row-key="id"
@filter-change="filter" @sort-change="sort" > class="test-content adjust-table ms-select-all-fixed"
@filter-change="filter" @sort-change="sort">
<el-table-column width="50" type="selection"/> <el-table-column width="50" type="selection"/>
<ms-table-select-all
:page-size="pageSize>total?total:pageSize" <ms-table-header-select-popover v-show="total>0"
:total="total" :page-size="pageSize > total ? total : pageSize"
@selectPageAll="isSelectDataAll(false)" :total="total"
@selectAll="isSelectDataAll(true)"/> :select-data-counts="selectDataCounts"
@selectPageAll="isSelectDataAll(false)"
@selectAll="isSelectDataAll(true)"/>
<el-table-column width="30" :resizable="false" align="center"> <el-table-column width="30" :resizable="false" align="center">
<template v-slot:default="scope"> <template v-slot:default="scope">
@ -26,9 +29,12 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column min-width="300" prop="name" :label="$t('test_track.report.list.name')" show-overflow-tooltip></el-table-column> <el-table-column min-width="300" prop="name" :label="$t('test_track.report.list.name')"
<el-table-column prop="testPlanName" min-width="150" sortable :label="$t('test_track.report.list.test_plan')" show-overflow-tooltip></el-table-column> show-overflow-tooltip></el-table-column>
<el-table-column prop="creator" :label="$t('test_track.report.list.creator')" show-overflow-tooltip></el-table-column> <el-table-column prop="testPlanName" min-width="150" sortable :label="$t('test_track.report.list.test_plan')"
show-overflow-tooltip></el-table-column>
<el-table-column prop="creator" :label="$t('test_track.report.list.creator')"
show-overflow-tooltip></el-table-column>
<el-table-column prop="createTime" sortable :label="$t('test_track.report.list.create_time' )" show-overflow-tooltip> <el-table-column prop="createTime" sortable :label="$t('test_track.report.list.create_time' )" show-overflow-tooltip>
<template v-slot:default="scope"> <template v-slot:default="scope">
<span>{{ scope.row.createTime | timestampFormatDate }}</span> <span>{{ scope.row.createTime | timestampFormatDate }}</span>
@ -81,10 +87,12 @@ import {
initCondition, initCondition,
setUnSelectIds, toggleAllSelection, setUnSelectIds, toggleAllSelection,
} from "@/common/js/tableUtils"; } from "@/common/js/tableUtils";
import MsTableHeaderSelectPopover from "@/business/components/common/components/table/MsTableHeaderSelectPopover";
export default { export default {
name: "TestPlanReportList", name: "TestPlanReportList",
components: { components: {
MsTableHeaderSelectPopover,
TestPlanReportView, TestPlanReportView,
MsTableOperator, MsTableOperatorButton, MsTableHeader, MsTablePagination, MsTableOperator, MsTableOperatorButton, MsTableHeader, MsTablePagination,
ReportTriggerModeItem, MsTag, ReportTriggerModeItem, MsTag,
@ -102,7 +110,7 @@ export default {
pageSize: 10, pageSize: 10,
isTestManagerOrTestUser: false, isTestManagerOrTestUser: false,
selectRows: new Set(), selectRows: new Set(),
screenHeight: document.documentElement.clientHeight - 296,// screenHeight: 'calc(100vh - 295px)', //
total: 0, total: 0,
tableData: [], tableData: [],
statusFilters: [ statusFilters: [
@ -264,11 +272,11 @@ export default {
color: #1E90FF; color: #1E90FF;
} }
.ms-select-all >>> th:first-child { /*.ms-select-all >>> th:first-child {*/
margin-top: 20px; /* margin-top: 20px;*/
} /*}*/
.ms-select-all >>> th:nth-child(2) .el-icon-arrow-down { /*.ms-select-all >>> th:nth-child(2) .el-icon-arrow-down {*/
top: -2px; /* top: -2px;*/
} /*}*/
</style> </style>