添加用户
This commit is contained in:
parent
2b94112e48
commit
522526a02b
|
@ -142,11 +142,17 @@ export default {
|
||||||
this.resetForm()
|
this.resetForm()
|
||||||
},
|
},
|
||||||
submitForm () {
|
submitForm () {
|
||||||
this.$refs.addFormRef.validate(validate => {
|
this.$refs.addFormRef.validate(async validate => {
|
||||||
if (!validate) {
|
if (!validate) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
const { data: res } = await this.$http.post('users', this.addForm)
|
||||||
|
if (res.meta.status !== 201) {
|
||||||
|
return this.$message.error(res.meta.msg)
|
||||||
|
}
|
||||||
|
this.$message.success(res.meta.msg)
|
||||||
this.dialogVisible = false
|
this.dialogVisible = false
|
||||||
|
await this.getUserList()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
resetForm () {
|
resetForm () {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user