|
|
@ -88,7 +88,7 @@ |
|
|
|
<div class="stepBoxBtn" v-if="!userForm.status"> |
|
|
|
<div class="stepBoxBtn" v-if="!userForm.status"> |
|
|
|
<div class="backBtn" @click="back">上一步</div> |
|
|
|
<div class="backBtn" @click="back">上一步</div> |
|
|
|
<div class="nextBtn" v-if="active == 6" @click="saveInfo">提交审核</div> |
|
|
|
<div class="nextBtn" v-if="active == 6" @click="saveInfo">提交审核</div> |
|
|
|
<div class="nextBtn" v-else @click="next">下一步</div> |
|
|
|
<div class="nextBtn" v-else @click="next">保存,下一步</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="contentBox" v-show="!userForm.status"> |
|
|
|
<div class="contentBox" v-show="!userForm.status"> |
|
|
@ -192,8 +192,6 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
</el-form> |
|
|
|
<div v-if="active == 1" class="delWork"> |
|
|
|
<div v-if="active == 1" class="delWork"> |
|
|
|
<div v-if="!it.caseId" class="saveWork" @click="saveWork(index)">保存</div> |
|
|
|
|
|
|
|
<div v-else class="saveWork" @click="updateWork(index)">修改</div> |
|
|
|
|
|
|
|
<img |
|
|
|
<img |
|
|
|
src="/assets/ability/delicon.png" |
|
|
|
src="/assets/ability/delicon.png" |
|
|
|
style="width: 14px; height: 16px; margin-right: 5px" |
|
|
|
style="width: 14px; height: 16px; margin-right: 5px" |
|
|
@ -268,8 +266,6 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
</el-form> |
|
|
|
<div v-if="active == 2" class="delWork"> |
|
|
|
<div v-if="active == 2" class="delWork"> |
|
|
|
<div v-if="!it.caseId" class="saveWork" @click="saveProject(index)">保存</div> |
|
|
|
|
|
|
|
<div v-else class="saveWork" @click="updateProject(index)">修改</div> |
|
|
|
|
|
|
|
<img |
|
|
|
<img |
|
|
|
src="/assets/ability/delicon.png" |
|
|
|
src="/assets/ability/delicon.png" |
|
|
|
style="width: 14px; height: 16px; margin-right: 5px" |
|
|
|
style="width: 14px; height: 16px; margin-right: 5px" |
|
|
@ -318,9 +314,6 @@ |
|
|
|
></el-input> |
|
|
|
></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
</el-form> |
|
|
|
<div v-if="active == 3" class="delWork"> |
|
|
|
|
|
|
|
<div class="saveWork" @click="saveUser">保存</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="active5" v-show="active == 4 || active == 6"> |
|
|
|
<div class="active5" v-show="active == 4 || active == 6"> |
|
|
@ -354,8 +347,6 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
</el-form> |
|
|
|
<div v-if="active == 4" class="delWork"> |
|
|
|
<div v-if="active == 4" class="delWork"> |
|
|
|
<div v-if="!it.fileId" class="saveWork" @click="saveCertificate(index)">保存</div> |
|
|
|
|
|
|
|
<div v-else class="saveWork" @click="updateCertificate(index)">修改</div> |
|
|
|
|
|
|
|
<img |
|
|
|
<img |
|
|
|
src="/assets/ability/delicon.png" |
|
|
|
src="/assets/ability/delicon.png" |
|
|
|
style="width: 14px; height: 16px; margin-right: 5px" |
|
|
|
style="width: 14px; height: 16px; margin-right: 5px" |
|
|
@ -425,8 +416,6 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
</el-form> |
|
|
|
<div v-if="active == 5" class="delWork"> |
|
|
|
<div v-if="active == 5" class="delWork"> |
|
|
|
<div v-if="!it.caseId" class="saveWork" @click="saveEducation(index)">保存</div> |
|
|
|
|
|
|
|
<div v-else class="saveWork" @click="updateEducation(index)">修改</div> |
|
|
|
|
|
|
|
<img |
|
|
|
<img |
|
|
|
src="/assets/ability/delicon.png" |
|
|
|
src="/assets/ability/delicon.png" |
|
|
|
style="width: 14px; height: 16px; margin-right: 5px" |
|
|
|
style="width: 14px; height: 16px; margin-right: 5px" |
|
|
@ -472,13 +461,14 @@ import { |
|
|
|
couldBookUpdate, |
|
|
|
couldBookUpdate, |
|
|
|
couldApply, |
|
|
|
couldApply, |
|
|
|
delBook, |
|
|
|
delBook, |
|
|
|
|
|
|
|
addLists, |
|
|
|
|
|
|
|
updateLists, |
|
|
|
} from '@/api/tester/TesterApply' |
|
|
|
} from '@/api/tester/TesterApply' |
|
|
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
export default { |
|
|
|
components: { imageUpload }, |
|
|
|
components: { imageUpload }, |
|
|
|
data() { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
return { |
|
|
|
flag: false, |
|
|
|
|
|
|
|
active: 0, |
|
|
|
active: 0, |
|
|
|
// 实名认证 |
|
|
|
// 实名认证 |
|
|
|
certifform: {}, |
|
|
|
certifform: {}, |
|
|
@ -514,7 +504,7 @@ export default { |
|
|
|
intro: [{ required: true, message: '请输入工作内容', trigger: 'blur' }], |
|
|
|
intro: [{ required: true, message: '请输入工作内容', trigger: 'blur' }], |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 项目经历 |
|
|
|
// 项目经历 |
|
|
|
projectList: [{}], |
|
|
|
projectList: [{ type: 0 }], |
|
|
|
projectRules: { |
|
|
|
projectRules: { |
|
|
|
name: [{ required: true, message: '请输入公司名称', trigger: 'blur' }], |
|
|
|
name: [{ required: true, message: '请输入公司名称', trigger: 'blur' }], |
|
|
|
startTime: [{ required: true, message: '请输入开始时间', trigger: 'blur' }], |
|
|
|
startTime: [{ required: true, message: '请输入开始时间', trigger: 'blur' }], |
|
|
@ -545,7 +535,7 @@ export default { |
|
|
|
url: [{ required: true, message: '请上传证书', trigger: 'blur' }], |
|
|
|
url: [{ required: true, message: '请上传证书', trigger: 'blur' }], |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 教育经历 |
|
|
|
// 教育经历 |
|
|
|
educationList: [{}], |
|
|
|
educationList: [{ type: 2 }], |
|
|
|
educationRules: { |
|
|
|
educationRules: { |
|
|
|
name: [{ required: true, message: '请输入学校名称', trigger: 'blur' }], |
|
|
|
name: [{ required: true, message: '请输入学校名称', trigger: 'blur' }], |
|
|
|
startTime: [{ required: true, message: '请输入开始时间', trigger: 'blur' }], |
|
|
|
startTime: [{ required: true, message: '请输入开始时间', trigger: 'blur' }], |
|
|
@ -553,6 +543,7 @@ export default { |
|
|
|
education: [{ required: true, message: '请输入学历', trigger: 'change' }], |
|
|
|
education: [{ required: true, message: '请输入学历', trigger: 'change' }], |
|
|
|
major: [{ required: true, message: '请输入专业名称', trigger: 'blur' }], |
|
|
|
major: [{ required: true, message: '请输入专业名称', trigger: 'blur' }], |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
base: process.env.VUE_APP_BASE_API, |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
watch: { |
|
|
|
watch: { |
|
|
@ -575,7 +566,7 @@ export default { |
|
|
|
// 去修改 |
|
|
|
// 去修改 |
|
|
|
goedit() { |
|
|
|
goedit() { |
|
|
|
this.userForm.status = null |
|
|
|
this.userForm.status = null |
|
|
|
this.active =1 |
|
|
|
this.active = 1 |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 提交审核 |
|
|
|
// 提交审核 |
|
|
|
saveInfo() { |
|
|
|
saveInfo() { |
|
|
@ -592,7 +583,7 @@ export default { |
|
|
|
// 经历 |
|
|
|
// 经历 |
|
|
|
this.projectList = res.experience.filter((it) => it.type == 0) |
|
|
|
this.projectList = res.experience.filter((it) => it.type == 0) |
|
|
|
if (!this.projectList.length) { |
|
|
|
if (!this.projectList.length) { |
|
|
|
this.projectList = [{}] |
|
|
|
this.projectList = [{ type: 0 }] |
|
|
|
} |
|
|
|
} |
|
|
|
this.workList = res.experience.filter((it) => it.type == 1) |
|
|
|
this.workList = res.experience.filter((it) => it.type == 1) |
|
|
|
if (!this.workList.length) { |
|
|
|
if (!this.workList.length) { |
|
|
@ -600,34 +591,41 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
this.educationList = res.experience.filter((it) => it.type == 2) |
|
|
|
this.educationList = res.experience.filter((it) => it.type == 2) |
|
|
|
if (!this.educationList.length) { |
|
|
|
if (!this.educationList.length) { |
|
|
|
this.educationList = [{}] |
|
|
|
this.educationList = [{ type: 2 }] |
|
|
|
} |
|
|
|
} |
|
|
|
// 个人简介 |
|
|
|
// 个人简介 |
|
|
|
if (res.personalInfo) { |
|
|
|
if (res.personalInfo) { |
|
|
|
this.userForm = res.personalInfo |
|
|
|
this.userForm = res.personalInfo |
|
|
|
if (!this.userForm.city || !this.userForm.testSkills || !this.userForm.personalAdvantage) { |
|
|
|
if (this.city) { |
|
|
|
this.userForm.flag = false |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
this.userForm.flag = true |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.province = this.userForm.city.split('-')[0] |
|
|
|
this.province = this.userForm.city.split('-')[0] |
|
|
|
this.city = this.userForm.city.split('-')[1] |
|
|
|
this.city = this.userForm.city.split('-')[1] |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
this.province = '北京市' |
|
|
|
|
|
|
|
this.city = '北京市' |
|
|
|
|
|
|
|
this.userForm.city = '北京市-北京市' |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 审核状态 1审核通过 2不通过 没有或者0待审核 |
|
|
|
// 审核状态 状态,0未审核,1审核中,2审核通过,3审核不通过 |
|
|
|
if (res.personalInfo.status === 0) { |
|
|
|
if (res.personalInfo.status === 0) { |
|
|
|
} else if (res.personalInfo.status === 1) { |
|
|
|
} else if (res.personalInfo.status === 1) { |
|
|
|
this.active = 6 |
|
|
|
this.active = 6 |
|
|
|
} else if (res.personalInfo.status === 2) { |
|
|
|
} else if (res.personalInfo.status === 2) { |
|
|
|
this.active = 6 |
|
|
|
this.active = 6 |
|
|
|
} else { |
|
|
|
} else if (res.personalInfo.status === 3) { |
|
|
|
this.active = 6 |
|
|
|
this.active = 6 |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (res.personalInfo.status == 2 && this.userinform.testerStatus != 2) { |
|
|
|
|
|
|
|
const data = JSON.parse(JSON.stringify(this.userinform)) |
|
|
|
|
|
|
|
data.testerStatus = 2 |
|
|
|
|
|
|
|
this.$store.commit('SET_USERINFORM', data) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 证书 |
|
|
|
// 证书 |
|
|
|
this.certificateList = res.credentials.map((it) => { |
|
|
|
this.certificateList = res.credentials.map((it) => { |
|
|
|
return { |
|
|
|
return { |
|
|
|
url: it.fileUrl, |
|
|
|
url: this.base + it.filePath, |
|
|
|
credentialsName: it.fileName, |
|
|
|
credentialsName: it.fileName, |
|
|
|
fileId: it.fileId, |
|
|
|
fileId: it.fileId, |
|
|
|
} |
|
|
|
} |
|
|
@ -694,59 +692,175 @@ export default { |
|
|
|
if (this.active == 0) { |
|
|
|
if (this.active == 0) { |
|
|
|
if (this.certifform.status != 1) { |
|
|
|
if (this.certifform.status != 1) { |
|
|
|
return this.$message.warning('请先通过实名认证') |
|
|
|
return this.$message.warning('请先通过实名认证') |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
this.active++ |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (this.active == 1 && this.workList.length) { |
|
|
|
|
|
|
|
const flagArr = [] |
|
|
|
|
|
|
|
this.workList.forEach((it, index) => { |
|
|
|
|
|
|
|
this.$refs[`workRef${index}`][0].validate((valid) => { |
|
|
|
|
|
|
|
if (valid) { |
|
|
|
|
|
|
|
flagArr.push(true) |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
flagArr.push(false) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
if (flagArr.some((it) => !it)) { |
|
|
|
|
|
|
|
this.$message.warning('请填写完整') |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
// 全填了 |
|
|
|
|
|
|
|
if (this.workList[0].caseId) { |
|
|
|
|
|
|
|
// 修改 |
|
|
|
|
|
|
|
updateLists(this.workList).then((res) => { |
|
|
|
|
|
|
|
this.getCloudAllList() |
|
|
|
|
|
|
|
this.active++ |
|
|
|
|
|
|
|
this.$message.success('保存成功') |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
addLists(this.workList).then((res) => { |
|
|
|
|
|
|
|
this.getCloudAllList() |
|
|
|
|
|
|
|
this.active++ |
|
|
|
|
|
|
|
this.$message.success('保存成功') |
|
|
|
|
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if (this.active == 2) { |
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (this.active == 1 && !this.workList.length) { |
|
|
|
|
|
|
|
this.active++ |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (this.active == 2 && this.projectList.length) { |
|
|
|
// 项目经历 |
|
|
|
// 项目经历 |
|
|
|
if (this.projectList.length && this.projectList[0].caseId) { |
|
|
|
const flagArr2 = [] |
|
|
|
|
|
|
|
this.projectList.forEach((it, index) => { |
|
|
|
|
|
|
|
this.$refs[`projectRef${index}`][0].validate((valid) => { |
|
|
|
|
|
|
|
if (valid) { |
|
|
|
|
|
|
|
flagArr2.push(true) |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
flagArr2.push(false) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
if (flagArr2.some((it) => !it)) { |
|
|
|
|
|
|
|
this.$message.warning('请填写完整') |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
return this.$message.warning('至少保存一条项目经历') |
|
|
|
// 全填了 |
|
|
|
|
|
|
|
if (this.projectList[0].caseId) { |
|
|
|
|
|
|
|
// 修改 |
|
|
|
|
|
|
|
updateLists(this.projectList).then((res) => { |
|
|
|
|
|
|
|
this.getCloudAllList() |
|
|
|
|
|
|
|
this.active++ |
|
|
|
|
|
|
|
this.$message.success('保存成功') |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
addLists(this.projectList).then((res) => { |
|
|
|
|
|
|
|
this.getCloudAllList() |
|
|
|
|
|
|
|
this.active++ |
|
|
|
|
|
|
|
this.$message.success('保存成功') |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
if (this.active == 3) { |
|
|
|
if (this.active == 3) { |
|
|
|
// 个人简介 |
|
|
|
// 个人简介 |
|
|
|
if (!this.userForm.flag) { |
|
|
|
this.$refs[`userRef`].validate((valid) => { |
|
|
|
return this.$message.warning('请先保存个人简介') |
|
|
|
if (valid) { |
|
|
|
|
|
|
|
if (this.userForm.city.indexOf('--- 市 ---') != -1) { |
|
|
|
|
|
|
|
return this.$message.warning('请选择市') |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
couldUserInfoAdd(this.userForm).then((res) => { |
|
|
|
|
|
|
|
this.$message.success('保存个人简介成功') |
|
|
|
|
|
|
|
this.getCloudAllList() |
|
|
|
|
|
|
|
this.active++ |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
if (this.active == 5) { |
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (this.active == 5 && this.educationList.length) { |
|
|
|
// 教育经历 |
|
|
|
// 教育经历 |
|
|
|
if (this.educationList.length && this.educationList[0].caseId) { |
|
|
|
const flagArr3 = [] |
|
|
|
|
|
|
|
this.educationList.forEach((it, index) => { |
|
|
|
|
|
|
|
this.$refs[`educationRef${index}`][0].validate((valid) => { |
|
|
|
|
|
|
|
if (valid) { |
|
|
|
|
|
|
|
flagArr3.push(true) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
return this.$message.warning('至少保存一条教育经历') |
|
|
|
flagArr3.push(false) |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
if (flagArr3.some((it) => !it)) { |
|
|
|
|
|
|
|
this.$message.warning('请填写完整') |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
// 全填了 |
|
|
|
|
|
|
|
if (this.educationList[0].caseId) { |
|
|
|
|
|
|
|
// 修改 |
|
|
|
|
|
|
|
updateLists(this.educationList).then((res) => { |
|
|
|
|
|
|
|
this.getCloudAllList() |
|
|
|
this.active++ |
|
|
|
this.active++ |
|
|
|
}, |
|
|
|
this.$message.success('保存成功') |
|
|
|
// 工作经历添加 |
|
|
|
}) |
|
|
|
addWork() { |
|
|
|
} else { |
|
|
|
if (this.workList.length >= 10) return this.$message.warning('工作经历最多添加10条') |
|
|
|
addLists(this.educationList).then((res) => { |
|
|
|
this.workList.push({}) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// 工作经历保存 |
|
|
|
|
|
|
|
saveWork(i) { |
|
|
|
|
|
|
|
this.$refs[`workRef${i}`][0].validate((valid) => { |
|
|
|
|
|
|
|
if (valid) { |
|
|
|
|
|
|
|
const data = this.workList[i] |
|
|
|
|
|
|
|
data.type = 1 |
|
|
|
|
|
|
|
couldInfoAdd(data).then((res) => { |
|
|
|
|
|
|
|
this.$message.success('工作经历保存成功') |
|
|
|
|
|
|
|
this.getCloudAllList() |
|
|
|
this.getCloudAllList() |
|
|
|
|
|
|
|
this.active++ |
|
|
|
|
|
|
|
this.$message.success('保存成功') |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
return |
|
|
|
// 工作经历修改 |
|
|
|
} |
|
|
|
updateWork(i) { |
|
|
|
if (this.active == 4 && this.certificateList.length) { |
|
|
|
this.$refs[`workRef${i}`][0].validate((valid) => { |
|
|
|
const flagArr4 = [] |
|
|
|
|
|
|
|
this.certificateList.forEach((it, index) => { |
|
|
|
|
|
|
|
this.$refs[`certificateRef${index}`][0].validate((valid) => { |
|
|
|
if (valid) { |
|
|
|
if (valid) { |
|
|
|
const data = this.workList[i] |
|
|
|
flagArr4.push(true) |
|
|
|
couldInfoUpdate(data).then((res) => { |
|
|
|
} else { |
|
|
|
this.$message.success('工作经历修改成功') |
|
|
|
flagArr4.push(false) |
|
|
|
this.getCloudAllList() |
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
if (flagArr4.some((it) => !it)) { |
|
|
|
|
|
|
|
this.$message.warning('请填写完整') |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
// 全填了 |
|
|
|
|
|
|
|
this.certificateList.forEach((it) => { |
|
|
|
|
|
|
|
if (it.url) { |
|
|
|
|
|
|
|
it.url = it.url.replace(/.*\/profile/, '/profile') |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
if (this.certificateList[0].fileId) { |
|
|
|
|
|
|
|
// 修改 |
|
|
|
|
|
|
|
couldBookUpdate({ credentialsList: this.certificateList }).then((res) => { |
|
|
|
|
|
|
|
this.getCloudAllList() |
|
|
|
|
|
|
|
this.active++ |
|
|
|
|
|
|
|
this.$message.success('保存成功') |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
couldBookAdd({ credentialsList: this.certificateList }).then((res) => { |
|
|
|
|
|
|
|
this.getCloudAllList() |
|
|
|
|
|
|
|
this.active++ |
|
|
|
|
|
|
|
this.$message.success('保存成功') |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (this.active == 4 && !this.certificateList.length) { |
|
|
|
|
|
|
|
this.active++ |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// 工作经历添加 |
|
|
|
|
|
|
|
addWork() { |
|
|
|
|
|
|
|
if (this.workList.length >= 10) return this.$message.warning('工作经历最多添加10条') |
|
|
|
|
|
|
|
this.workList.push({ type: 1 }) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 工作经历删除 |
|
|
|
// 工作经历删除 |
|
|
|
delWork(i) { |
|
|
|
delWork(i) { |
|
|
@ -755,52 +869,17 @@ export default { |
|
|
|
cancelButtonText: '取消', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning', |
|
|
|
type: 'warning', |
|
|
|
}).then(() => { |
|
|
|
}).then(() => { |
|
|
|
if (this.workList[i].caseId) { |
|
|
|
|
|
|
|
couldInfoDelete(this.workList[i].caseId).then(() => { |
|
|
|
|
|
|
|
this.$message({ |
|
|
|
|
|
|
|
type: 'success', |
|
|
|
|
|
|
|
message: '删除成功!', |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
this.getCloudAllList() |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
this.workList.splice(i, 1) |
|
|
|
this.workList.splice(i, 1) |
|
|
|
this.$message({ |
|
|
|
this.$message({ |
|
|
|
type: 'success', |
|
|
|
type: 'success', |
|
|
|
message: '删除成功!', |
|
|
|
message: '删除成功!', |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 项目经历添加 |
|
|
|
// 项目经历添加 |
|
|
|
addProject() { |
|
|
|
addProject() { |
|
|
|
if (this.projectList.length >= 20) return this.$message.warning('项目经历最多添加20条') |
|
|
|
if (this.projectList.length >= 20) return this.$message.warning('项目经历最多添加20条') |
|
|
|
this.projectList.push({}) |
|
|
|
this.projectList.push({ type: 0 }) |
|
|
|
}, |
|
|
|
|
|
|
|
// 项目经历保存 |
|
|
|
|
|
|
|
saveProject(i) { |
|
|
|
|
|
|
|
this.$refs[`projectRef${i}`][0].validate((valid) => { |
|
|
|
|
|
|
|
if (valid) { |
|
|
|
|
|
|
|
const data = this.projectList[i] |
|
|
|
|
|
|
|
data.type = 0 |
|
|
|
|
|
|
|
couldInfoAdd(data).then((res) => { |
|
|
|
|
|
|
|
this.$message.success('项目经历保存成功') |
|
|
|
|
|
|
|
this.getCloudAllList() |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// 项目经历修改 |
|
|
|
|
|
|
|
updateProject(i) { |
|
|
|
|
|
|
|
this.$refs[`projectRef${i}`][0].validate((valid) => { |
|
|
|
|
|
|
|
if (valid) { |
|
|
|
|
|
|
|
const data = this.projectList[i] |
|
|
|
|
|
|
|
couldInfoUpdate(data).then((res) => { |
|
|
|
|
|
|
|
this.$message.success('项目经历修改成功') |
|
|
|
|
|
|
|
this.getCloudAllList() |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
// 项目经历删除 |
|
|
|
// 项目经历删除 |
|
|
|
delProject(i) { |
|
|
|
delProject(i) { |
|
|
@ -809,74 +888,19 @@ export default { |
|
|
|
cancelButtonText: '取消', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning', |
|
|
|
type: 'warning', |
|
|
|
}).then(() => { |
|
|
|
}).then(() => { |
|
|
|
if (this.projectList[i].caseId) { |
|
|
|
|
|
|
|
couldInfoDelete(this.projectList[i].caseId).then(() => { |
|
|
|
|
|
|
|
this.$message({ |
|
|
|
|
|
|
|
type: 'success', |
|
|
|
|
|
|
|
message: '删除成功!', |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
this.getCloudAllList() |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
if (this.projectList.length == 1) return this.$message.warning('最少有一项') |
|
|
|
if (this.projectList.length == 1) return this.$message.warning('最少有一项') |
|
|
|
this.projectList.splice(i, 1) |
|
|
|
this.projectList.splice(i, 1) |
|
|
|
this.$message({ |
|
|
|
this.$message({ |
|
|
|
type: 'success', |
|
|
|
type: 'success', |
|
|
|
message: '删除成功!', |
|
|
|
message: '删除成功!', |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// 个人简介保存 |
|
|
|
|
|
|
|
saveUser() { |
|
|
|
|
|
|
|
this.$refs[`userRef`].validate((valid) => { |
|
|
|
|
|
|
|
if (valid) { |
|
|
|
|
|
|
|
if (this.userForm.city.indexOf('--- 市 ---') != -1) { |
|
|
|
|
|
|
|
return this.$message.warning('请选择市') |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
couldUserInfoAdd(this.userForm).then((res) => { |
|
|
|
|
|
|
|
this.$message.success('保存个人简介成功') |
|
|
|
|
|
|
|
this.userForm.flag = true |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 资格证书添加 |
|
|
|
// 资格证书添加 |
|
|
|
addCertificate() { |
|
|
|
addCertificate() { |
|
|
|
this.certificateList.push({}) |
|
|
|
this.certificateList.push({}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 保存证书 |
|
|
|
|
|
|
|
saveCertificate(i) { |
|
|
|
|
|
|
|
this.$refs[`certificateRef${i}`][0].validate((valid) => { |
|
|
|
|
|
|
|
if (valid) { |
|
|
|
|
|
|
|
const data = { |
|
|
|
|
|
|
|
credentialsList: [JSON.parse(JSON.stringify(this.certificateList[i]))], |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
data.credentialsList[0].url = data.credentialsList[0].url.replace(/.*\/profile/, '/profile') |
|
|
|
|
|
|
|
couldBookAdd(data).then((res) => { |
|
|
|
|
|
|
|
this.$message.success('资格证书保存成功') |
|
|
|
|
|
|
|
this.getCloudAllList() |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// 更新证书 |
|
|
|
|
|
|
|
updateCertificate(i) { |
|
|
|
|
|
|
|
this.$refs[`certificateRef${i}`][0].validate((valid) => { |
|
|
|
|
|
|
|
if (valid) { |
|
|
|
|
|
|
|
const data = { |
|
|
|
|
|
|
|
credentialsList: JSON.parse(JSON.stringify(this.certificateList)), |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
data.credentialsList.forEach((it) => { |
|
|
|
|
|
|
|
it.url = it.url.replace(/.*\/profile/, '/profile') |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
couldBookUpdate(data).then((res) => { |
|
|
|
|
|
|
|
this.$message.success('资格证书修改成功') |
|
|
|
|
|
|
|
this.getCloudAllList() |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// 资格证书删除 |
|
|
|
// 资格证书删除 |
|
|
|
delCertificate(i) { |
|
|
|
delCertificate(i) { |
|
|
|
this.$confirm('此操作将永久删除, 是否继续?', '提示', { |
|
|
|
this.$confirm('此操作将永久删除, 是否继续?', '提示', { |
|
|
@ -884,49 +908,17 @@ export default { |
|
|
|
cancelButtonText: '取消', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning', |
|
|
|
type: 'warning', |
|
|
|
}).then(() => { |
|
|
|
}).then(() => { |
|
|
|
if (this.certificateList[i].fileId) { |
|
|
|
|
|
|
|
delBook(this.certificateList[i].fileId).then((res) => { |
|
|
|
|
|
|
|
this.$message.success('资格证书删除成功') |
|
|
|
|
|
|
|
this.getCloudAllList() |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
this.certificateList.splice(i, 1) |
|
|
|
this.certificateList.splice(i, 1) |
|
|
|
this.$message({ |
|
|
|
this.$message({ |
|
|
|
type: 'success', |
|
|
|
type: 'success', |
|
|
|
message: '删除成功!', |
|
|
|
message: '删除成功!', |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 教育经历添加 |
|
|
|
// 教育经历添加 |
|
|
|
addEducation() { |
|
|
|
addEducation() { |
|
|
|
this.educationList.push({}) |
|
|
|
this.educationList.push({}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 教育经历保存 |
|
|
|
|
|
|
|
saveEducation(i) { |
|
|
|
|
|
|
|
this.$refs[`educationRef${i}`][0].validate((valid) => { |
|
|
|
|
|
|
|
if (valid) { |
|
|
|
|
|
|
|
const data = this.educationList[i] |
|
|
|
|
|
|
|
data.type = 2 |
|
|
|
|
|
|
|
couldInfoAdd(data).then((res) => { |
|
|
|
|
|
|
|
this.$message.success('教育经历保存成功') |
|
|
|
|
|
|
|
this.getCloudAllList() |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// 教育经历修改 |
|
|
|
|
|
|
|
updateEducation(i) { |
|
|
|
|
|
|
|
this.$refs[`educationRef${i}`][0].validate((valid) => { |
|
|
|
|
|
|
|
if (valid) { |
|
|
|
|
|
|
|
const data = this.educationList[i] |
|
|
|
|
|
|
|
couldInfoUpdate(data).then((res) => { |
|
|
|
|
|
|
|
this.$message.success('教育经历修改成功') |
|
|
|
|
|
|
|
this.getCloudAllList() |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// 教育经历删除 |
|
|
|
// 教育经历删除 |
|
|
|
delEducation(i) { |
|
|
|
delEducation(i) { |
|
|
|
this.$confirm('此操作将永久删除, 是否继续?', '提示', { |
|
|
|
this.$confirm('此操作将永久删除, 是否继续?', '提示', { |
|
|
@ -934,22 +926,12 @@ export default { |
|
|
|
cancelButtonText: '取消', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning', |
|
|
|
type: 'warning', |
|
|
|
}).then(() => { |
|
|
|
}).then(() => { |
|
|
|
if (this.educationList[i].caseId) { |
|
|
|
|
|
|
|
couldInfoDelete(this.educationList[i].caseId).then(() => { |
|
|
|
|
|
|
|
this.$message({ |
|
|
|
|
|
|
|
type: 'success', |
|
|
|
|
|
|
|
message: '删除成功!', |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
this.getCloudAllList() |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
if (this.educationList.length == 1) return this.$message.warning('最少有一项') |
|
|
|
if (this.educationList.length == 1) return this.$message.warning('最少有一项') |
|
|
|
this.educationList.splice(i, 1) |
|
|
|
this.educationList.splice(i, 1) |
|
|
|
this.$message({ |
|
|
|
this.$message({ |
|
|
|
type: 'success', |
|
|
|
type: 'success', |
|
|
|
message: '删除成功!', |
|
|
|
message: '删除成功!', |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 省 |
|
|
|
// 省 |
|
|
@ -977,8 +959,8 @@ export default { |
|
|
|
|
|
|
|
|
|
|
|
<style scoped> |
|
|
|
<style scoped> |
|
|
|
.editbtn { |
|
|
|
.editbtn { |
|
|
|
margin:auto; |
|
|
|
margin: auto; |
|
|
|
color: #0066EB; |
|
|
|
color: #0066eb; |
|
|
|
text-align: center; |
|
|
|
text-align: center; |
|
|
|
cursor: pointer; |
|
|
|
cursor: pointer; |
|
|
|
} |
|
|
|
} |
|
|
|