From ae6e8fc98724d0adc4d383290bd6673517ed6973 Mon Sep 17 00:00:00 2001 From: lijingyu007 <904564792@qq.com> Date: Tue, 28 May 2024 17:40:34 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A4=E8=AF=81=E6=B5=81=E7=A8=8B=E4=BF=9D?= =?UTF-8?q?=E5=AD=98=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 2 +- public/assets/ability/metop.png | Bin 0 -> 1302 bytes src/api/tester/TesterApply.js | 53 +- src/page/common/imageUpload.vue | 5 +- .../homepage/personability/abilityApply.vue | 482 +++++++++--- src/page/personalpage/home/resume.vue | 742 +++++++++++++++--- 6 files changed, 1073 insertions(+), 211 deletions(-) create mode 100644 public/assets/ability/metop.png diff --git a/.env.development b/.env.development index b7267e7..7e290f0 100644 --- a/.env.development +++ b/.env.development @@ -2,7 +2,7 @@ ENV = 'development' # KeySaas测试云平台/开发环境 -VUE_APP_BASE_API = '/test-api' +VUE_APP_BASE_API = '/prod-api' VUE_APP_BASE_TARGET = 'http://192.168.0.229:9999' diff --git a/public/assets/ability/metop.png b/public/assets/ability/metop.png new file mode 100644 index 0000000000000000000000000000000000000000..1542308e07626fea87c0d7d7c63821d740ae1f3d GIT binary patch literal 1302 zcmeAS@N?(olHy`uVBq!ia0vp^58U}fi7AzZCsS=07?_naLn2Bde0{8v^K`Uz|d0Pz(U{9Sl7VN%D~LZ)La1ylz_GsrKDK}xwt{?0`hE?GD=Dctn~HE z%ggo3jrH=2()A53ErDhj=^Gj80#)c1SLT%@R_NvxE5l51Ni9w;$}A|!%+FH*nV6WA zUs__T1av9H3%LbwWAlok!2}F2{ffi_eM3D1ke6TzeSPsO&CP|YE-nd5MYtEM!Nnn! z1*!T$sm1xFMajU3OH&3}Rbb^@l$uzQUlfv`p92fUfQ-fJW$LW~NvdBEge1Web@W}h!*U|{U@ zba4!+xOL^)S#6g?rBi1CnUccv;=_0wGno=>nmFw*4StJ --> - + @@ -210,4 +210,7 @@ export default { height: 100px; line-height: 100px; } +.component-upload-image >>> .el-upload-list__item-thumbnail { + object-fit: cover; +} \ No newline at end of file diff --git a/src/page/homepage/personability/abilityApply.vue b/src/page/homepage/personability/abilityApply.vue index f67bdfa..4b974ac 100644 --- a/src/page/homepage/personability/abilityApply.vue +++ b/src/page/homepage/personability/abilityApply.vue @@ -129,27 +129,31 @@ 工作经历
- + - - - - - - - - +
+ + + + + - + + + + +
@@ -162,8 +166,9 @@ >
-
- +
+
保存
+
修改
- + - - - - - - - - +
+ + + + + - + + + + +
@@ -218,13 +227,16 @@ >
-
+
+
保存
+
修改
- 删除 + 删除
+ 新增经历
@@ -236,9 +248,9 @@ 个人简介
- - - + + + - - + + - + +
+
保存
+
@@ -269,26 +287,33 @@ 资格证书
- - - + + + - + -
+
+
保存
+
修改
- 删除 + 删除
+ 新增证书
@@ -300,29 +325,33 @@ 教育经历
- + - - - - - - - - - + +
+ + + + + - + + + + +
- + @@ -330,16 +359,19 @@ - +
-
+
+
保存
+
修改
- 删除 + 删除
+ 新增经历
@@ -363,7 +395,7 @@ import { mapGetters } from 'vuex' import imageUpload from '@/page/common/imageUpload' import { gettesterId, addtesterApply, updatetesterApply } from '@/api/tester/CompanyApply' -import { couldInfoAdd } from '@/api/tester/TesterApply' +import { getCloudAll, couldInfoAdd, couldInfoUpdate, couldInfoDelete, couldUserInfoAdd, couldBookAdd, couldBookUpdate } from '@/api/tester/TesterApply' export default { components: { imageUpload }, @@ -398,15 +430,29 @@ export default { workList: [{}], workRules: { name: [{ required: true, message: '请输入公司名称', trigger: 'blur' }], + startTime: [{ required: true, message: '请输入开始时间', trigger: 'blur' }], + endTime: [{ required: true, message: '请输入结束时间', trigger: 'blur' }], + title: [{ required: true, message: '请输入职位名称', trigger: 'blur' }], + intro: [{ required: true, message: '请输入工作内容', trigger: 'blur' }], }, // 项目经历 projectList: [{}], projectRules: { - namep: [{ required: true, message: '请输入公司名称', trigger: 'blur' }], + name: [{ required: true, message: '请输入公司名称', trigger: 'blur' }], + startTime: [{ required: true, message: '请输入开始时间', trigger: 'blur' }], + endTime: [{ required: true, message: '请输入结束时间', trigger: 'blur' }], + title: [{ required: true, message: '请输入职位名称', trigger: 'blur' }], + intro: [{ required: true, message: '请输入工作内容', trigger: 'blur' }], + applyTech: [{ required: true, message: '请输入应用技术', trigger: 'blur' }], }, // 个人简历 - userForm: {}, - userRules: {}, + userForm: { + city: '北京市-北京市', + }, + userRules: { + testSkills: [{ required: true, message: '请输入技能方向', trigger: 'blur' }], + personalAdvantage: [{ required: true, message: '请输入个人优势', trigger: 'blur' }], + }, province: '北京市', city: '北京市', placeholders: { @@ -416,13 +462,21 @@ export default { // 资格证书 materialServerAddr: '', certificateList: [{}], - certificateRules: {}, + certificateRules: { + credentialsName: [{ required: true, message: '请输入证书名称', trigger: 'blur' }], + url: [{ required: true, message: '请上传证书', trigger: 'blur' }], + }, // 教育经历 educationList: [{}], - educationRules: {}, + educationRules: { + name: [{ required: true, message: '请输入学校名称', trigger: 'blur' }], + startTime: [{ required: true, message: '请输入开始时间', trigger: 'blur' }], + endTime: [{ required: true, message: '请输入结束时间', trigger: 'blur' }], + education: [{ required: true, message: '请输入学历', trigger: 'change' }], + major: [{ required: true, message: '请输入专业名称', trigger: 'blur' }], + }, } }, - mounted() {}, watch: { active: { handler(newval, oldval) { @@ -436,7 +490,45 @@ export default { computed: { ...mapGetters(['userinform', 'token']), }, + created() { + this.getCloudAllList() + }, methods: { + // 获取简历信息 + getCloudAllList() { + getCloudAll().then((res) => { + console.log(res) + // 经历 + this.projectList = res.experience.filter((it) => it.type == 0) + if (!this.projectList.length) { + this.projectList = [{}] + } + this.workList = res.experience.filter((it) => it.type == 1) + if (!this.workList.length) { + this.workList = [{}] + } + this.educationList = res.experience.filter((it) => it.type == 2) + if (!this.educationList.length) { + this.educationList = [{}] + } + // 个人简介 + this.userForm = res.personalInfo + this.province = this.userForm.city.split('-')[0] + this.city = this.userForm.city.split('-')[1] + + // 证书 + this.certificateList = res.credentials.map(it => { + return { + url: it.fileUrl, + credentialsName: it.fileName, + fileId: it.fileId + } + }) + if (!this.certificateList.length) { + this.certificateList = [{}] + } + }) + }, // 查询用户认证信息 searchApply() { gettesterId(this.userinform.userId).then((res) => { @@ -499,30 +591,157 @@ export default { }, // 工作经历保存 saveWork(i) { - const data = this.workList[i] - data.type = 1 - couldInfoAdd(data).then(res => { - console.log(res); + 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() + }) + } + }) + }, + // 工作经历修改 + updateWork(i) { + this.$refs[`workRef${i}`][0].validate((valid) => { + if (valid) { + const data = this.workList[i] + couldInfoUpdate(data).then((res) => { + this.$message.success('工作经历修改成功') + this.getCloudAllList() + }) + } }) }, // 工作经历删除 delWork(i) { - if (this.workList.length == 1) return this.$message.warning('最少有一项') - this.workList.splice(i, 1) + this.$confirm('此操作将永久删除, 是否继续?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning', + }).then(() => { + if (this.workList[i].caseId) { + couldInfoDelete(this.workList[i].caseId).then(() => { + this.$message({ + type: 'success', + message: '删除成功!', + }) + this.getCloudAllList() + }) + } else { + if (this.workList.length == 1) return this.$message.warning('最少有一项') + this.workList.splice(i, 1) + this.$message({ + type: 'success', + message: '删除成功!', + }) + } + }) }, // 项目经历添加 addProject() { this.projectList.push({}) }, + // 项目经历保存 + 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) { - if (this.projectList.length == 1) return this.$message.warning('最少有一项') - this.projectList.splice(i, 1) + this.$confirm('此操作将永久删除, 是否继续?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning', + }).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('最少有一项') + this.projectList.splice(i, 1) + this.$message({ + type: 'success', + 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('保存个人简介成功') + }) + } + }) }, // 资格证书添加 addCertificate() { 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) { if (this.certificateList.length == 1) return this.$message.warning('最少有一项') @@ -532,17 +751,62 @@ export default { addEducation() { 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) { - if (this.educationList.length == 1) return this.$message.warning('最少有一项') - this.educationList.splice(i, 1) + this.$confirm('此操作将永久删除, 是否继续?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning', + }).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('最少有一项') + this.educationList.splice(i, 1) + this.$message({ + type: 'success', + message: '删除成功!', + }) + } + }) }, // 省 onChangeProvince(data) { if (data.value.indexOf('---') == -1) { this.province = data.value this.city = '--- 市 ---' - this.userForm.area = this.province + '-' + this.city + this.userForm.city = this.province + '-' + this.city } else { this.province = '' } @@ -551,7 +815,7 @@ export default { onChangeCity(data) { if (data.value.indexOf('---') == -1) { this.city = data.value - this.userForm.area = this.province + '-' + this.city + this.userForm.city = this.province + '-' + this.city } else { this.city = '' } @@ -785,4 +1049,26 @@ export default { justify-content: center; margin: 40px auto; } +.flexbox { + display: flex; + align-items: center; +} +.endtime >>> .el-form-item__content { + margin-left: 0px !important; +} +.active5 >>> .el-upload--picture-card { + width: 500px; + height: 190px; + line-height: 190px; +} +.active5 >>> .el-upload-list__item { + width: 500px !important; + height: 190px !important; + line-height: 190px !important; +} +.active5 >>> .el-upload-list__item-status-label { + display: flex !important; + align-items: center !important; + justify-content: center !important; +} \ No newline at end of file diff --git a/src/page/personalpage/home/resume.vue b/src/page/personalpage/home/resume.vue index b2070aa..ae30058 100644 --- a/src/page/personalpage/home/resume.vue +++ b/src/page/personalpage/home/resume.vue @@ -1,7 +1,9 @@ +