fix(系统设置): 用户全选操作弹出多个提示

--bug=1017754 --user=李玉号 【系统设置】用户全选弹出多个指引,QA没有这个问题
https://www.tapd.cn/55049933/s/1261685
This commit is contained in:
shiziyuan9527 2022-10-14 13:01:59 +08:00 committed by lyh
parent b7c02e6e47
commit 7c2f40a25c
2 changed files with 15 additions and 22 deletions

View File

@ -28,6 +28,7 @@
<div v-if="showView === 'list'"> <div v-if="showView === 'list'">
<ms-table v-loading="data.loading" <ms-table v-loading="data.loading"
class="basic-config" class="basic-config"
:total="total"
:screen-height="height" :screen-height="height"
:batch-operators="buttons" :batch-operators="buttons"
:data="metadataArr" :data="metadataArr"

View File

@ -10,27 +10,17 @@
:create-tip="$t('user.create')" :title="$t('commons.user')"/> :create-tip="$t('user.create')" :title="$t('commons.user')"/>
</template> </template>
<el-table border class="adjust-table ms-select-all-fixed" :data="tableData" style="width: 100%" <ms-table border
@select-all="handleSelectAll" class="adjust-table"
@select="handleSelect" :condition="condition"
@sort-change="sort" :total="total"
:header-cell-class-name="handleHeadAddClass" :data="tableData"
style="width: 100%"
:batch-operators="buttons"
:height="screenHeight" :height="screenHeight"
enableSelection
@refresh="search"
ref="userTable"> ref="userTable">
<el-table-column type="selection" width="50"/>
<ms-table-header-select-popover v-show="total>0"
:page-size="pageSize>total?total:pageSize"
:total="total"
:select-data-counts="selectDataCounts"
:table-data-count-in-page="tableData.length"
@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="scope.row.showMore" :buttons="buttons" :size="selectDataCounts"/>
</template>
</el-table-column>
<el-table-column prop="id" label="ID"/> <el-table-column prop="id" label="ID"/>
<el-table-column prop="name" :label="$t('commons.name')" max-width="200"/> <el-table-column prop="name" :label="$t('commons.name')" max-width="200"/>
@ -72,7 +62,7 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </ms-table>
<ms-table-pagination :change="search" :current-page.sync="currentPage" :page-size.sync="pageSize" <ms-table-pagination :change="search" :current-page.sync="currentPage" :page-size.sync="pageSize"
:total="total"/> :total="total"/>
@ -114,6 +104,7 @@
<script> <script>
import MsTablePagination from "metersphere-frontend/src/components/pagination/TablePagination"; import MsTablePagination from "metersphere-frontend/src/components/pagination/TablePagination";
import MsTableHeader from "metersphere-frontend/src/components/MsTableHeader"; import MsTableHeader from "metersphere-frontend/src/components/MsTableHeader";
import MsTable from "metersphere-frontend/src/components/table/MsTable";
import MsTableOperator from "metersphere-frontend/src/components/MsTableOperator"; import MsTableOperator from "metersphere-frontend/src/components/MsTableOperator";
import MsDialogFooter from "metersphere-frontend/src/components/MsDialogFooter"; import MsDialogFooter from "metersphere-frontend/src/components/MsDialogFooter";
import MsTableOperatorButton from "metersphere-frontend/src/components/MsTableOperatorButton"; import MsTableOperatorButton from "metersphere-frontend/src/components/MsTableOperatorButton";
@ -164,7 +155,8 @@ export default {
UserImport, UserImport,
MsTableHeaderSelectPopover, MsTableHeaderSelectPopover,
UserCascader, UserCascader,
ShowMoreBtn ShowMoreBtn,
MsTable
}, },
inject: [ inject: [
'reload' 'reload'
@ -482,7 +474,7 @@ export default {
} }
}, },
buildBatchParam(param) { buildBatchParam(param) {
param.ids = Array.from(this.selectRows).map(row => row.id); param.ids = this.$refs.userTable.selectIds;
param.projectId = getCurrentProjectID(); param.projectId = getCurrentProjectID();
param.condition = this.condition; param.condition = this.condition;
return param; return param;