refactor: 接口用例和接口自动化页面全选框样式
This commit is contained in:
parent
e012d43889
commit
5cbaeb06c4
|
@ -6,28 +6,22 @@
|
|||
:show-create="false"/>
|
||||
</template>
|
||||
|
||||
<el-table ref="scenarioTable" border :data="tableData" class="adjust-table" @select-all="select" @select="select"
|
||||
<el-table ref="scenarioTable" border :data="tableData" class="adjust-table ms-select-all" @select-all="select" @select="select"
|
||||
v-loading="loading">
|
||||
<el-table-column type="selection" width="38"/>
|
||||
<el-table-column v-if="!referenced" width="40" :resizable="false" align="center">
|
||||
<el-dropdown slot="header" style="width: 14px">
|
||||
<span class="el-dropdown-link" style="width: 14px">
|
||||
<i class="el-icon-arrow-down el-icon--right" style="margin-left: 0px"></i>
|
||||
</span>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item @click.native.stop="isSelectDataAll(true)">
|
||||
{{$t('api_test.batch_menus.select_all_data',[total])}}
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item @click.native.stop="isSelectDataAll(false)">
|
||||
{{$t('api_test.batch_menus.select_show_data',[tableData.length])}}
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
<el-table-column type="selection" width="50"/>
|
||||
|
||||
<template v-slot:default="{row}">
|
||||
<show-more-btn :is-show="isSelect(row)" :buttons="buttons" :size="selectDataCounts"/>
|
||||
<ms-table-select-all v-if="!referenced"
|
||||
:page-size="pageSize"
|
||||
:total="total"
|
||||
@selectPageAll="isSelectDataAll(false)"
|
||||
@selectAll="isSelectDataAll(true)"/>
|
||||
|
||||
<el-table-column v-if="!referenced" width="30" :resizable="false" align="center">
|
||||
<template v-slot:default="scope">
|
||||
<show-more-btn :is-show="isSelect(scope.row)" :buttons="buttons" :size="selectDataCounts"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="num" label="ID"
|
||||
show-overflow-tooltip/>
|
||||
<el-table-column prop="name" :label="$t('api_test.automation.scenario_name')"
|
||||
|
@ -111,10 +105,12 @@ import MsApiReportDetail from "../report/ApiReportDetail";
|
|||
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";
|
||||
|
||||
export default {
|
||||
name: "MsApiScenarioList",
|
||||
components: {
|
||||
MsTableSelectAll,
|
||||
MsTablePagination,
|
||||
MsTableMoreBtn,
|
||||
ShowMoreBtn,
|
||||
|
|
|
@ -9,28 +9,22 @@
|
|||
<el-table v-loading="result.loading"
|
||||
ref="caseTable"
|
||||
border
|
||||
:data="tableData" row-key="id" class="test-content adjust-table"
|
||||
:data="tableData" row-key="id" class="test-content adjust-table ms-select-all"
|
||||
@select-all="handleSelectAll"
|
||||
@filter-change="filter"
|
||||
@sort-change="sort"
|
||||
@select="handleSelect" :height="screenHeight">
|
||||
<el-table-column type="selection"/>
|
||||
<el-table-column width="40" :resizable="false" align="center">
|
||||
<el-dropdown slot="header" style="width: 14px">
|
||||
<span class="el-dropdown-link" style="width: 14px">
|
||||
<i class="el-icon-arrow-down el-icon--right" style="margin-left: 0px"></i>
|
||||
</span>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item @click.native.stop="isSelectDataAll(true)">
|
||||
{{$t('api_test.batch_menus.select_all_data',[total])}}
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item @click.native.stop="isSelectDataAll(false)">
|
||||
{{$t('api_test.batch_menus.select_show_data',[tableData.length])}}
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
<el-table-column type="selection" width="50"/>
|
||||
|
||||
<ms-table-select-all
|
||||
:page-size="pageSize"
|
||||
:total="total"
|
||||
@selectPageAll="isSelectDataAll(false)"
|
||||
@selectAll="isSelectDataAll(true)"/>
|
||||
|
||||
<el-table-column width="30" :resizable="false" align="center">
|
||||
<template v-slot:default="scope">
|
||||
<show-more-btn :is-show="scope.row.showMore && !isReadOnly" :buttons="buttons" :size="selectDataCounts"/>
|
||||
<show-more-btn :is-show="scope.row.showMore" :buttons="buttons" :size="selectDataCounts"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
@ -110,10 +104,12 @@
|
|||
import TestPlanCaseListHeader from "../../../../track/plan/view/comonents/api/TestPlanCaseListHeader";
|
||||
import MsEnvironmentSelect from "../case/MsEnvironmentSelect";
|
||||
import {_handleSelect, _handleSelectAll} from "../../../../../../common/js/tableUtils";
|
||||
import MsTableSelectAll from "../../../../common/components/table/MsTableSelectAll";
|
||||
|
||||
export default {
|
||||
name: "ApiCaseSimpleList",
|
||||
components: {
|
||||
MsTableSelectAll,
|
||||
ApiCaseList,
|
||||
PriorityTableItem,
|
||||
ApiListContainer,
|
||||
|
@ -440,4 +436,12 @@
|
|||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.ms-select-all >>> th:first-child {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.ms-select-all >>> .el-icon-arrow-down {
|
||||
top: -3px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
|
Loading…
Reference in New Issue