|
|
|
@ -23,11 +23,12 @@
|
|
|
|
|
:checkbox-config="{ labelField: '', highlight: true, trigger: 'row', reserve: true , range: true}"
|
|
|
|
|
row-id="id"
|
|
|
|
|
v-bind="gridOptions"
|
|
|
|
|
@checkbox-all="selectAllEvent"
|
|
|
|
|
@checkbox-change="selectChangeEvent"
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
<div class="right">
|
|
|
|
|
<!-- <div class="right">
|
|
|
|
|
<div class="title">{{ `已选择实体(${selectionRows.length * 2})` }}</div>
|
|
|
|
|
<div class="right_list">
|
|
|
|
|
<div v-for="(item,index) in selectionRows" :key="index" class="right_list_item">
|
|
|
|
@ -42,7 +43,7 @@
|
|
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div> -->
|
|
|
|
|
</div>
|
|
|
|
|
<div style="text-align: center;margin-top: 10px">
|
|
|
|
|
<el-button type="primary" plain style="width: 80px" @click="() => { dialogOptions.show = false }">取消</el-button>
|
|
|
|
@ -168,6 +169,29 @@ export default {
|
|
|
|
|
this.$delete(this.selectionRows, dataIndex)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// vxe复选框当前页全选中方法(保留翻页选中的数据):
|
|
|
|
|
selectAllEvent({ checked, records, reserves }) {
|
|
|
|
|
// console.log(checked ? '勾选事件' : '取消事件')
|
|
|
|
|
// console.log('当前选中的数据:' + records)
|
|
|
|
|
// console.log('翻页时其他页的数据:' + reserves)
|
|
|
|
|
// 全选中时
|
|
|
|
|
if (checked) {
|
|
|
|
|
// 第一次选数据,还未进行翻页时
|
|
|
|
|
if (reserves.length == 0) {
|
|
|
|
|
this.selectedRowKeys = records.map(v => v.id)
|
|
|
|
|
this.selectionRows = records
|
|
|
|
|
} else {
|
|
|
|
|
// id集合,翻页存在已选中的数据时,拼接新选中的数据
|
|
|
|
|
this.selectedRowKeys = [...reserves.map(v => v.id), ...records.map(v => v.id)]
|
|
|
|
|
// 数据集合,翻页存在已选中的数据时,拼接新选中的数据
|
|
|
|
|
this.selectionRows = [...reserves, ...records]
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
// 取消全选时,直接将翻页数据赋值,当前页数据不用加上
|
|
|
|
|
this.selectionRows = reserves
|
|
|
|
|
this.selectedRowKeys = reserves.map(v => v.id)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
handleSearch() {
|
|
|
|
|
const filterVal = String(this.name).trim().toLowerCase()
|
|
|
|
|
if (filterVal) {
|
|
|
|
@ -213,7 +237,7 @@ export default {
|
|
|
|
|
height: 750px;
|
|
|
|
|
width: 1240px;
|
|
|
|
|
.left {
|
|
|
|
|
width: 750px;
|
|
|
|
|
width: 100%;
|
|
|
|
|
border-right: 1px solid #EAEAEA;
|
|
|
|
|
padding-right: 30px;
|
|
|
|
|
.search {
|
|
|
|
|