[fix][V]:完善多选删除功能

master
Romesum 5 years ago
parent 7c4e6ec2c9
commit e984d2b44d

@ -8,11 +8,15 @@
<el-button type="success" style="width: 120px;text-align: left" icon="el-icon-circle-plus-outline"
@click="addUser">新增用户
</el-button>
<el-button type="danger" plain icon="el-icon-delete" style="width: 120px;text-align: left"
@click="deleteUserMul" v-if="items.length">多选删除
</el-button>
</el-col>
</el-row>
<el-table
ref="multipleTable"
:data="tableDataComputed"
@selection-change="handleSelectionChange"
border
style="width: 100%;margin-top: 20px">
<el-table-column type="selection" width="40" align="center"></el-table-column>
@ -53,25 +57,11 @@
data() {
return {
search: '',
tableData: [{
nickname: "",
tel: "",
email: "",
username: "",
office: "",
position:'',
uid: 0
}],
items: [],
tableData: [],
dialogFormVisible: false,
edit: false,
userForm: {
nickname: "",
tel: "",
email: "",
username: "",
office: "",
position: ''
}
userForm: {}
}
}
,
@ -82,6 +72,9 @@
handleClick(row) {
console.log(row);
},
handleSelectionChange(val) {
this.items = val;
},
addUser() {
this.edit = false
this.userForm = {
@ -106,6 +99,10 @@
showFail("删除失败 " + e.msg, this)
})
},
async deleteUserMul(){
await showDialog("确认要删除吗?", this)
showFail("尚未开发",this)
},
//
async editUser(item) {
await showDialog('确认编辑该用户吗?',this)
@ -114,7 +111,6 @@
this.dialogFormVisible = true
},
cancel(){
console.log(1)
this.dialogFormVisible = false
},
confirm(){

Loading…
Cancel
Save