|
|
|
@ -59,6 +59,7 @@
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
async confirm() {
|
|
|
|
|
await showDialog("确定要" +(this.edit ? '编辑' : '新增') + '吗?', this)
|
|
|
|
|
if (this.edit) {
|
|
|
|
|
await post('lb/user/updateUser', {
|
|
|
|
|
nickname: this.userForm.nickname,
|
|
|
|
@ -69,7 +70,7 @@
|
|
|
|
|
position: parseInt(this.userForm.position),
|
|
|
|
|
uid: this.userForm.uid
|
|
|
|
|
})
|
|
|
|
|
showSuccess('编辑完成',this)
|
|
|
|
|
showSuccess('编辑完成', this)
|
|
|
|
|
} else {
|
|
|
|
|
await post('lb/user/addUser', {
|
|
|
|
|
nickname: this.userForm.nickname,
|
|
|
|
@ -80,7 +81,7 @@
|
|
|
|
|
position: parseInt(this.userForm.position),
|
|
|
|
|
password: this.password
|
|
|
|
|
})
|
|
|
|
|
showSuccess('新增完成',this)
|
|
|
|
|
showSuccess('新增完成', this)
|
|
|
|
|
}
|
|
|
|
|
this.$emit('confirm')
|
|
|
|
|
},
|
|
|
|
|