|
|
@ -307,12 +307,13 @@ export default { |
|
|
|
}, |
|
|
|
// 表单提交 |
|
|
|
dataFormSubmitHandle: debounce(function() { |
|
|
|
console.log(this.dataForm) |
|
|
|
this.$refs.dataForm.validate((valid) => { |
|
|
|
if (!valid) { |
|
|
|
return false |
|
|
|
} |
|
|
|
this.$http[!this.dataForm.id ? 'post' : 'put']('/sys/user', this.dataForm).then(({ data: res }) => { |
|
|
|
const param = { ...this.dataForm } |
|
|
|
param.password = this.$md5(param.password) |
|
|
|
this.$http[!this.dataForm.id ? 'post' : 'put']('/sys/user', param).then(({ data: res }) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.msg) |
|
|
|
} |
|
|
|