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

Loading…
Cancel
Save