认证流程保存完成

main
lijingyu007 11 months ago
parent ccdd74a0c9
commit ae6e8fc987
  1. 2
      .env.development
  2. BIN
      public/assets/ability/metop.png
  3. 53
      src/api/tester/TesterApply.js
  4. 5
      src/page/common/imageUpload.vue
  5. 378
      src/page/homepage/personability/abilityApply.vue
  6. 654
      src/page/personalpage/home/resume.vue

@ -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'

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

@ -115,7 +115,58 @@ export function exportTesterApply(query) {
// 项目经历 工作经历 教育经历添加
export function couldInfoAdd(data) {
return request({
url: '/personal/cese/add',
url: '/personal/case/add',
method: 'post',
data
})
}
// 项目经历 工作经历 教育经历修改
export function couldInfoUpdate(data) {
return request({
url: '/personal/case/update',
method: 'post',
data
})
}
// 项目经历 工作经历 教育经历删除
export function couldInfoDelete(id) {
return request({
url: '/personal/case/' + id,
method: 'delete',
id
})
}
// 个人简介添加
export function couldUserInfoAdd(data) {
return request({
url: '/tester/cert/profile',
method: 'post',
data
})
}
// 查询简历信息
export function getCloudAll() {
return request({
url: '/personal/resume',
method: 'get',
})
}
// 证书新增
export function couldBookAdd(data) {
return request({
url: '/tester/cert/credentials',
method: 'post',
data
})
}
// 证书修改
export function couldBookUpdate(data) {
return request({
url: '/tester/cert/credentials/edit',
method: 'post',
data
})

@ -32,7 +32,7 @@
</div> -->
<el-dialog :visible.sync="dialogVisible" title="预览" width="800" append-to-body>
<img :src="dialogImageUrl" style="display: block; max-width: 100%; margin: 0 auto" />
<img :src="dialogImageUrl" style="display: block; max-width: 100%; margin: 0 auto; object-fit:cover" />
</el-dialog>
</div>
</template>
@ -210,4 +210,7 @@ export default {
height: 100px;
line-height: 100px;
}
.component-upload-image >>> .el-upload-list__item-thumbnail {
object-fit: cover;
}
</style>

@ -129,10 +129,11 @@
工作经历
</div>
<div class="workIt" v-for="(it, index) in workList" :key="index">
<el-form :rules="workRules" :model="it" label-width="90px">
<el-form :rules="workRules" :model="it" label-width="90px" :ref="'workRef' + index">
<el-form-item label="公司名称: " prop="name">
<el-input v-model="it.name" placeholder="请输入公司名称"></el-input>
</el-form-item>
<div class="flexbox">
<el-form-item label="在职时间: " prop="startTime">
<el-date-picker
value-format="yyyy-MM"
@ -141,7 +142,9 @@
placeholder="开始时间"
>
</el-date-picker>
<span style="color: #bfbfbf; margin: 0 15px">-</span>
</el-form-item>
<span style="color: #bfbfbf; margin: -27px 15px 0 15px">-</span>
<el-form-item prop="endTime" class="endtime">
<el-date-picker
value-format="yyyy-MM"
v-model="it.endTime"
@ -150,6 +153,7 @@
>
</el-date-picker>
</el-form-item>
</div>
<el-form-item label="职位名称: " prop="title">
<el-input v-model="it.title" placeholder="请输入职位名称"></el-input>
</el-form-item>
@ -162,8 +166,9 @@
></el-input>
</el-form-item>
</el-form>
<div v-if="active == 1" class="delWork" >
<!-- <div class="saveWork" @click="saveWork(index)">保存</div> -->
<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
src="/assets/ability/delicon.png"
style="width: 14px; height: 16px; margin-right: 5px"
@ -182,11 +187,12 @@
项目经历
</div>
<div class="workIt" v-for="(it, index) in projectList" :key="index">
<el-form :rules="projectRules" :model="it" label-width="80px">
<el-form :rules="projectRules" :model="it" label-width="90px" :ref="'projectRef' + index">
<el-form-item label="项目名称" prop="name">
<el-input v-model="it.name" placeholder="请输入项目名称"></el-input>
</el-form-item>
<el-form-item label="项目时间" prop="startTime">
<div class="flexbox">
<el-form-item label="项目时间: " prop="startTime">
<el-date-picker
value-format="yyyy-MM"
v-model="it.startTime"
@ -194,7 +200,9 @@
placeholder="开始时间"
>
</el-date-picker>
<span style="color: #bfbfbf; margin: 0 15px">-</span>
</el-form-item>
<span style="color: #bfbfbf; margin: -27px 15px 0 15px">-</span>
<el-form-item prop="endTime" class="endtime">
<el-date-picker
value-format="yyyy-MM"
v-model="it.endTime"
@ -203,6 +211,7 @@
>
</el-date-picker>
</el-form-item>
</div>
<el-form-item label="担任角色" prop="title">
<el-input v-model="it.title" placeholder="请输入担任角色"></el-input>
</el-form-item>
@ -218,13 +227,16 @@
></el-input>
</el-form-item>
</el-form>
<div v-if="active == 2" class="delWork" @click="delWork(index)">
<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
src="/assets/ability/delicon.png"
style="width: 14px; height: 16px; margin-right: 5px"
alt=""
@click="delProject(index)"
/>
删除
<span @click="delProject(index)">删除</span>
</div>
</div>
<div v-if="active == 2" class="addWork" @click="addProject">+ 新增经历</div>
@ -236,9 +248,9 @@
个人简介
</div>
<div class="workIt">
<el-form :rules="userRules" :model="userForm" label-width="80px">
<el-form-item label="所在城市" prop="namep">
<el-input v-model="userForm.area" v-show="false"></el-input>
<el-form :rules="userRules" :model="userForm" label-width="80px" ref="userRef">
<el-form-item label="所在城市" prop="city">
<el-input v-model="userForm.city" v-show="false"></el-input>
<v-distpicker
@province="onChangeProvince"
@city="onChangeCity"
@ -248,18 +260,24 @@
hide-area
></v-distpicker>
</el-form-item>
<el-form-item label="技能方向" prop="name1">
<el-input v-model="userForm.name1" placeholder="请输入技能,如:测试工程师"></el-input>
<el-form-item label="技能方向" prop="testSkills">
<el-input
v-model="userForm.testSkills"
placeholder="请输入技能,如:测试工程师"
></el-input>
</el-form-item>
<el-form-item label="个人优势" prop="workCon">
<el-form-item label="个人优势" prop="personalAdvantage">
<el-input
type="textarea"
:rows="5"
v-model="userForm.workCon"
placeholder="请输入优势"
v-model="userForm.personalAdvantage"
placeholder="请输入个人优势"
></el-input>
</el-form-item>
</el-form>
<div v-if="active == 3" class="delWork">
<div class="saveWork" @click="saveUser">保存</div>
</div>
</div>
</div>
<div class="active5" v-show="active == 4 || active == 6">
@ -269,26 +287,33 @@
资格证书
</div>
<div class="workIt" v-for="(it, index) in certificateList" :key="index">
<el-form :rules="certificateRules" :model="it" label-width="80px">
<el-form-item label="证书名称" prop="namep">
<el-input v-model="it.namep"></el-input>
<el-form
:rules="certificateRules"
:model="it"
label-width="80px"
:ref="'certificateRef' + index"
>
<el-form-item label="证书名称" prop="credentialsName">
<el-input v-model="it.credentialsName" placeholder="请输入证书名称"></el-input>
</el-form-item>
<el-form-item>
<el-form-item prop="url">
<imageUpload
v-model="it.attachment"
v-model="it.url"
fileName="publicize"
:limit="1"
:ref="'myupload' + index"
/>
</el-form-item>
</el-form>
<div v-if="active == 4" class="delWork" @click="delWork(index)">
<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
src="/assets/ability/delicon.png"
style="width: 14px; height: 16px; margin-right: 5px"
alt=""
@click="delCertificate(index)"
/>
删除
<span @click="delCertificate(index)">删除</span>
</div>
</div>
<div v-if="active == 4" class="addWork" @click="addCertificate">+ 新增证书</div>
@ -300,29 +325,33 @@
教育经历
</div>
<div class="workIt" v-for="(it, index) in educationList" :key="index">
<el-form :rules="educationRules" :model="it" label-width="80px">
<el-form :rules="educationRules" :model="it" label-width="90px" :ref="'educationRef' + index">
<el-form-item label="学校名称" prop="name">
<el-input v-model="it.name"></el-input>
<el-input v-model="it.name" placeholder="请输入学校名称"></el-input>
</el-form-item>
<el-form-item label="在校时间" prop="startTime">
<div class="flexbox">
<el-form-item label="在校时间: " prop="startTime">
<el-date-picker
value-format="yyyy-MM"
v-model="it.startTime"
type="month"
placeholder="选择月"
placeholder="开始时间"
>
</el-date-picker>
-
</el-form-item>
<span style="color: #bfbfbf; margin: -27px 15px 0 15px">-</span>
<el-form-item prop="endTime" class="endtime">
<el-date-picker
value-format="yyyy-MM"
v-model="it.endTime"
type="month"
placeholder="选择月"
placeholder="结束时间"
>
</el-date-picker>
</el-form-item>
</div>
<el-form-item label="学历" prop="education">
<el-select v-model="it.education" placeholder="请选择">
<el-select v-model="it.education" placeholder="请选择学历">
<el-option label="专科" value="专科"> </el-option>
<el-option label="本科" value="本科"> </el-option>
<el-option label="硕士研究生" value="硕士研究生"> </el-option>
@ -330,16 +359,19 @@
</el-select>
</el-form-item>
<el-form-item label="专业名称" prop="major">
<el-input v-model="it.major"></el-input>
<el-input v-model="it.major" placeholder="请输入专业名称"></el-input>
</el-form-item>
</el-form>
<div v-if="active == 5" class="delWork" @click="delWork(index)">
<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
src="/assets/ability/delicon.png"
style="width: 14px; height: 16px; margin-right: 5px"
alt=""
@click="delEducation(index)"
/>
删除
<span @click="delEducation(index)">删除</span>
</div>
</div>
<div v-if="active == 5" class="addWork" @click="addEducation">+ 新增经历</div>
@ -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) {
this.$refs[`workRef${i}`][0].validate((valid) => {
if (valid) {
const data = this.workList[i]
data.type = 1
couldInfoAdd(data).then(res => {
console.log(res);
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) {
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) {
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) {
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;
}
</style>

@ -1,7 +1,9 @@
<template>
<div class="allbox">
<div class="userAbility">
<div class="toptttt">云员工个人简历</div>
<div class="toptttt">
<img src="/assets/ability/metop.png" style="width:24px;height:28px;margin-right:15px" alt="">
云员工个人简历</div>
<div class="contentBig">
<div class="contentBox">
<div class="active4">
@ -11,7 +13,7 @@
个人简介
</div>
<div class="workIt">
<el-form :rules="userRules" :model="userForm" label-width="80px">
<el-form :rules="userRules" :model="userForm" label-width="80px" ref="userRef">
<div class="flexbox">
<el-form-item label="姓名: ">
<span>张三(已实名)</span>
@ -20,8 +22,8 @@
<span></span>
</el-form-item>
</div>
<el-form-item label="所在城市: " prop="namep">
<el-input v-model="userForm.area" v-show="false"></el-input>
<el-form-item label="所在城市" prop="city">
<el-input v-model="userForm.city" v-show="false"></el-input>
<v-distpicker
@province="onChangeProvince"
@city="onChangeCity"
@ -31,21 +33,24 @@
hide-area
></v-distpicker>
</el-form-item>
<el-form-item label="技能方向: " prop="name1">
<el-form-item label="技能方向" prop="testSkills">
<el-input
v-model="userForm.name1"
v-model="userForm.testSkills"
placeholder="请输入技能,如:测试工程师"
></el-input>
</el-form-item>
<el-form-item label="个人优势: " prop="workCon">
<el-form-item label="个人优势" prop="personalAdvantage">
<el-input
type="textarea"
:rows="5"
v-model="userForm.workCon"
placeholder="请输入优势"
v-model="userForm.personalAdvantage"
placeholder="请输入个人优势"
></el-input>
</el-form-item>
</el-form>
<div class="delWork">
<div class="saveWork" @click="saveUser">保存</div>
</div>
</div>
</div>
<div class="active2">
@ -55,46 +60,53 @@
工作经历
</div>
<div class="workIt" v-for="(it, index) in workList" :key="index">
<el-form :rules="workRules" :model="it" label-width="90px">
<el-form :rules="workRules" :model="it" label-width="90px" :ref="'workRef' + index">
<el-form-item label="公司名称: " prop="name">
<el-input v-model="it.name" placeholder="请输入公司名称"></el-input>
</el-form-item>
<el-form-item label="在职时间: " prop="time">
<div class="flexbox">
<el-form-item label="在职时间: " prop="startTime">
<el-date-picker
value-format="yyyy-MM"
v-model="it.time"
v-model="it.startTime"
type="month"
placeholder="开始时间"
>
</el-date-picker>
<span style="color: #bfbfbf; margin: 0 15px">-</span>
</el-form-item>
<span style="color: #bfbfbf; margin: -27px 15px 0 15px">-</span>
<el-form-item prop="endTime" class="endtime">
<el-date-picker
value-format="yyyy-MM"
v-model="it.time1"
v-model="it.endTime"
type="month"
placeholder="结束时间"
>
</el-date-picker>
</el-form-item>
<el-form-item label="职位名称: " prop="name1">
<el-input v-model="it.name1" placeholder="请输入职位名称"></el-input>
</div>
<el-form-item label="职位名称: " prop="title">
<el-input v-model="it.title" placeholder="请输入职位名称"></el-input>
</el-form-item>
<el-form-item label="工作内容: " prop="workCon">
<el-form-item label="工作内容: " prop="intro">
<el-input
type="textarea"
v-model="it.workCon"
v-model="it.intro"
:rows="5"
placeholder="请输入工作内容"
></el-input>
</el-form-item>
</el-form>
<div class="delWork" @click="delWork(index)">
<div class="delWork">
<div v-if="!it.caseId" class="saveWork" @click="saveWork(index)">保存</div>
<div v-else class="saveWork" @click="updateWork(index)">修改</div>
<img
src="/assets/ability/delicon.png"
style="width: 14px; height: 16px; margin-right: 5px"
alt=""
@click="delWork(index)"
/>
删除
<span @click="delWork(index)">删除</span>
</div>
</div>
<div class="addWork" @click="addWork">+ 新增经历</div>
@ -106,49 +118,56 @@
项目经历
</div>
<div class="workIt" v-for="(it, index) in projectList" :key="index">
<el-form :rules="projectRules" :model="it" label-width="80px">
<el-form-item label="项目名称" prop="namep">
<el-input v-model="it.namep" placeholder="请输入项目名称"></el-input>
<el-form :rules="projectRules" :model="it" label-width="90px" :ref="'projectRef' + index">
<el-form-item label="项目名称" prop="name">
<el-input v-model="it.name" placeholder="请输入项目名称"></el-input>
</el-form-item>
<el-form-item label="项目时间" prop="time">
<div class="flexbox">
<el-form-item label="项目时间: " prop="startTime">
<el-date-picker
value-format="yyyy-MM"
v-model="it.time"
v-model="it.startTime"
type="month"
placeholder="开始时间"
>
</el-date-picker>
<span style="color: #bfbfbf; margin: 0 15px">-</span>
</el-form-item>
<span style="color: #bfbfbf; margin: -27px 15px 0 15px">-</span>
<el-form-item prop="endTime" class="endtime">
<el-date-picker
value-format="yyyy-MM"
v-model="it.time1"
v-model="it.endTime"
type="month"
placeholder="结束时间"
>
</el-date-picker>
</el-form-item>
<el-form-item label="担任角色" prop="name1">
<el-input v-model="it.name1" placeholder="请输入担任角色"></el-input>
</div>
<el-form-item label="担任角色" prop="title">
<el-input v-model="it.title" placeholder="请输入担任角色"></el-input>
</el-form-item>
<el-form-item label="应用技术" prop="name2">
<el-input v-model="it.name2" placeholder="请输入应用技术"></el-input>
<el-form-item label="应用技术" prop="applyTech">
<el-input v-model="it.applyTech" placeholder="请输入应用技术"></el-input>
</el-form-item>
<el-form-item label="工作内容" prop="workCon">
<el-form-item label="工作内容" prop="intro">
<el-input
:rows="5"
type="textarea"
v-model="it.workCon"
v-model="it.intro"
placeholder="请输入工作内容"
></el-input>
</el-form-item>
</el-form>
<div class="delWork" @click="delWork(index)">
<div class="delWork">
<div v-if="!it.caseId" class="saveWork" @click="saveProject(index)">保存</div>
<div v-else class="saveWork" @click="updateProject(index)">修改</div>
<img
src="/assets/ability/delicon.png"
style="width: 14px; height: 16px; margin-right: 5px"
alt=""
@click="delProject(index)"
/>
删除
<span @click="delProject(index)">删除</span>
</div>
</div>
<div class="addWork" @click="addProject">+ 新增经历</div>
@ -161,26 +180,33 @@
资格证书
</div>
<div class="workIt" v-for="(it, index) in certificateList" :key="index">
<el-form :rules="certificateRules" :model="it" label-width="80px">
<el-form-item label="证书名称" prop="namep">
<el-input v-model="it.namep"></el-input>
<el-form
:rules="certificateRules"
:model="it"
label-width="80px"
:ref="'certificateRef' + index"
>
<el-form-item label="证书名称" prop="credentialsName">
<el-input v-model="it.credentialsName" placeholder="请输入证书名称"></el-input>
</el-form-item>
<el-form-item>
<el-form-item prop="url">
<imageUpload
v-model="it.attachment"
v-model="it.url"
fileName="publicize"
:limit="1"
:ref="'myupload' + index"
/>
</el-form-item>
</el-form>
<div class="delWork" @click="delWork(index)">
<div class="delWork">
<div v-if="!it.fileId" class="saveWork" @click="saveCertificate(index)">保存</div>
<div v-else class="saveWork" @click="updateCertificate(index)">修改</div>
<img
src="/assets/ability/delicon.png"
style="width: 14px; height: 16px; margin-right: 5px"
alt=""
@click="delCertificate(index)"
/>
删除
<span @click="delCertificate(index)">删除</span>
</div>
</div>
<div class="addWork" @click="addCertificate">+ 新增证书</div>
@ -192,46 +218,58 @@
教育经历
</div>
<div class="workIt" v-for="(it, index) in educationList" :key="index">
<el-form :rules="educationRules" :model="it" label-width="80px">
<el-form
:rules="educationRules"
:model="it"
label-width="90px"
:ref="'educationRef' + index"
>
<el-form-item label="学校名称" prop="name">
<el-input v-model="it.name"></el-input>
<el-input v-model="it.name" placeholder="请输入学校名称"></el-input>
</el-form-item>
<el-form-item label="在校时间" prop="time">
<div class="flexbox">
<el-form-item label="在校时间: " prop="startTime">
<el-date-picker
value-format="yyyy-MM"
v-model="it.time"
v-model="it.startTime"
type="month"
placeholder="选择月"
placeholder="开始时间"
>
</el-date-picker>
-
</el-form-item>
<span style="color: #bfbfbf; margin: -27px 15px 0 15px">-</span>
<el-form-item prop="endTime" class="endtime">
<el-date-picker
value-format="yyyy-MM"
v-model="it.time1"
v-model="it.endTime"
type="month"
placeholder="选择月"
placeholder="结束时间"
>
</el-date-picker>
</el-form-item>
<el-form-item label="学历" prop="name1">
<el-select v-model="it.value" placeholder="请选择">
</div>
<el-form-item label="学历" prop="education">
<el-select v-model="it.education" placeholder="请选择学历">
<el-option label="专科" value="专科"> </el-option>
<el-option label="本科" value="本科"> </el-option>
<el-option label="硕士研究生" value="硕士研究生"> </el-option>
<el-option label="博士研究生" value="博士研究生"> </el-option>
</el-select>
</el-form-item>
<el-form-item label="专业名称" prop="workCon">
<el-input v-model="it.workCon"></el-input>
<el-form-item label="专业名称" prop="major">
<el-input v-model="it.major" placeholder="请输入专业名称"></el-input>
</el-form-item>
</el-form>
<div class="delWork" @click="delWork(index)">
<div class="delWork">
<div v-if="!it.caseId" class="saveWork" @click="saveEducation(index)">保存</div>
<div v-else class="saveWork" @click="updateEducation(index)">修改</div>
<img
src="/assets/ability/delicon.png"
style="width: 14px; height: 16px; margin-right: 5px"
alt=""
@click="delEducation(index)"
/>
删除
<span @click="delEducation(index)">删除</span>
</div>
</div>
<div class="addWork" @click="addEducation">+ 新增经历</div>
@ -242,10 +280,21 @@
<div class="bottomBtn">保存并发布</div>
</div>
</template>
<script>
import { mapGetters } from 'vuex'
import imageUpload from '@/page/common/imageUpload'
import { gettesterId, addtesterApply, updatetesterApply } from '@/api/tester/CompanyApply'
import {
getCloudAll,
couldInfoAdd,
couldInfoUpdate,
couldInfoDelete,
couldUserInfoAdd,
couldBookAdd,
couldBookUpdate,
} from '@/api/tester/TesterApply'
export default {
components: { imageUpload },
data() {
@ -279,15 +328,30 @@ 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' }],
city: [{ required: true, message: '请选择城市', trigger: 'change' }],
},
province: '北京市',
city: '北京市',
placeholders: {
@ -297,13 +361,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) {
@ -317,7 +389,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) => {
@ -378,24 +488,159 @@ export default {
addWork() {
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()
})
}
})
},
//
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) {
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) {
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('最少有一项')
@ -405,25 +650,71 @@ 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) {
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 = ''
}
},
//
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 = ''
}
@ -433,6 +724,237 @@ export default {
</script>
<style scoped>
.userAbility {
background: #f2f3f7;
padding-bottom: 40px;
overflow: hidden;
}
.container {
width: 1200px;
margin: auto;
}
.topTitle {
font-weight: bold;
font-size: 32px;
color: #1a1a1a;
display: flex;
align-items: center;
margin: 40px auto;
}
.colra {
background: linear-gradient(-90deg, #fa2c3f 0%, #792bf9 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.stepBoxBtn {
display: flex;
align-items: center;
justify-content: center;
margin: 30px 0;
}
.backBtn {
width: 130px;
height: 40px;
border-radius: 4px;
border: 1px solid #0066eb;
margin-right: 16px;
line-height: 40px;
text-align: center;
font-weight: 500;
font-size: 15px;
color: #0066eb;
cursor: pointer;
}
.nextBtn {
width: 130px;
height: 40px;
background: #0066eb;
border-radius: 4px;
line-height: 40px;
text-align: center;
font-weight: 500;
font-size: 15px;
color: #ffffff;
cursor: pointer;
}
.contentBig {
background: #ffffff;
padding: 40px;
box-sizing: border-box;
}
.stepBox {
margin: 30px auto;
border-bottom: 2px dashed #ebebeb;
}
.stepBox >>> .el-steps {
flex: 1;
}
.stepBox >>> .el-step__icon {
width: 60px;
height: 60px;
background: #f2f3f7;
border: unset;
}
.stepBox >>> .el-step__line {
top: 30px !important;
background: #f2f3f7;
height: 3px;
}
/* 已完成 */
.stepBox >>> .el-step__head.is-finish {
color: #f2f3f7;
border-color: unset;
}
.stepBox >>> .el-step__title.is-finish {
font-weight: 500;
font-size: 15px;
color: #666666;
}
.stepBox >>> .el-step__title.is-wait {
font-weight: 500;
font-size: 15px;
color: #666666;
}
.stepBox >>> .el-step__title.is-process {
font-weight: 500;
font-size: 15px;
color: #0066eb;
}
/* 当前 */
.stepBox >>> .el-step__head.is-process .el-step__icon {
background: #0066eb !important;
}
.workIt >>> .distpicker-address-wrapper label select {
width: 247px !important;
}
.addWork {
width: 150px;
height: 40px;
background: linear-gradient(90deg, #0066eb, #2783fc);
border-radius: 4px;
font-weight: 500;
font-size: 15px;
color: #ffffff;
line-height: 40px;
text-align: center;
margin-bottom: 30px;
}
.delWork {
position: absolute;
top: 20px;
right: 20px;
margin-left: 20px;
display: flex;
align-items: center;
cursor: pointer;
font-weight: 500;
font-size: 14px;
color: #fd4747;
}
.saveWork {
margin-right: 30px;
cursor: pointer;
font-weight: 500;
font-size: 14px;
color: #23ca7d;
}
.workIt {
border-radius: 4px;
border: 1px solid #f2f2f2;
margin-bottom: 20px;
padding: 26px;
box-sizing: border-box;
position: relative;
}
.workIt >>> .el-input {
width: 500px;
}
.workIt >>> .el-date-editor {
width: 231px;
}
.workIt >>> .el-textarea__inner {
width: 500px;
}
.activeTitle {
display: flex;
align-items: center;
font-weight: bold;
font-size: 20px;
color: #000000;
margin-bottom: 30px;
}
.activeTitLine {
width: 5px;
height: 17px;
background: #0066eb;
margin-right: 10px;
}
.applytip {
font-weight: 500;
font-size: 14px;
color: #808080;
margin-bottom: 30px;
margin-top: -10px;
}
.applySuccess {
display: flex;
align-items: center;
font-weight: 500;
font-size: 18px;
color: #23ca7d;
}
.applySuccess img {
width: 27px;
height: 27px;
margin-right: 10px;
}
.applyIng {
width: 275px;
height: 50px;
background: #fbefe1;
border-radius: 4px;
font-weight: 500;
font-size: 18px;
color: #fa912a;
display: flex;
align-items: center;
justify-content: center;
margin: 40px auto;
}
.applySuccessAll {
width: 275px;
height: 50px;
background: #e0f9ed;
border-radius: 4px;
font-weight: 500;
font-size: 18px;
color: #23ca7d;
display: flex;
align-items: center;
justify-content: center;
margin: 40px auto;
}
.applyFail {
width: 275px;
height: 50px;
background: #fceded;
border-radius: 4px;
font-weight: 500;
font-size: 18px;
color: #fc4444;
display: flex;
align-items: center;
justify-content: center;
margin: 40px auto;
}
.flexbox {
display: flex;
align-items: center;
}
.endtime >>> .el-form-item__content {
margin-left: 0px !important;
}
.userAbility {
overflow: hidden;
background: #ffffff;

Loading…
Cancel
Save