bug修复

1、便跟选择后查询条件未变
2、新增选择人员数
pet_li_6.6
liujun 2024-04-17 15:23:22 +08:00
parent a5cda7aa2b
commit 06f3746c8a
1 changed files with 17 additions and 11 deletions

View File

@ -104,7 +104,7 @@
border border
fit fit
highlight-current-row highlight-current-row
@select="updateSelect" @selection-change="updateSelect"
> >
<el-table-column :reserve-selection="true" type="selection" width="55" align="center"/> <el-table-column :reserve-selection="true" type="selection" width="55" align="center"/>
@ -164,6 +164,7 @@
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<div style="margin-left: 10px"> <div style="margin-left: 10px">
<div>已选择人员数量{{ ($refs.multipleTable && $refs.multipleTable.selection)?$refs.multipleTable.selection.length:0 }}</div>
<div class="el-form-item__label">已选择人员名称</div> <div class="el-form-item__label">已选择人员名称</div>
<el-table <el-table
:data="selectPeopleList" :data="selectPeopleList"
@ -270,16 +271,18 @@ export default {
this.getDic() this.getDic()
}, },
updateSelect(rows, row) { updateSelect(rows, row) {
console.log(rows) if (this.visible) {
if (this.form.CLASS_SIZE === '' || !this.form.CLASS_SIZE) { if (this.form.CLASS_SIZE === '' || !this.form.CLASS_SIZE) {
this.$message.error('请先选择班级容量') this.$message.error('请先选择班级容量')
return this.$refs.multipleTable.clearSelection()
return
}
if (rows.length > this.form.CLASS_SIZE) {
this.$message.error('已超出班级容量')
return
}
this.selectPeopleList = rows
} }
if (rows.length > this.form.CLASS_SIZE) {
this.$message.error('已超出班级容量')
return
}
this.selectPeopleList = rows
}, },
confirm() { confirm() {
const list = this.$refs.multipleTable.selection const list = this.$refs.multipleTable.selection
@ -325,6 +328,7 @@ export default {
} }
this.selectPeopleList = [] this.selectPeopleList = []
this.util.BELONG_TO_CORP = '' this.util.BELONG_TO_CORP = ''
this.$refs.multipleTable.clearSelection()
}, },
getDic() { getDic() {
let i = 0 let i = 0
@ -474,7 +478,9 @@ export default {
this.$refs.userPdf.init({ CLASS_MESSAGE_ID: CLASS_MESSAGE_ID }) this.$refs.userPdf.init({ CLASS_MESSAGE_ID: CLASS_MESSAGE_ID })
}, },
changePeopleList() { changePeopleList() {
requestFN('/classMessage/getPeopleList?showCount=' + this.form.CLASS_SIZE + '&currentPage=1').then((data) => { requestFN('/classMessage/getPeopleList?showCount=' + this.form.CLASS_SIZE + '&currentPage=1',
{ BELONG_TO_CORP: this.util.BELONG_TO_CORP }
).then((data) => {
this.peopleList = data.varList this.peopleList = data.varList
for (let i = 0; i < this.peopleList.length; i++) { for (let i = 0; i < this.peopleList.length; i++) {
this.peopleList[i].STATUS = '' this.peopleList[i].STATUS = ''