|
|
|
@ -78,7 +78,7 @@ |
|
|
|
|
</div> |
|
|
|
|
<div class="line info"> |
|
|
|
|
<li style="width: 334px;margin-right: 90px"> |
|
|
|
|
<label>学号:</label> |
|
|
|
|
<label>工号:</label> |
|
|
|
|
<el-input class="m-r-10" size="small" v-model="form.workNumber" clearable></el-input> |
|
|
|
|
</li> |
|
|
|
|
</div> |
|
|
|
@ -269,8 +269,8 @@ |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
import Setting from "@/setting"; |
|
|
|
|
import util from "@/libs/util"; |
|
|
|
|
import Util from '@/libs/util' |
|
|
|
|
import Setting from '@/setting' |
|
|
|
|
import { mapState, mapActions } from "vuex"; |
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
@ -280,7 +280,7 @@ export default { |
|
|
|
|
editUsername: '', |
|
|
|
|
accountVisible: false, |
|
|
|
|
updateTime: 0, |
|
|
|
|
token: util.local.get(Setting.tokenKey), |
|
|
|
|
token: Util.local.get(Setting.tokenKey), |
|
|
|
|
form: { |
|
|
|
|
userName: "", |
|
|
|
|
name: "", |
|
|
|
@ -438,7 +438,7 @@ export default { |
|
|
|
|
this.form.account = this.editUsername |
|
|
|
|
this.accountVisible = false |
|
|
|
|
} else { |
|
|
|
|
util.errorMsg('请输入账号') |
|
|
|
|
Util.errorMsg('请输入账号') |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
openAccount () { |
|
|
|
@ -505,7 +505,7 @@ export default { |
|
|
|
|
schoolId: this.form.schoolId |
|
|
|
|
}); |
|
|
|
|
if (res.message.user.length) { |
|
|
|
|
util.warningMsg("该账号已存在"); |
|
|
|
|
Util.warningMsg("该账号已存在"); |
|
|
|
|
this.accountReapeat = true; |
|
|
|
|
} else { |
|
|
|
|
this.accountReapeat = false; |
|
|
|
@ -522,6 +522,7 @@ export default { |
|
|
|
|
userInfo.account = userAccount.account |
|
|
|
|
userInfo.phone = userAccount.phone |
|
|
|
|
userInfo.workNumber = userAccount.workNumber |
|
|
|
|
userInfo.id = userAccount.id |
|
|
|
|
this.form = userInfo |
|
|
|
|
this.originAccount = this.form.account; |
|
|
|
|
this.archivesList = result.personalFileList; |
|
|
|
@ -611,7 +612,7 @@ export default { |
|
|
|
|
this.archivesList.forEach((n, k) => { |
|
|
|
|
if (!n.personalCareerId) isEmpty = true; |
|
|
|
|
}); |
|
|
|
|
if (isEmpty) return util.warningMsg("请选择职业"); |
|
|
|
|
if (isEmpty) return Util.warningMsg("请选择职业"); |
|
|
|
|
this.showArch = true; |
|
|
|
|
this.concatArch(); |
|
|
|
|
}, |
|
|
|
@ -639,18 +640,18 @@ export default { |
|
|
|
|
this.passwordVisible = true; |
|
|
|
|
}, |
|
|
|
|
editPassword () { |
|
|
|
|
if (!this.passwordForm.password) return util.warningMsg("请输入原密码"); |
|
|
|
|
if (!this.passwordForm.newPassword) return util.warningMsg("请输入新密码"); |
|
|
|
|
if (!this.passwordForm.reNewPassword) return util.warningMsg("请确认新密码"); |
|
|
|
|
if (this.passwordForm.newPassword.length < 6 || this.passwordForm.reNewPassword.length < 6) return util.warningMsg("请输入6位数以上的密码"); |
|
|
|
|
if (this.passwordForm.newPassword !== this.passwordForm.reNewPassword) return util.warningMsg("输入的新密码不一致,请重新确认"); |
|
|
|
|
if (this.passwordForm.password === this.passwordForm.newPassword) return util.warningMsg("原密码跟新密码不能一致"); |
|
|
|
|
if (!this.passwordForm.password) return Util.warningMsg("请输入原密码"); |
|
|
|
|
if (!this.passwordForm.newPassword) return Util.warningMsg("请输入新密码"); |
|
|
|
|
if (!this.passwordForm.reNewPassword) return Util.warningMsg("请确认新密码"); |
|
|
|
|
if (this.passwordForm.newPassword.length < 6 || this.passwordForm.reNewPassword.length < 6) return Util.warningMsg("请输入6位数以上的密码"); |
|
|
|
|
if (this.passwordForm.newPassword !== this.passwordForm.reNewPassword) return Util.warningMsg("输入的新密码不一致,请重新确认"); |
|
|
|
|
if (this.passwordForm.password === this.passwordForm.newPassword) return Util.warningMsg("原密码跟新密码不能一致"); |
|
|
|
|
|
|
|
|
|
let data = this.passwordForm; |
|
|
|
|
data.userid = this.userId; |
|
|
|
|
this.$post(this.api.examinePassword, data) |
|
|
|
|
.then(res => { |
|
|
|
|
util.successMsg("更换成功"); |
|
|
|
|
Util.successMsg("更换成功"); |
|
|
|
|
this.passwordVisible = false; |
|
|
|
|
}) |
|
|
|
|
.catch(err => { |
|
|
|
@ -822,15 +823,9 @@ export default { |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
save (close) { |
|
|
|
|
let isEmpty = false; |
|
|
|
|
// this.archivesList.forEach((n, k) => { |
|
|
|
|
// if (!n.personalCareerId) isEmpty = true; |
|
|
|
|
// n.userId = this.userId; |
|
|
|
|
// }); |
|
|
|
|
// if (isEmpty) return util.warningMsg("请选择职业"); |
|
|
|
|
// if (this.accountReapeat) return util.warningMsg("该账号已存在"); |
|
|
|
|
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 util.warningMsg("请输入正确的身份证号码"); |
|
|
|
|
let form = this.form; |
|
|
|
|
const { form } = this |
|
|
|
|
if (!form.userName) return Util.warningMsg('请输入姓名') |
|
|
|
|
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 Util.warningMsg("请输入正确的身份证号码"); |
|
|
|
|
let personalFileList = []; |
|
|
|
|
this.archivesList.forEach((n, k) => { |
|
|
|
|
n.personalCareerId && personalFileList.push({ |
|
|
|
@ -851,11 +846,6 @@ export default { |
|
|
|
|
}); |
|
|
|
|
let data = { |
|
|
|
|
userId: form.userId, |
|
|
|
|
userAccountList: [{ |
|
|
|
|
id: form.accountId, |
|
|
|
|
account: form.account, |
|
|
|
|
userId: form.userId |
|
|
|
|
}], |
|
|
|
|
hrUserInfo: { |
|
|
|
|
provinceId: form.provinceId, |
|
|
|
|
cityId: form.cityId, |
|
|
|
@ -869,6 +859,10 @@ export default { |
|
|
|
|
userName: form.userName, |
|
|
|
|
wechatId: form.wechatId |
|
|
|
|
}, |
|
|
|
|
userAccount: { |
|
|
|
|
workNumber: form.workNumber, |
|
|
|
|
id: form.id |
|
|
|
|
}, |
|
|
|
|
personalFileList |
|
|
|
|
}; |
|
|
|
|
this.$post(this.api.updatePersonCenter, data).then(res => { |
|
|
|
@ -920,8 +914,8 @@ export default { |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
sendEmailCode () { |
|
|
|
|
if (!this.email) return util.warningMsg("请输入邮箱"); |
|
|
|
|
if (!/^([a-zA-Z]|[0-9])(\w|\-)+@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/.test(this.email)) return util.warningMsg("请输入正确的邮箱"); |
|
|
|
|
if (!this.email) return Util.warningMsg("请输入邮箱"); |
|
|
|
|
if (!/^([a-zA-Z]|[0-9])(\w|\-)+@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/.test(this.email)) return Util.warningMsg("请输入正确的邮箱"); |
|
|
|
|
let data = { |
|
|
|
|
userId: this.userId, |
|
|
|
|
email: this.email, |
|
|
|
@ -932,15 +926,15 @@ export default { |
|
|
|
|
this.emailCountdown(); |
|
|
|
|
this.emailOpener = res.message.opener; |
|
|
|
|
} else { |
|
|
|
|
util.errorMsg(res.message); |
|
|
|
|
Util.errorMsg(res.message); |
|
|
|
|
} |
|
|
|
|
}).catch(res => { |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
emailSubmit () { |
|
|
|
|
if (!this.email) return util.warningMsg("请输入邮箱"); |
|
|
|
|
if (!/^([a-zA-Z]|[0-9])(\w|\-)+@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/.test(this.email)) return util.warningMsg("请输入正确的邮箱"); |
|
|
|
|
if (!this.emailCode) return util.warningMsg("请输入验证码"); |
|
|
|
|
if (!this.email) return Util.warningMsg("请输入邮箱"); |
|
|
|
|
if (!/^([a-zA-Z]|[0-9])(\w|\-)+@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/.test(this.email)) return Util.warningMsg("请输入正确的邮箱"); |
|
|
|
|
if (!this.emailCode) return Util.warningMsg("请输入验证码"); |
|
|
|
|
let data = { |
|
|
|
|
userId: this.userId, |
|
|
|
|
email: this.email, |
|
|
|
@ -949,7 +943,7 @@ export default { |
|
|
|
|
opener: this.emailOpener |
|
|
|
|
}; |
|
|
|
|
this.$put(this.api.bindPhoneOrEmail, data).then(res => { |
|
|
|
|
util.successMsg("绑定成功"); |
|
|
|
|
Util.successMsg("绑定成功"); |
|
|
|
|
this.form.email = this.email; |
|
|
|
|
this.emailVisible = false; |
|
|
|
|
}).catch(res => { |
|
|
|
@ -961,8 +955,8 @@ export default { |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
sendPhoneCode () { |
|
|
|
|
if (!this.phone) return util.warningMsg("请输入手机号"); |
|
|
|
|
if (!/^1[3456789]\d{9}$/.test(this.phone)) return util.warningMsg("请输入正确的手机号"); |
|
|
|
|
if (!this.phone) return Util.warningMsg("请输入手机号"); |
|
|
|
|
if (!/^1[3456789]\d{9}$/.test(this.phone)) return Util.warningMsg("请输入正确的手机号"); |
|
|
|
|
let data = { |
|
|
|
|
userId: this.userId, |
|
|
|
|
phone: this.phone, |
|
|
|
@ -973,15 +967,15 @@ export default { |
|
|
|
|
this.phoneCountdown(); |
|
|
|
|
this.phoneOpener = res.message.opener; |
|
|
|
|
} else { |
|
|
|
|
util.errorMsg(res.message); |
|
|
|
|
Util.errorMsg(res.message); |
|
|
|
|
} |
|
|
|
|
}).catch(res => { |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
phoneSubmit () { |
|
|
|
|
if (!this.phone) return util.warningMsg("请输入手机号"); |
|
|
|
|
if (!/^1[3456789]\d{9}$/.test(this.phone)) return util.warningMsg("请输入正确的手机号"); |
|
|
|
|
if (!this.phoneCode) return util.warningMsg("请输入验证码"); |
|
|
|
|
if (!this.phone) return Util.warningMsg("请输入手机号"); |
|
|
|
|
if (!/^1[3456789]\d{9}$/.test(this.phone)) return Util.warningMsg("请输入正确的手机号"); |
|
|
|
|
if (!this.phoneCode) return Util.warningMsg("请输入验证码"); |
|
|
|
|
let data = { |
|
|
|
|
userId: this.userId, |
|
|
|
|
phone: this.phone, |
|
|
|
@ -990,7 +984,7 @@ export default { |
|
|
|
|
opener: this.phoneOpener |
|
|
|
|
}; |
|
|
|
|
this.$post(this.api.bindPhoneOrEmail, data).then(res => { |
|
|
|
|
util.successMsg("绑定成功"); |
|
|
|
|
Util.successMsg("绑定成功"); |
|
|
|
|
this.form.phone = this.phone; |
|
|
|
|
this.phoneVisible = false; |
|
|
|
|
}).catch(res => { |
|
|
|
|