From ee75909171b780d924bac7eaf5b90c22f8491ee2 Mon Sep 17 00:00:00 2001 From: lijingyu007 <904564792@qq.com> Date: Thu, 30 May 2024 09:52:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E7=BB=8F=E5=8E=86=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E7=BB=8F=E5=8E=86=E4=B8=AA=E6=95=B0=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../homepage/personability/abilityApply.vue | 2 + src/page/personalpage/home/resume.vue | 54 ++++++++++++++++--- 2 files changed, 48 insertions(+), 8 deletions(-) diff --git a/src/page/homepage/personability/abilityApply.vue b/src/page/homepage/personability/abilityApply.vue index 5e0423c..a8d906e 100644 --- a/src/page/homepage/personability/abilityApply.vue +++ b/src/page/homepage/personability/abilityApply.vue @@ -667,6 +667,7 @@ export default { }, // 工作经历添加 addWork() { + if (this.workList.length >= 10) return this.$message.warning('工作经历最多添加10条') this.workList.push({}) }, // 工作经历保存 @@ -720,6 +721,7 @@ export default { }, // 项目经历添加 addProject() { + if (this.projectList.length >= 20) return this.$message.warning('项目经历最多添加20条') this.projectList.push({}) }, // 项目经历保存 diff --git a/src/page/personalpage/home/resume.vue b/src/page/personalpage/home/resume.vue index 156ccfd..f05bd4b 100644 --- a/src/page/personalpage/home/resume.vue +++ b/src/page/personalpage/home/resume.vue @@ -293,6 +293,8 @@ import { couldUserInfoAdd, couldBookAdd, couldBookUpdate, + couldApply, + delBook } from '@/api/tester/TesterApply' export default { @@ -325,7 +327,7 @@ export default { ], }, // 工作经历 - workList: [{}], + workList: [], workRules: { name: [{ required: true, message: '请输入公司名称', trigger: 'blur' }], startTime: [{ required: true, message: '请输入开始时间', trigger: 'blur' }], @@ -350,7 +352,6 @@ export default { userRules: { testSkills: [{ required: true, message: '请输入技能方向', trigger: 'blur' }], personalAdvantage: [{ required: true, message: '请输入个人优势', trigger: 'blur' }], - city: [{ required: true, message: '请选择城市', trigger: 'change' }], }, province: '北京市', city: '北京市', @@ -362,7 +363,7 @@ export default { materialServerAddr: '', certificateList: [{}], certificateRules: { - credentialsName: [{ required: true, message: '请输入证书名称', trigger: 'blur' }], + // credentialsName: [{ required: true, message: '请输入证书名称', trigger: 'blur' }], url: [{ required: true, message: '请上传证书', trigger: 'blur' }], }, // 教育经历 @@ -393,10 +394,18 @@ export default { this.getCloudAllList() }, methods: { + // 提交审核 + saveInfo() { + if (this.userForm.status == 1) return this.$message.warning('正在审核,请勿重复提交') + if (this.userForm.status == 2) return this.$message.warning('审核已通过,请勿重复提交') + couldApply().then((res) => { + this.$message.success('提交审核成功') + this.getCloudAllList() + }) + }, // 获取简历信息 getCloudAllList() { getCloudAll().then((res) => { - console.log(res) // 经历 this.projectList = res.experience.filter((it) => it.type == 0) if (!this.projectList.length) { @@ -404,7 +413,7 @@ export default { } this.workList = res.experience.filter((it) => it.type == 1) if (!this.workList.length) { - this.workList = [{}] + this.workList = [] } this.educationList = res.experience.filter((it) => it.type == 2) if (!this.educationList.length) { @@ -415,6 +424,15 @@ export default { this.province = this.userForm.city.split('-')[0] this.city = this.userForm.city.split('-')[1] + // 审核状态 1审核通过 2不通过 没有或者0待审核 + if (res.personalInfo.status === 0) { + } else if (res.personalInfo.status === 1) { + this.active = 6 + } else if (res.personalInfo.status === 2) { + this.active = 6 + } else { + } + // 证书 this.certificateList = res.credentials.map((it) => { return { @@ -472,6 +490,7 @@ export default { }, // 返回上一步 back() { + if (this.userForm.status == 1 || this.userForm.status == 2) return if (this.active == 0) return this.active-- }, @@ -486,6 +505,7 @@ export default { }, // 工作经历添加 addWork() { + if (this.workList.length >= 10) return this.$message.warning('工作经历最多添加10条') this.workList.push({}) }, // 工作经历保存 @@ -529,7 +549,6 @@ export default { this.getCloudAllList() }) } else { - if (this.workList.length == 1) return this.$message.warning('最少有一项') this.workList.splice(i, 1) this.$message({ type: 'success', @@ -540,6 +559,7 @@ export default { }, // 项目经历添加 addProject() { + if (this.projectList.length >= 20) return this.$message.warning('项目经历最多添加20条') this.projectList.push({}) }, // 项目经历保存 @@ -643,8 +663,26 @@ export default { }, // 资格证书删除 delCertificate(i) { - if (this.certificateList.length == 1) return this.$message.warning('最少有一项') - this.certificateList.splice(i, 1) + this.$confirm('此操作将永久删除, 是否继续?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning', + }).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.$message({ + type: 'success', + message: '删除成功!', + }) + } + }) + + }, // 教育经历添加 addEducation() {