fix: 接口自动化-场景列表-批量操作下拉框不显示操作

修复接口自动化-场景列表-批量操作下拉框不显示操作的问题
This commit is contained in:
song.tianyang 2021-01-26 11:05:41 +08:00
parent f09d1e7416
commit 29ab9b301a
5 changed files with 94 additions and 6 deletions

View File

@ -6,12 +6,12 @@
:show-create="false"/>
</template>
<el-table ref="scenarioTable" border :data="tableData" class="adjust-table ms-select-all" @select-all="select" @select="select"
<el-table ref="scenarioTable" border :data="tableData" class="adjust-table ms-select-all-fixed" @select-all="select" @select="select"
v-loading="loading">
<el-table-column type="selection" width="50"/>
<ms-table-select-all v-if="!referenced"
<ms-table-header-select-popover v-show="total>0"
:page-size="pageSize>total?total:pageSize"
:total="total"
@selectPageAll="isSelectDataAll(false)"
@ -121,7 +121,8 @@
import MsTableMoreBtn from "./TableMoreBtn";
import MsScenarioExtendButtons from "@/business/components/api/automation/scenario/ScenarioExtendBtns";
import MsTestPlanList from "./testplan/TestPlanList";
import MsTableSelectAll from "../../../common/components/table/MsTableSelectAll";
// import MsTableSelectAll from "../../../common/components/table/MsTableSelectAll";
import MsTableHeaderSelectPopover from "@/business/components/common/components/table/MsTableHeaderSelectPopover";
import {API_CASE_CONFIGS} from "@/business/components/common/components/search/search-components";
import MsTableOperatorButton from "@/business/components/common/components/MsTableOperatorButton";
import PriorityTableItem from "../../../track/common/tableItems/planview/PriorityTableItem";
@ -139,7 +140,7 @@
BatchEdit,
PlanStatusTableItem,
PriorityTableItem,
MsTableSelectAll,
MsTableHeaderSelectPopover,
MsTablePagination,
MsTableMoreBtn,
ShowMoreBtn,
@ -544,4 +545,16 @@
background-color: #409EFF;
border-color: #409EFF;
}
/deep/ .el-table__fixed-body-wrapper {
z-index: auto !important;
}
/deep/ el-table__fixed-right{
}
/deep/ .el-table__fixed-right {
height: 100% !important;
}
/deep/ .el-table__fixed {
height: 110px !important;
}
</style>

View File

@ -1,6 +1,6 @@
<template>
<el-dialog :close-on-click-modal="false" :title="$t('api_test.automation.scenario_ref')" :visible.sync="visible"
width="45%" :destroy-on-close="true" append-to-body>
width="45%" :destroy-on-close="true" >
<span>{{ $t('api_test.automation.scenario_ref') }}</span>
<div class="refs" v-loading="scenarioLoading">
<div v-for="(item, index) in scenarioRefs" :key="index" class="el-button--text">{{ item.name }}</div>

View File

@ -110,7 +110,7 @@
:label="$t('api_test.definition.api_case_passing_rate')"
show-overflow-tooltip/>
<el-table-column v-if="!isReadOnly" :label="$t('commons.operating')" min-width="130" align="center">
<el-table-column fixed="right" v-if="!isReadOnly" :label="$t('commons.operating')" min-width="130" align="center">
<template v-slot:default="scope">
<ms-table-operator-button :tip="$t('commons.reduction')" icon="el-icon-refresh-left" @exec="reductionApi(scope.row)" v-if="trashEnable" v-tester/>
<ms-table-operator-button :tip="$t('commons.edit')" icon="el-icon-edit" @exec="editApi(scope.row)" v-else v-tester/>

View File

@ -0,0 +1,42 @@
<template>
<el-table-column width="1" :resizable="false" align="center">
<el-popover slot="header" placement="right" trigger="click" style="margin-right: 0px;">
<el-link @click.native.stop="$emit('selectAll')">{{$t('api_test.batch_menus.select_all_data',[total])}}</el-link>
<br/>
<el-link @click.native.stop="$emit('selectPageAll')">{{$t('api_test.batch_menus.select_show_data',[pageSize])}}</el-link>
<i class="el-icon-arrow-down" slot="reference"></i>
</el-popover>
</el-table-column>
</template>
<script>
export default {
name: "MsTableSelectAll",
props: ['total', 'pageSize'],
data() {
return {
gridData: [{
date: '2016-05-02',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '2016-05-04',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '2016-05-01',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '2016-05-03',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}]
};
}
}
</script>
<style scoped>
</style>

View File

@ -169,3 +169,36 @@ html,body {
width: 30px;
}
/* 表格全选样式 --> */
/* <-- 表格全选样式 (列固定表格样式) */
.ms-select-all-fixed th:first-child.el-table-column--selection {
border: 1px solid #DCDFE6;
border-radius:5px;
padding: 0px;
margin-top: 10px;
display: inline-block;
/*margin-top: 25px;*/
width: 50px;
}
.ms-select-all-fixed th:nth-child(2) {
overflow: visible;
}
.ms-select-all-fixed th:first-child.el-table-column--selection>.cell {
padding: 5px;
width: 35px;
}
.ms-select-all-fixed th:nth-child(2)>.cell {
overflow: visible;
}
.ms-select-all-fixed th:nth-child(2) .el-icon-arrow-down {
position: absolute;
display: inline-block;
top: -4px;
left: -30px;
width: 30px;
}
/* 表格全选样式 --> */