|
|
@ -297,7 +297,8 @@ export default { |
|
|
|
isNewUser: 1, |
|
|
|
isNewUser: 1, |
|
|
|
schoolList: [], |
|
|
|
schoolList: [], |
|
|
|
uploadFaild: false, |
|
|
|
uploadFaild: false, |
|
|
|
token: '' |
|
|
|
token: '', |
|
|
|
|
|
|
|
accountMsg: '' |
|
|
|
}; |
|
|
|
}; |
|
|
|
}, |
|
|
|
}, |
|
|
|
components: { |
|
|
|
components: { |
|
|
@ -540,7 +541,8 @@ export default { |
|
|
|
if(res.message.user.length != 0){ |
|
|
|
if(res.message.user.length != 0){ |
|
|
|
let user = res.message.user[0]; |
|
|
|
let user = res.message.user[0]; |
|
|
|
let or = res.message.OR; |
|
|
|
let or = res.message.OR; |
|
|
|
this.$message.warning('该账号已存在'); |
|
|
|
this.accountMsg = user.roleId.includes(',') ? '该账号已绑定老师和管理员' : `该账号已绑定${this.roleStatus(user.roleId)}` |
|
|
|
|
|
|
|
this.$message.warning(this.accountMsg) |
|
|
|
this.teacherForm.email = user.email |
|
|
|
this.teacherForm.email = user.email |
|
|
|
this.teacherForm.phone = user.phone |
|
|
|
this.teacherForm.phone = user.phone |
|
|
|
this.teacherForm.uniqueIdentificationAccount = user.uniqueIdentificationAccount |
|
|
|
this.teacherForm.uniqueIdentificationAccount = user.uniqueIdentificationAccount |
|
|
@ -616,7 +618,7 @@ export default { |
|
|
|
if(this.isManager && this.isTeacher) return this.$message.warning('该用户已经是老师和管理员,请重新添加'); |
|
|
|
if(this.isManager && this.isTeacher) return this.$message.warning('该用户已经是老师和管理员,请重新添加'); |
|
|
|
if(this.isManager && !this.teacherForm.roleValue.some((n) => n == '老师')) return this.$message.warning('该用户已经是管理员'); |
|
|
|
if(this.isManager && !this.teacherForm.roleValue.some((n) => n == '老师')) return this.$message.warning('该用户已经是管理员'); |
|
|
|
if(this.isTeacher && !this.teacherForm.roleValue.some((n) => n == '管理员')) return this.$message.warning('该用户已经是老师'); |
|
|
|
if(this.isTeacher && !this.teacherForm.roleValue.some((n) => n == '管理员')) return this.$message.warning('该用户已经是老师'); |
|
|
|
if(!this.AccountNoAdd) return this.$message.warning('该账号已存在'); |
|
|
|
if(!this.AccountNoAdd) return this.$message.warning(this.accountMsg); |
|
|
|
if(this.NoAdd == '' && this.teacherForm.phone){ |
|
|
|
if(this.NoAdd == '' && this.teacherForm.phone){ |
|
|
|
this.phoneChange() |
|
|
|
this.phoneChange() |
|
|
|
if(!this.NoAdd) return false |
|
|
|
if(!this.NoAdd) return false |
|
|
@ -630,10 +632,8 @@ export default { |
|
|
|
if(!this.teacherNumberNoAdd) return this.$message.warning('该老师工号已存在'); |
|
|
|
if(!this.teacherNumberNoAdd) return this.$message.warning('该老师工号已存在'); |
|
|
|
|
|
|
|
|
|
|
|
let roleId = [] |
|
|
|
let roleId = [] |
|
|
|
this.teacherForm.roleValue.forEach((n,k) => { |
|
|
|
this.teacherForm.roleValue.includes('管理员') && roleId.push(13) |
|
|
|
n == '老师' && roleId.push(14) |
|
|
|
this.teacherForm.roleValue.includes('老师') && roleId.push(14) |
|
|
|
n == '管理员' && roleId.push(13) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
let data = { |
|
|
|
let data = { |
|
|
|
userName: this.teacherForm.userName, |
|
|
|
userName: this.teacherForm.userName, |
|
|
|
account: this.teacherForm.userAccount, |
|
|
|
account: this.teacherForm.userAccount, |
|
|
|