|
|
@ -291,9 +291,6 @@ export default { |
|
|
|
emailNoAdd: '', |
|
|
|
emailNoAdd: '', |
|
|
|
managerNumberNoAdd: true, |
|
|
|
managerNumberNoAdd: true, |
|
|
|
teacherNumberNoAdd: true, |
|
|
|
teacherNumberNoAdd: true, |
|
|
|
studentNumberNoAdd: true, |
|
|
|
|
|
|
|
managerNumberNoAdd1: true, |
|
|
|
|
|
|
|
teacherNumberNoAdd1: true, |
|
|
|
|
|
|
|
platformId: this.$store.state.platformId, |
|
|
|
platformId: this.$store.state.platformId, |
|
|
|
isManager: false, |
|
|
|
isManager: false, |
|
|
|
isTeacher: false, |
|
|
|
isTeacher: false, |
|
|
@ -585,42 +582,28 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
async OnlyId(type){ |
|
|
|
async OnlyId(type){ |
|
|
|
let workNumber = type == 13 ? this.encodeString(this.teacherForm.managerWorkNumber) : this.encodeString(this.teacherForm.teacherWorkNumber) |
|
|
|
let data = {}; |
|
|
|
let data = { |
|
|
|
let msg = ''; |
|
|
|
workNumber, |
|
|
|
if(type == 13){ |
|
|
|
roleId: 13, |
|
|
|
data = { |
|
|
|
schoolId: this.teacherForm.schoolId |
|
|
|
workNumber: this.encodeString(this.teacherForm.managerWorkNumber), |
|
|
|
} |
|
|
|
roleId: 13, |
|
|
|
let data1 = { |
|
|
|
schoolId: this.teacherForm.schoolId |
|
|
|
workNumber, |
|
|
|
} |
|
|
|
roleId: 14, |
|
|
|
msg = '该管理员工号已存在' |
|
|
|
schoolId: this.teacherForm.schoolId |
|
|
|
}else if(type == 14){ |
|
|
|
} |
|
|
|
data = { |
|
|
|
let data2 = { |
|
|
|
workNumber: this.encodeString(this.teacherForm.teacherWorkNumber), |
|
|
|
workNumber, |
|
|
|
roleId: 14, |
|
|
|
roleId: 4, |
|
|
|
schoolId: this.teacherForm.schoolId |
|
|
|
schoolId: this.teacherForm.schoolId |
|
|
|
} |
|
|
|
} |
|
|
|
msg = '该老师工号已存在' |
|
|
|
let res = await this.$get(this.api.queryWorkNumberIsExist, data) |
|
|
|
|
|
|
|
let res1 = await this.$get(this.api.queryWorkNumberIsExist, data1) |
|
|
|
|
|
|
|
let res2 = await this.$get(this.api.queryWorkNumberIsExist, data2) |
|
|
|
|
|
|
|
if(type == 13 && JSON.stringify(res.message) != '{}'){ |
|
|
|
|
|
|
|
this.$message.warning('该工号已存在'); |
|
|
|
|
|
|
|
this.managerNumberNoAdd = false |
|
|
|
|
|
|
|
}else if(type == 14 && JSON.stringify(res1.message) != '{}'){ |
|
|
|
|
|
|
|
this.$message.warning('该工号已存在'); |
|
|
|
|
|
|
|
this.teacherNumberNoAdd = false |
|
|
|
|
|
|
|
}else if(JSON.stringify(res2.message) != '{}'){ |
|
|
|
|
|
|
|
this.$message.warning('该工号已绑定学生角色'); |
|
|
|
|
|
|
|
this.studentNumberNoAdd = false |
|
|
|
|
|
|
|
}else if(type == 14 && JSON.stringify(res.message) != '{}'){ |
|
|
|
|
|
|
|
this.$message.warning('该工号已绑定管理员角色'); |
|
|
|
|
|
|
|
this.managerNumberNoAdd1 = false |
|
|
|
|
|
|
|
}else if(type == 13 && JSON.stringify(res1.message) != '{}'){ |
|
|
|
|
|
|
|
this.$message.warning('该工号已绑定老师角色'); |
|
|
|
|
|
|
|
this.teacherNumberNoAdd1 = false |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
if(JSON.stringify(res.message) == '{}' && JSON.stringify(res1.message) == '{}' && JSON.stringify(res2.message) == '{}'){ |
|
|
|
let res = await this.$get(this.api.queryWorkNumberIsExist, data); |
|
|
|
|
|
|
|
if(JSON.stringify(res.message) != '{}'){ |
|
|
|
|
|
|
|
this.$message.warning(msg); |
|
|
|
|
|
|
|
type == 13 ? (this.managerNumberNoAdd = false) : (this.teacherNumberNoAdd = false) |
|
|
|
|
|
|
|
}else{ |
|
|
|
let timestamp = Date.parse(new Date()); |
|
|
|
let timestamp = Date.parse(new Date()); |
|
|
|
this.teacherForm.uniqueIdentificationAccount = `${this.schoolId}${this.teacherForm.uniqueIdentificationAccount}${timestamp}` |
|
|
|
this.teacherForm.uniqueIdentificationAccount = `${this.schoolId}${this.teacherForm.uniqueIdentificationAccount}${timestamp}` |
|
|
|
type == 13 ? (this.managerNumberNoAdd = true) : (this.teacherNumberNoAdd = true) |
|
|
|
type == 13 ? (this.managerNumberNoAdd = true) : (this.teacherNumberNoAdd = true) |
|
|
@ -645,9 +628,6 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
if(!this.managerNumberNoAdd) return this.$message.warning('该管理员工号已存在'); |
|
|
|
if(!this.managerNumberNoAdd) return this.$message.warning('该管理员工号已存在'); |
|
|
|
if(!this.teacherNumberNoAdd) return this.$message.warning('该老师工号已存在'); |
|
|
|
if(!this.teacherNumberNoAdd) return this.$message.warning('该老师工号已存在'); |
|
|
|
if(!this.managerNumberNoAdd1) return this.$message.warning('该工号已绑定管理员角色'); |
|
|
|
|
|
|
|
if(!this.teacherNumberNoAdd1) return this.$message.warning('该工号已绑定老师角色'); |
|
|
|
|
|
|
|
if(!this.studentNumberNoAdd) return this.$message.warning('该工号已绑定学生角色'); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let roleId = [] |
|
|
|
let roleId = [] |
|
|
|
this.teacherForm.roleValue.forEach((n,k) => { |
|
|
|
this.teacherForm.roleValue.forEach((n,k) => { |
|
|
|