受众的调整

This commit is contained in:
daihh
2023-03-01 16:27:12 +08:00
parent ec5d7cf1e7
commit 7262e8a568

View File

@@ -50,7 +50,7 @@
<el-button type="primary" size="medium" @click="queryUserData">搜索</el-button> <el-button type="primary" size="medium" @click="queryUserData">搜索</el-button>
<el-button type="primary" class="findBtn" size="medium" @click="reset">重置</el-button> <el-button type="primary" class="findBtn" size="medium" @click="reset">重置</el-button>
</div> </div>
<el-table ref="userTable" :data="userData" v-loading="userDataLoading" tooltip-effect="dark" @selection-change="userSelectionChange"> <el-table ref="groupUserTable" :data="userData" v-loading="userDataLoading" tooltip-effect="dark" @selection-change="userSelectionChange">
<el-table-column type="selection" align="center" width="55"></el-table-column> <el-table-column type="selection" align="center" width="55"></el-table-column>
<el-table-column label="姓名" prop="realName" align="center"></el-table-column> <el-table-column label="姓名" prop="realName" align="center"></el-table-column>
<el-table-column prop="userNo" label="工号" align="center"></el-table-column> <el-table-column prop="userNo" label="工号" align="center"></el-table-column>
@@ -388,15 +388,22 @@
if(this.multipleSelection.length == 0){ if(this.multipleSelection.length == 0){
this.$message({ type: "error", message: '请先选择要删除的数据' ,offset:50}); this.$message({ type: "error", message: '请先选择要删除的数据' ,offset:50});
} }
for (let i = 0; i < this.multipleSelection.length; i++) { let $this=this;
for (let j = 0; j < this.tableData.length; j++) { //console.log(this.multipleSelection,'this.multipleSelection');
if (this.tableData[j].aid === this.multipleSelection[i].aid) { this.multipleSelection.forEach(item=>{
this.tableData.splice(j, 1) var delIdx=-1;
break $this.tableData.forEach((row,rowIdx)=>{
if(row.id==item.id){
delIdx=rowIdx;
}
});
if(delIdx>-1){
$this.tableData.splice(delIdx, 1)
} }
} });
} this.multipleSelection=[];
this.queryTableData(); this.$refs.multipleTable.clearSelection();
}, },
openImportDialog(){ openImportDialog(){
this.selectFile = ''; this.selectFile = '';