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