【修改】 修改bug

This commit is contained in:
zhoulingpo
2023-05-09 18:18:11 +08:00
parent 745996c226
commit 6e78516c64
5 changed files with 41 additions and 21 deletions
@@ -2,7 +2,9 @@
<div>
<div class="table">
<vxe-table ref="xTable" :data="tableData" :empty-render="{name: 'NotData'}" align="center" border stripe v-table-min-height="'calc(100vh - 380px)'">
<vxe-table ref="xTable" :data="tableData" :empty-render="{name: 'NotData'}" align="center"
border stripe v-table-min-height="'calc(100vh - 380px)'"
@checkbox-all="selectAllEvent" @checkbox-change="selectChangeEvent">
<vxe-column type="checkbox" width="60"></vxe-column>
<vxe-column show-overflow show-header-overflow type="seq" title="序号" width="77">
<template #default="{ row, rowIndex }">
@@ -56,7 +58,9 @@ export default {
size:10
},
total: 0,
tableData: []
tableData: [],
checkList:[],
checkIds:[]
};
},
props:{
@@ -79,6 +83,22 @@ export default {
this.loadData()
},
methods: {
selectAllEvent({checked}) {
const records = this.$refs.xTable.getCheckboxRecords()
this.checkList = records
this.checkIds = records.map(item => {
return item.id
})
this.$bus.$emit('handleClick', this.checkList);
},
selectChangeEvent({checked}) {
const records = this.$refs.xTable.getCheckboxRecords()
this.checkList = records
this.checkIds = records.map(item => {
return item.id
})
this.$bus.$emit('handleClick', this.checkList);
},
loadData() {
let userId=this.$store.getters.userInfo.usid
this.$api.processCenter.gencyProcessPage({...this.q,...this.form,userId:userId}).then(res=>{