|
|
@ -72,7 +72,7 @@ |
|
|
|
<el-checkbox-group v-model="teacherForm.roleValue"> |
|
|
|
<el-checkbox-group v-model="teacherForm.roleValue"> |
|
|
|
<el-checkbox label="老师"></el-checkbox> |
|
|
|
<el-checkbox label="老师"></el-checkbox> |
|
|
|
<el-checkbox label="管理员"></el-checkbox> |
|
|
|
<el-checkbox label="管理员"></el-checkbox> |
|
|
|
<el-checkbox label="学生" disabled></el-checkbox> |
|
|
|
<!-- <el-checkbox label="学生" disabled></el-checkbox> --> |
|
|
|
</el-checkbox-group> |
|
|
|
</el-checkbox-group> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item prop="uniqueIdentificationAccount" label="唯一标识"> |
|
|
|
<el-form-item prop="uniqueIdentificationAccount" label="唯一标识"> |
|
|
@ -117,7 +117,7 @@ |
|
|
|
<el-input v-model="teacherForm.phone" placeholder="请输入手机号" maxlength="11" @change="phoneChange"></el-input> |
|
|
|
<el-input v-model="teacherForm.phone" placeholder="请输入手机号" maxlength="11" @change="phoneChange"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item prop="email" label="邮箱"> |
|
|
|
<el-form-item prop="email" label="邮箱"> |
|
|
|
<el-input v-model="teacherForm.email" placeholder="请输入邮箱"></el-input> |
|
|
|
<el-input v-model="teacherForm.email" placeholder="请输入邮箱" @change="emailChange"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<!-- <el-form-item prop="major" label="专业方向"> |
|
|
|
<!-- <el-form-item prop="major" label="专业方向"> |
|
|
|
<el-select v-model="teacherForm.major" placeholder="请选择专业方向"> |
|
|
|
<el-select v-model="teacherForm.major" placeholder="请选择专业方向"> |
|
|
@ -126,7 +126,7 @@ |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</el-form-item> --> |
|
|
|
</el-form-item> --> |
|
|
|
<el-form-item prop="schoolId" label="所在院校"> |
|
|
|
<el-form-item prop="schoolId" label="所在院校"> |
|
|
|
<el-select v-model="teacherForm.schoolId" placeholder="默认为当前院校(可修改)" filterable> |
|
|
|
<el-select v-model="teacherForm.schoolId" placeholder="默认为当前院校(可修改)" filterable disabled> |
|
|
|
<el-option v-for="(item,index) in schoolList" :key="index" :label="item.schoolName" :value="item.schoolId"></el-option> |
|
|
|
<el-option v-for="(item,index) in schoolList" :key="index" :label="item.schoolName" :value="item.schoolId"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
@ -288,6 +288,7 @@ export default { |
|
|
|
ProfessionalList: [], |
|
|
|
ProfessionalList: [], |
|
|
|
NoAdd: '', |
|
|
|
NoAdd: '', |
|
|
|
AccountNoAdd: '', |
|
|
|
AccountNoAdd: '', |
|
|
|
|
|
|
|
emailNoAdd: '', |
|
|
|
managerNumberNoAdd: true, |
|
|
|
managerNumberNoAdd: true, |
|
|
|
teacherNumberNoAdd: true, |
|
|
|
teacherNumberNoAdd: true, |
|
|
|
studentNumberNoAdd: true, |
|
|
|
studentNumberNoAdd: true, |
|
|
@ -521,6 +522,15 @@ export default { |
|
|
|
this.NoAdd = true |
|
|
|
this.NoAdd = true |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
async emailChange(){ |
|
|
|
|
|
|
|
let res = await this.$get(this.api.queryEmail, { email: this.teacherForm.email }); |
|
|
|
|
|
|
|
if(res.message.length != 0){ |
|
|
|
|
|
|
|
this.$message.warning('该邮箱已存在'); |
|
|
|
|
|
|
|
this.emailNoAdd = false |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
this.emailNoAdd = true |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
async accountChange(){ |
|
|
|
async accountChange(){ |
|
|
|
let res = await this.$get(this.api.queryAccountIsExist, { |
|
|
|
let res = await this.$get(this.api.queryAccountIsExist, { |
|
|
|
account: this.encodeString(this.teacherForm.userAccount), |
|
|
|
account: this.encodeString(this.teacherForm.userAccount), |
|
|
@ -627,7 +637,11 @@ export default { |
|
|
|
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 |
|
|
|
}else if(this.NoAdd === false) return this.$message.warning('该手机号已存在'); |
|
|
|
}else if(this.NoAdd === false){ |
|
|
|
|
|
|
|
return this.$message.warning('该手机号已存在') |
|
|
|
|
|
|
|
}else if(this.emailNoAdd === false){ |
|
|
|
|
|
|
|
return this.$message.warning('该邮箱已存在') |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
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('该老师工号已存在'); |
|
|
|