|
|
|
@ -425,14 +425,13 @@ export default { |
|
|
|
|
if(this.workNumberRepeat) return util.errorMsg('该学号/工号已存在!') |
|
|
|
|
if(this.phoneRepeat) return util.errorMsg('该手机号已存在!') |
|
|
|
|
if(this.emailRepeat) return util.errorMsg('该邮箱已存在!') |
|
|
|
|
this.submiting = true |
|
|
|
|
let data = this.form |
|
|
|
|
// 如果是新增,则取当前用户的schoolId |
|
|
|
|
data.schoolId = data.schoolId ? data.schoolId : this.schoolId |
|
|
|
|
// 如果是新增,则生成个时间戳作为唯一标识 |
|
|
|
|
if(!data.userId) data.uniqueIdentification = new Date().getTime() |
|
|
|
|
|
|
|
|
|
if(!data.roleIds.length) return util.errorMsg('请至少选择一个角色') |
|
|
|
|
this.submiting = true |
|
|
|
|
if(this.form.userId){ |
|
|
|
|
this.$post(this.api.modifyUser,data).then(res => { |
|
|
|
|
this.userVisible = false |
|
|
|
|