pc网页版软测宝
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

788 lines
30 KiB

<template>
<div class="userAbility">
<div class="topTitle container">
申请入驻
<div class="colra">云员工</div>
</div>
<div class="contentBig container">
<div class="stepBox">
<el-steps :active="active" align-center>
<el-step title="第一步: 实名认证">
<template slot="icon">
<img
v-if="active == 0"
src="/assets/ability/1ac.png"
style="width: 24px; height: 24px"
alt=""
/>
<img v-else src="/assets/ability/1un.png" style="width: 24px; height: 24px" alt="" />
</template>
</el-step>
<el-step title="第二步: 工作经历">
<template slot="icon">
<img
v-if="active == 1"
src="/assets/ability/2ac.png"
style="width: 24px; height: 24px"
alt=""
/>
<img v-else src="/assets/ability/2un.png" style="width: 24px; height: 24px" alt="" />
</template>
</el-step>
<el-step title="第三步: 项目经历">
<template slot="icon">
<img
v-if="active == 2"
src="/assets/ability/3ac.png"
style="width: 24px; height: 24px"
alt=""
/>
<img v-else src="/assets/ability/3un.png" style="width: 24px; height: 24px" alt="" />
</template>
</el-step>
<el-step title="第四步: 个人简介">
<template slot="icon">
<img
v-if="active == 3"
src="/assets/ability/4ac.png"
style="width: 24px; height: 24px"
alt=""
/>
<img v-else src="/assets/ability/4un.png" style="width: 24px; height: 24px" alt="" />
</template>
</el-step>
<el-step title="第五步: 资格证书">
<template slot="icon">
<img
v-if="active == 4"
src="/assets/ability/5ac.png"
style="width: 24px; height: 24px"
alt=""
/>
<img v-else src="/assets/ability/5un.png" style="width: 24px; height: 24px" alt="" />
</template>
</el-step>
<el-step title="第六步: 教育经历">
<template slot="icon">
<img
v-if="active == 5"
src="/assets/ability/6ac.png"
style="width: 24px; height: 24px"
alt=""
/>
<img v-else src="/assets/ability/6un.png" style="width: 24px; height: 24px" alt="" />
</template>
</el-step>
<el-step title="第七步: 提交检查">
<template slot="icon">
<img
v-if="active == 6"
src="/assets/ability/7ac.png"
style="width: 24px; height: 24px"
alt=""
/>
<img v-else src="/assets/ability/7un.png" style="width: 24px; height: 24px" alt="" />
</template>
</el-step>
</el-steps>
<div class="stepBoxBtn">
<div class="backBtn" @click="back">上一步</div>
<div class="nextBtn" v-if="active == 6" @click="saveInfo">提交审核</div>
<div class="nextBtn" v-else @click="next">下一步</div>
</div>
</div>
<div class="contentBox">
<div class="active1" v-show="active == 0">
<div class="activeTitle">
<div class="activeTitLine"></div>
实名认证
</div>
<div class="applytip">请放心认证关键测试宝平台承诺保障你的个人信息安全</div>
<div class="workIt">
<el-form ref="certifform" :model="certifform" :rules="certifRules">
<el-form-item prop="name">
<el-input
v-model="certifform.name"
:disabled="certifform.applyId && certifform.status == 1"
placeholder="请输入真实姓名"
/>
</el-form-item>
<el-form-item prop="idNumber">
<el-input
v-model="certifform.idNumber"
:disabled="certifform.applyId && certifform.status == 1"
placeholder="请输入身份证号码"
/>
</el-form-item>
</el-form>
</div>
<div v-if="active == 0 && !certifform.applyId" class="addWork" @click="applyBegin">开始验证</div>
<div class="applySuccess" v-if="certifform.applyId && certifform.status == 1">
<img src="/assets/ability/applysuccess.png" alt="" />
验证通过
</div>
</div>
<div class="active2" v-show="active == 1 || active == 6">
<!-- 工作经历 -->
<div class="activeTitle">
<div class="activeTitLine"></div>
工作经历
</div>
<div class="workIt" v-for="(it, index) in workList" :key="index">
<el-form :rules="workRules" :model="it" label-width="90px">
<el-form-item label="公司名称: " prop="name">
<el-input v-model="it.name" placeholder="请输入公司名称"></el-input>
</el-form-item>
<el-form-item label="在职时间: " prop="startTime">
<el-date-picker
value-format="yyyy-MM"
v-model="it.startTime"
type="month"
placeholder="开始时间"
>
</el-date-picker>
<span style="color: #bfbfbf; margin: 0 15px">-</span>
<el-date-picker
value-format="yyyy-MM"
v-model="it.endTime"
type="month"
placeholder="结束时间"
>
</el-date-picker>
</el-form-item>
<el-form-item label="职位名称: " prop="title">
<el-input v-model="it.title" placeholder="请输入职位名称"></el-input>
</el-form-item>
<el-form-item label="工作内容: " prop="intro">
<el-input
type="textarea"
v-model="it.intro"
:rows="5"
placeholder="请输入工作内容"
></el-input>
</el-form-item>
</el-form>
<div v-if="active == 1" class="delWork" >
<!-- <div class="saveWork" @click="saveWork(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 v-if="active == 1" class="addWork" @click="addWork">+ 新增经历</div>
</div>
<div class="active3" v-show="active == 2 || active == 6">
<!-- 项目经历 -->
<div class="activeTitle">
<div class="activeTitLine"></div>
项目经历
</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="name">
<el-input v-model="it.name" placeholder="请输入项目名称"></el-input>
</el-form-item>
<el-form-item label="项目时间" prop="startTime">
<el-date-picker
value-format="yyyy-MM"
v-model="it.startTime"
type="month"
placeholder="开始时间"
>
</el-date-picker>
<span style="color: #bfbfbf; margin: 0 15px">-</span>
<el-date-picker
value-format="yyyy-MM"
v-model="it.endTime"
type="month"
placeholder="结束时间"
>
</el-date-picker>
</el-form-item>
<el-form-item label="担任角色" prop="title">
<el-input v-model="it.title" placeholder="请输入担任角色"></el-input>
</el-form-item>
<el-form-item label="应用技术" prop="applyTech">
<el-input v-model="it.applyTech" placeholder="请输入应用技术"></el-input>
</el-form-item>
<el-form-item label="工作内容" prop="intro">
<el-input
:rows="5"
type="textarea"
v-model="it.intro"
placeholder="请输入工作内容"
></el-input>
</el-form-item>
</el-form>
<div v-if="active == 2" class="delWork" @click="delWork(index)">
<img
src="/assets/ability/delicon.png"
style="width: 14px; height: 16px; margin-right: 5px"
alt=""
/>
删除
</div>
</div>
<div v-if="active == 2" class="addWork" @click="addProject">+ 新增经历</div>
</div>
<div class="active4" v-show="active == 3 || active == 6">
<!-- 个人简介 -->
<div class="activeTitle">
<div class="activeTitLine"></div>
个人简介
</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>
<v-distpicker
@province="onChangeProvince"
@city="onChangeCity"
:placeholders="placeholders"
:province="province"
:city="city"
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>
<el-form-item label="个人优势" prop="workCon">
<el-input
type="textarea"
:rows="5"
v-model="userForm.workCon"
placeholder="请输入优势"
></el-input>
</el-form-item>
</el-form>
</div>
</div>
<div class="active5" v-show="active == 4 || active == 6">
<!-- 资格证书 -->
<div class="activeTitle">
<div class="activeTitLine"></div>
资格证书
</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-item>
<el-form-item>
<imageUpload
v-model="it.attachment"
fileName="publicize"
:limit="1"
:ref="'myupload' + index"
/>
</el-form-item>
</el-form>
<div v-if="active == 4" class="delWork" @click="delWork(index)">
<img
src="/assets/ability/delicon.png"
style="width: 14px; height: 16px; margin-right: 5px"
alt=""
/>
删除
</div>
</div>
<div v-if="active == 4" class="addWork" @click="addCertificate">+ 新增证书</div>
</div>
<div class="active6" v-show="active == 5 || active == 6">
<!-- 教育经历 -->
<div class="activeTitle">
<div class="activeTitLine"></div>
教育经历
</div>
<div class="workIt" v-for="(it, index) in educationList" :key="index">
<el-form :rules="educationRules" :model="it" label-width="80px">
<el-form-item label="学校名称" prop="name">
<el-input v-model="it.name"></el-input>
</el-form-item>
<el-form-item label="在校时间" prop="startTime">
<el-date-picker
value-format="yyyy-MM"
v-model="it.startTime"
type="month"
placeholder="选择月"
>
</el-date-picker>
-
<el-date-picker
value-format="yyyy-MM"
v-model="it.endTime"
type="month"
placeholder="选择月"
>
</el-date-picker>
</el-form-item>
<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="major">
<el-input v-model="it.major"></el-input>
</el-form-item>
</el-form>
<div v-if="active == 5" class="delWork" @click="delWork(index)">
<img
src="/assets/ability/delicon.png"
style="width: 14px; height: 16px; margin-right: 5px"
alt=""
/>
删除
</div>
</div>
<div v-if="active == 5" class="addWork" @click="addEducation">+ 新增经历</div>
</div>
<!-- <div class="active7" v-if="active == 6">
</div> -->
<div class="applyIng">提交成功等待审核</div>
<div class="applySuccessAll">
<img src="/assets/ability/applysuccess.png" alt="" />
审核通过
</div>
<div class="applyFail">
<img src="/assets/ability/applyFail.png" alt="" />
审核不通过
</div>
</div>
</div>
</div>
</template>
<script>
import { mapGetters } from 'vuex'
import imageUpload from '@/page/common/imageUpload'
import { gettesterId, addtesterApply, updatetesterApply } from '@/api/tester/CompanyApply'
import { couldInfoAdd } from '@/api/tester/TesterApply'
export default {
components: { imageUpload },
data() {
return {
active: 0,
// 实名认证
certifform: {},
certifRules: {
name: [
{ required: true, message: '真实姓名不能为空', trigger: 'blur' },
{ max: 20, message: '最多输入20个中文', trigger: 'blur' },
{
pattern: /^(?:[\u4e00-\u9fa5·]{2,16})$/,
message: '请输入中文',
trigger: 'blur',
},
],
idNumber: [
{ required: true, message: '身份证号码能为空', trigger: 'blur' },
{
pattern:
/^[1-9]\d{5}(18|19|20|(3\d))\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/,
message: '请输入正确的身份证号码',
trigger: 'blur',
},
{ max: 18, message: '身份证长度为18', trigger: 'blur' },
{ min: 18, message: '身份证长度为18', trigger: 'blur' },
],
},
// 工作经历
workList: [{}],
workRules: {
name: [{ required: true, message: '请输入公司名称', trigger: 'blur' }],
},
// 项目经历
projectList: [{}],
projectRules: {
namep: [{ required: true, message: '请输入公司名称', trigger: 'blur' }],
},
// 个人简历
userForm: {},
userRules: {},
province: '北京市',
city: '北京市',
placeholders: {
province: '--- 省 ----',
city: '--- 市 ---',
},
// 资格证书
materialServerAddr: '',
certificateList: [{}],
certificateRules: {},
// 教育经历
educationList: [{}],
educationRules: {},
}
},
mounted() {},
watch: {
active: {
handler(newval, oldval) {
if (newval == 0) {
this.searchApply()
}
},
immediate: true,
},
},
computed: {
...mapGetters(['userinform', 'token']),
},
methods: {
// 查询用户认证信息
searchApply() {
gettesterId(this.userinform.userId).then((res) => {
if (res.code == 200 && res.data.applyId) {
this.certifform = res.data
}
})
},
applyBegin() {
this.$refs['certifform'].validate((valid) => {
if (valid) {
let data = {
applyId: this.certifform.applyId,
userId: this.userinform.userId,
name: this.certifform.name,
idNumber: this.certifform.idNumber,
}
// return;
if (this.certifform.applyId) {
updatetesterApply(data)
.then((res) => {
if (res.code == 200) {
this.$message.success('实名认证成功')
this.searchApply()
} else {
}
})
.catch((error) => {})
} else {
addtesterApply(data)
.then((res) => {
if (res.code == 200) {
this.$message.success('实名认证成功')
this.searchApply()
} else {
}
})
.catch((error) => {})
}
}
})
},
// 返回上一步
back() {
if (this.active == 0) return
this.active--
},
// 下一步
next() {
if (this.active == 0) {
if (this.certifform.status != 1) {
return this.$message.warning('请先通过实名认证')
}
}
this.active++
},
// 工作经历添加
addWork() {
this.workList.push({})
},
// 工作经历保存
saveWork(i) {
const data = this.workList[i]
data.type = 1
couldInfoAdd(data).then(res => {
console.log(res);
})
},
// 工作经历删除
delWork(i) {
if (this.workList.length == 1) return this.$message.warning('最少有一项')
this.workList.splice(i, 1)
},
// 项目经历添加
addProject() {
this.projectList.push({})
},
// 项目经历删除
delProject(i) {
if (this.projectList.length == 1) return this.$message.warning('最少有一项')
this.projectList.splice(i, 1)
},
// 资格证书添加
addCertificate() {
this.certificateList.push({})
},
// 资格证书删除
delCertificate(i) {
if (this.certificateList.length == 1) return this.$message.warning('最少有一项')
this.certificateList.splice(i, 1)
},
// 教育经历添加
addEducation() {
this.educationList.push({})
},
// 教育经历删除
delEducation(i) {
if (this.educationList.length == 1) return this.$message.warning('最少有一项')
this.educationList.splice(i, 1)
},
// 省
onChangeProvince(data) {
if (data.value.indexOf('---') == -1) {
this.province = data.value
this.city = '--- 市 ---'
this.userForm.area = 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
} else {
this.city = ''
}
},
},
}
</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;
}
</style>