|
|
@ -1,12 +1,12 @@ |
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<div class="wrap"> |
|
|
|
<div class="wrap"> |
|
|
|
<div class="header"> |
|
|
|
<div class="header"> |
|
|
|
<el-avatar :size="80" :src="this.$store.state.avatar" class="Headtop"></el-avatar> |
|
|
|
<el-avatar :size="80" :src="this.form.avatar" class="Headtop"></el-avatar> |
|
|
|
<div style="color:#9278FF;font-size:14px;font-family:MicrosoftYaHei;margin-top:5px;"> |
|
|
|
<div style="color:#9278FF;font-size:14px;font-family:MicrosoftYaHei;margin-top:5px;"> |
|
|
|
<el-upload |
|
|
|
<el-upload |
|
|
|
class="upload-demo" |
|
|
|
class="upload-demo" |
|
|
|
|
|
|
|
:headers="{token}" |
|
|
|
:action="this.api.updateUserAvatars" |
|
|
|
:action="this.api.updateUserAvatars" |
|
|
|
:data="{userId:this.userId}" |
|
|
|
|
|
|
|
name="file" |
|
|
|
name="file" |
|
|
|
:limit="1" |
|
|
|
:limit="1" |
|
|
|
:on-success="getRes" |
|
|
|
:on-success="getRes" |
|
|
@ -381,7 +381,7 @@ |
|
|
|
export default { |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
return { |
|
|
|
userId: this.$store.state.userLoginId, |
|
|
|
token: sessionStorage.getItem('token'), |
|
|
|
form: { |
|
|
|
form: { |
|
|
|
name:'', |
|
|
|
name:'', |
|
|
|
workNumber:'', |
|
|
|
workNumber:'', |
|
|
@ -482,7 +482,6 @@ export default { |
|
|
|
disciplineName: '', //专业学科名称 |
|
|
|
disciplineName: '', //专业学科名称 |
|
|
|
professionalId: '', //专业 |
|
|
|
professionalId: '', //专业 |
|
|
|
professionalName: '', //专业名称 |
|
|
|
professionalName: '', //专业名称 |
|
|
|
userId: this.userId |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
email: '', |
|
|
|
email: '', |
|
|
|
emailBtnText: '发送验证码', |
|
|
|
emailBtnText: '发送验证码', |
|
|
@ -546,7 +545,7 @@ export default { |
|
|
|
getSchoolData(){ |
|
|
|
getSchoolData(){ |
|
|
|
this.$get(this.api.querySchoolData,{schoolName: '',provinceId: '',cityId: ''}).then(res => { |
|
|
|
this.$get(this.api.querySchoolData,{schoolName: '',provinceId: '',cityId: ''}).then(res => { |
|
|
|
this.schoolList = res.list |
|
|
|
this.schoolList = res.list |
|
|
|
}).catch(res => {}); |
|
|
|
}).catch(res => {}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
async accountChange(){ |
|
|
|
async accountChange(){ |
|
|
|
if(this.originAccount != this.form.account){ |
|
|
|
if(this.originAccount != this.form.account){ |
|
|
@ -569,7 +568,7 @@ export default { |
|
|
|
this.$store.commit('userPhoto',{avatar:res.message}) |
|
|
|
this.$store.commit('userPhoto',{avatar:res.message}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
getdata() { |
|
|
|
getdata() { |
|
|
|
this.$get(this.api.queryUserInfoDetails,{ userId: this.userId }).then(res => { |
|
|
|
this.$get(this.api.queryUserInfoDetails).then(res => { |
|
|
|
let userInfo = res.result.hrUserInfo |
|
|
|
let userInfo = res.result.hrUserInfo |
|
|
|
let schoolId = userInfo.schoolId |
|
|
|
let schoolId = userInfo.schoolId |
|
|
|
this.form = Object.assign(userInfo,res.result.userAccountList[0]) |
|
|
|
this.form = Object.assign(userInfo,res.result.userAccountList[0]) |
|
|
@ -595,27 +594,19 @@ export default { |
|
|
|
this.$set(e, 'schoolName', e.schoolName ? e.schoolName : ''); |
|
|
|
this.$set(e, 'schoolName', e.schoolName ? e.schoolName : ''); |
|
|
|
|
|
|
|
|
|
|
|
if(e.disciplineId){ |
|
|
|
if(e.disciplineId){ |
|
|
|
this.$get(this.api.queryCourseProfessionalClass,{ disciplineId: e.disciplineId }).then(res => { |
|
|
|
this.$post(this.api.queryCourseProfessionalClass,[e.disciplineId]).then(res => { |
|
|
|
this.$set(e, 'ProfessionalClassList', res.message); |
|
|
|
this.$set(e, 'ProfessionalClassList', res.result); |
|
|
|
}).catch(res => {}); |
|
|
|
}).catch(res => {}); |
|
|
|
}else{ |
|
|
|
}else{ |
|
|
|
this.$set(e, 'ProfessionalClassList', []); |
|
|
|
this.$set(e, 'ProfessionalClassList', []); |
|
|
|
} |
|
|
|
} |
|
|
|
if(e.professionalClassId){ |
|
|
|
if(e.professionalClassId){ |
|
|
|
this.$get(this.api.queryCourseProfessional,{ professionalClassId: e.professionalClassId }).then(res => { |
|
|
|
this.$get(this.api.queryCourseProfessional,{ professionalClassId: e.professionalClassId }).then(res => { |
|
|
|
this.$set(e, 'ProfessionalList', res.message); |
|
|
|
this.$set(e, 'ProfessionalList', res.result); |
|
|
|
}).catch(res => {}); |
|
|
|
}).catch(res => {}); |
|
|
|
}else{ |
|
|
|
}else{ |
|
|
|
this.$set(e, 'ProfessionalList', []); |
|
|
|
this.$set(e, 'ProfessionalList', []); |
|
|
|
} |
|
|
|
} |
|
|
|
// if(e.provinceId){ |
|
|
|
|
|
|
|
// this.$get(this.api.queryCity,{provinceId: e.provinceId}).then(res => { |
|
|
|
|
|
|
|
// this.$set(e, 'cityList', res.message); |
|
|
|
|
|
|
|
// }).catch(res => {}); |
|
|
|
|
|
|
|
// }else{ |
|
|
|
|
|
|
|
// this.$set(e, 'cityList', []); |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
console.log(11,window.scrollTo) |
|
|
|
|
|
|
|
}) |
|
|
|
}) |
|
|
|
}else{ |
|
|
|
}else{ |
|
|
|
this.concatArch(1) |
|
|
|
this.concatArch(1) |
|
|
@ -638,7 +629,6 @@ export default { |
|
|
|
ProfessionalList: [], |
|
|
|
ProfessionalList: [], |
|
|
|
professionalId: '', |
|
|
|
professionalId: '', |
|
|
|
professionalName: '', |
|
|
|
professionalName: '', |
|
|
|
userId: this.userId, |
|
|
|
|
|
|
|
personalFileId: '' |
|
|
|
personalFileId: '' |
|
|
|
}) |
|
|
|
}) |
|
|
|
// if(!isLoadData){ |
|
|
|
// if(!isLoadData){ |
|
|
@ -677,11 +667,13 @@ export default { |
|
|
|
if(this.passwordForm.password === this.passwordForm.newPassword) return this.$message.warning('原密码跟新密码不能一致') |
|
|
|
if(this.passwordForm.password === this.passwordForm.newPassword) return this.$message.warning('原密码跟新密码不能一致') |
|
|
|
|
|
|
|
|
|
|
|
let data = this.passwordForm |
|
|
|
let data = this.passwordForm |
|
|
|
data.userid = this.userId |
|
|
|
data.accountId = this.form.userId |
|
|
|
this.$post(this.api.examinePassword,data).then(res => { |
|
|
|
this.$post(this.api.examinePassword,data).then(res => { |
|
|
|
if(res.errmessage == 'success'){ |
|
|
|
if(res.status == 200){ |
|
|
|
this.$message.success('更换成功') |
|
|
|
this.$message.success('更换成功') |
|
|
|
this.passwordVisible = false |
|
|
|
this.passwordVisible = false |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
this.$message.error(res.message) |
|
|
|
} |
|
|
|
} |
|
|
|
}).catch(err => {}) |
|
|
|
}).catch(err => {}) |
|
|
|
}, |
|
|
|
}, |
|
|
@ -701,8 +693,8 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 获取学科类别 |
|
|
|
// 获取学科类别 |
|
|
|
getSubject(){ |
|
|
|
getSubject(){ |
|
|
|
this.$get(this.api.queryCourseDiscipline).then(res => { |
|
|
|
this.$post(this.api.queryCourseDiscipline).then(res => { |
|
|
|
this.subjectList = res.message |
|
|
|
this.subjectList = res.result |
|
|
|
}).catch(res => {}) |
|
|
|
}).catch(res => {}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 清除学科类别 |
|
|
|
// 清除学科类别 |
|
|
@ -743,10 +735,10 @@ export default { |
|
|
|
obj = this.subjectList.find(r =>{ |
|
|
|
obj = this.subjectList.find(r =>{ |
|
|
|
return r.disciplineId === item |
|
|
|
return r.disciplineId === item |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.$get(this.api.queryCourseProfessionalClass,{ disciplineId: item }).then(res => { |
|
|
|
this.$post(this.api.queryCourseProfessionalClass,[item]).then(res => { |
|
|
|
this.archivesList.map(e =>{ |
|
|
|
this.archivesList.map(e =>{ |
|
|
|
if(e.disciplineId == item){ |
|
|
|
if(e.disciplineId == item){ |
|
|
|
e.ProfessionalClassList = res.message |
|
|
|
e.ProfessionalClassList = res.result |
|
|
|
e.disciplineName = obj.disciplineName |
|
|
|
e.disciplineName = obj.disciplineName |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
@ -754,8 +746,8 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
getProfessionalClassData(value){ |
|
|
|
getProfessionalClassData(value){ |
|
|
|
this.$get(this.api.queryCourseProfessionalClass,{ disciplineId: value }).then(res => { |
|
|
|
this.$post(this.api.queryCourseProfessionalClass,[value]).then(res => { |
|
|
|
this.ProfessionalClassList = res.message |
|
|
|
this.ProfessionalClassList = res.result |
|
|
|
}).catch(res => {}) |
|
|
|
}).catch(res => {}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 清除专业类 |
|
|
|
// 清除专业类 |
|
|
@ -794,7 +786,7 @@ export default { |
|
|
|
obj = e.ProfessionalClassList.find(r =>{ |
|
|
|
obj = e.ProfessionalClassList.find(r =>{ |
|
|
|
return r.professionalClassId === item |
|
|
|
return r.professionalClassId === item |
|
|
|
}) |
|
|
|
}) |
|
|
|
e.ProfessionalList = res.message |
|
|
|
e.ProfessionalList = res.result |
|
|
|
e.professionalClassName = obj.professionalClassName |
|
|
|
e.professionalClassName = obj.professionalClassName |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
@ -803,7 +795,7 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
getProfessionalData(value){ |
|
|
|
getProfessionalData(value){ |
|
|
|
this.$get(this.api.queryCourseProfessional,{professionalClassId: value}).then(res => { |
|
|
|
this.$get(this.api.queryCourseProfessional,{professionalClassId: value}).then(res => { |
|
|
|
this.ProfessionalList = res.message |
|
|
|
this.ProfessionalList = res.result |
|
|
|
}).catch(res => {}) |
|
|
|
}).catch(res => {}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 获取专业名称 |
|
|
|
// 获取专业名称 |
|
|
@ -831,18 +823,17 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
save() { |
|
|
|
save() { |
|
|
|
let isEmpty = false |
|
|
|
let isEmpty = false |
|
|
|
this.archivesList.forEach((n,k) => { |
|
|
|
// this.archivesList.forEach((n,k) => { |
|
|
|
if(!n.personalCareerId) isEmpty = true |
|
|
|
// if(!n.personalCareerId) isEmpty = true |
|
|
|
n.userId = this.userId |
|
|
|
// n.userId = this.form.userId |
|
|
|
}) |
|
|
|
// }) |
|
|
|
if(isEmpty) return this.$message.warning('请选择职业') |
|
|
|
// if(isEmpty) return this.$message.warning('请选择职业') |
|
|
|
if(this.accountReapeat) return this.$message.warning('该账号已存在') |
|
|
|
if(this.accountReapeat) return this.$message.warning('该账号已存在') |
|
|
|
if(this.form.idNumber && !/(^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$)/.test(this.form.idNumber)) return this.$message.warning('请输入正确的证件号码') |
|
|
|
if(this.form.idNumber && !/(^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$)/.test(this.form.idNumber)) return this.$message.warning('请输入正确的证件号码') |
|
|
|
// this.form.userId = this.userId |
|
|
|
|
|
|
|
let form = this.form |
|
|
|
let form = this.form |
|
|
|
let personalFileList = [] |
|
|
|
let personalFileList = [] |
|
|
|
this.archivesList.forEach((n,k) => { |
|
|
|
this.archivesList.forEach((n,k) => { |
|
|
|
personalFileList.push({ |
|
|
|
n.personalCareerId && personalFileList.push({ |
|
|
|
disciplineId: n.disciplineId, |
|
|
|
disciplineId: n.disciplineId, |
|
|
|
disciplineName: n.disciplineName, |
|
|
|
disciplineName: n.disciplineName, |
|
|
|
personalCareerId: n.personalCareerId, |
|
|
|
personalCareerId: n.personalCareerId, |
|
|
@ -855,11 +846,11 @@ export default { |
|
|
|
provinceName: n.provinceName, |
|
|
|
provinceName: n.provinceName, |
|
|
|
schoolId: n.schoolId, |
|
|
|
schoolId: n.schoolId, |
|
|
|
schoolName: n.schoolName, |
|
|
|
schoolName: n.schoolName, |
|
|
|
userId: this.userId |
|
|
|
userId: form.userId |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
let data = { |
|
|
|
let data = { |
|
|
|
userId: this.userId, |
|
|
|
userId: form.userId, |
|
|
|
userAccountList: [{ |
|
|
|
userAccountList: [{ |
|
|
|
id: form.accountId, |
|
|
|
id: form.accountId, |
|
|
|
account: form.account, |
|
|
|
account: form.account, |
|
|
@ -874,8 +865,9 @@ export default { |
|
|
|
idNumber: form.idNumber, |
|
|
|
idNumber: form.idNumber, |
|
|
|
schoolId: form.schoolId, |
|
|
|
schoolId: form.schoolId, |
|
|
|
sex: form.sex, |
|
|
|
sex: form.sex, |
|
|
|
userId: this.userId, |
|
|
|
userId: form.userId, |
|
|
|
userName: form.userName, |
|
|
|
userName: form.userName, |
|
|
|
|
|
|
|
wechatId: form.wechatId |
|
|
|
}, |
|
|
|
}, |
|
|
|
personalFileList, |
|
|
|
personalFileList, |
|
|
|
} |
|
|
|
} |
|
|
@ -928,14 +920,16 @@ export default { |
|
|
|
if(!this.email) return this.$message.warning('请输入邮箱') |
|
|
|
if(!this.email) return this.$message.warning('请输入邮箱') |
|
|
|
if(!/^([a-zA-Z]|[0-9])(\w|\-)+@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/.test(this.email)) return this.$message.warning('请输入正确的邮箱') |
|
|
|
if(!/^([a-zA-Z]|[0-9])(\w|\-)+@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/.test(this.email)) return this.$message.warning('请输入正确的邮箱') |
|
|
|
let data = { |
|
|
|
let data = { |
|
|
|
userId: this.userId, |
|
|
|
userId: this.form.userId, |
|
|
|
email: this.email, |
|
|
|
email: this.email, |
|
|
|
types: 1 |
|
|
|
types: 1 |
|
|
|
} |
|
|
|
} |
|
|
|
this.$post(this.api.sendEmailCode,data).then(res => { |
|
|
|
this.$post(this.api.sendPhoneOrEmailCode,data).then(res => { |
|
|
|
if(res.errmessage == 'success'){ |
|
|
|
if(res.message.opener){ |
|
|
|
this.emailCountdown() |
|
|
|
this.emailCountdown() |
|
|
|
this.emailOpener = res.data |
|
|
|
this.emailOpener = res.message.opener |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
this.$message.error(res.message) |
|
|
|
} |
|
|
|
} |
|
|
|
}).catch(res => {}); |
|
|
|
}).catch(res => {}); |
|
|
|
}, |
|
|
|
}, |
|
|
@ -944,14 +938,14 @@ export default { |
|
|
|
if(!/^([a-zA-Z]|[0-9])(\w|\-)+@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/.test(this.email)) return this.$message.warning('请输入正确的邮箱') |
|
|
|
if(!/^([a-zA-Z]|[0-9])(\w|\-)+@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/.test(this.email)) return this.$message.warning('请输入正确的邮箱') |
|
|
|
if(!this.emailCode) return this.$message.warning('请输入验证码') |
|
|
|
if(!this.emailCode) return this.$message.warning('请输入验证码') |
|
|
|
let data = { |
|
|
|
let data = { |
|
|
|
userId: this.userId, |
|
|
|
userId: this.form.userId, |
|
|
|
email: this.email, |
|
|
|
email: this.email, |
|
|
|
types: 1, |
|
|
|
types: 1, |
|
|
|
code: this.emailCode, |
|
|
|
code: this.emailCode, |
|
|
|
opener: this.emailOpener |
|
|
|
opener: this.emailOpener |
|
|
|
} |
|
|
|
} |
|
|
|
this.$put(this.api.bingEmail,data).then(res => { |
|
|
|
this.$post(this.api.bindPhoneOrEmail,data).then(res => { |
|
|
|
if(res.errmessage == 'success'){ |
|
|
|
if(res.status == 200){ |
|
|
|
this.$message.success('绑定成功') |
|
|
|
this.$message.success('绑定成功') |
|
|
|
this.form.email = this.email |
|
|
|
this.form.email = this.email |
|
|
|
this.emailVisible = false |
|
|
|
this.emailVisible = false |
|
|
@ -966,14 +960,16 @@ export default { |
|
|
|
sendPhoneCode(){ |
|
|
|
sendPhoneCode(){ |
|
|
|
if(!this.phone) return this.$message.warning('请输入手机号') |
|
|
|
if(!this.phone) return this.$message.warning('请输入手机号') |
|
|
|
if(!/^1[3456789]\d{9}$/.test(this.phone)) return this.$message.warning('请输入正确的手机号') |
|
|
|
if(!/^1[3456789]\d{9}$/.test(this.phone)) return this.$message.warning('请输入正确的手机号') |
|
|
|
this.$post(this.api.sendPhoneCode,{ |
|
|
|
this.$post(this.api.sendPhoneOrEmailCode,{ |
|
|
|
userId: this.userId, |
|
|
|
userId: this.form.userId, |
|
|
|
phone: this.phone, |
|
|
|
phone: this.phone, |
|
|
|
types: 2 |
|
|
|
types: 2 |
|
|
|
}).then(res => { |
|
|
|
}).then(res => { |
|
|
|
if(res.status == 200){ |
|
|
|
if(res.message.opener){ |
|
|
|
this.phoneCountdown() |
|
|
|
this.phoneCountdown() |
|
|
|
this.phoneOpener = res.data |
|
|
|
this.phoneOpener = res.message.opener |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
this.$message.error(res.message) |
|
|
|
} |
|
|
|
} |
|
|
|
}).catch(res => {}) |
|
|
|
}).catch(res => {}) |
|
|
|
}, |
|
|
|
}, |
|
|
@ -982,14 +978,14 @@ export default { |
|
|
|
if(!/^1[3456789]\d{9}$/.test(this.phone)) return this.$message.warning('请输入正确的手机号') |
|
|
|
if(!/^1[3456789]\d{9}$/.test(this.phone)) return this.$message.warning('请输入正确的手机号') |
|
|
|
if(!this.phoneCode) return this.$message.warning('请输入验证码') |
|
|
|
if(!this.phoneCode) return this.$message.warning('请输入验证码') |
|
|
|
let data = { |
|
|
|
let data = { |
|
|
|
userId: this.userId, |
|
|
|
userId: this.form.userId, |
|
|
|
phone: this.phone, |
|
|
|
phone: this.phone, |
|
|
|
types: 2, |
|
|
|
types: 2, |
|
|
|
code: this.phoneCode, |
|
|
|
code: this.phoneCode, |
|
|
|
opener: this.phoneOpener |
|
|
|
opener: this.phoneOpener |
|
|
|
} |
|
|
|
} |
|
|
|
this.$put(this.api.bindPhone,data).then(res => { |
|
|
|
this.$post(this.api.bindPhoneOrEmail,data).then(res => { |
|
|
|
if(res.errmessage == 'success'){ |
|
|
|
if(res.status == 200){ |
|
|
|
this.$message.success('绑定成功') |
|
|
|
this.$message.success('绑定成功') |
|
|
|
this.form.phone = this.phone |
|
|
|
this.form.phone = this.phone |
|
|
|
this.phoneVisible = false |
|
|
|
this.phoneVisible = false |
|
|
|