多条经验保存 我的工具图片

main
lijingyu007 11 months ago
parent e4d7620b93
commit 3d99ae3e04
  1. 4
      .env.development
  2. 17
      src/api/tester/TesterApply.js
  3. 1231
      src/page/homepage/personability/abilityApply copy.vue
  4. 426
      src/page/homepage/personability/abilityApply.vue
  5. 18
      src/page/homepage/personability/abilityUserDetail.vue
  6. 6
      src/page/personalpage/testmanagement/mytool.vue

@ -6,11 +6,11 @@ VUE_APP_BASE_API = '/prod-api'
# VUE_APP_BASE_TARGET = 'http://192.168.0.229:9999'
# VUE_APP_BASE_TARGET = 'http://192.168.0.129:9999'
VUE_APP_BASE_TARGET = 'http://192.168.0.129:9999'
# VUE_APP_BASE_TARGET = 'http://172.16.36.180:9999'
# VUE_APP_BASE_TARGET = 'http://172.16.36.176:9998'
VUE_APP_BASE_TARGET = 'https://www.keyitest.cn/test-api'
# VUE_APP_BASE_TARGET = 'https://www.keyitest.cn/test-api'
# 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true

@ -188,3 +188,20 @@ export function delBook(id) {
method: 'delete',
})
}
// 多条记录添加
export function addLists(data) {
return request({
url: '/personal/case/addBatch',
method: 'post',
data
})
}
export function updateLists(data) {
return request({
url: '/personal/case/updateBatch',
method: 'post',
data
})
}

File diff suppressed because it is too large Load Diff

@ -88,7 +88,7 @@
<div class="stepBoxBtn" v-if="!userForm.status">
<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 class="nextBtn" v-else @click="next">保存下一步</div>
</div>
</div>
<div class="contentBox" v-show="!userForm.status">
@ -192,8 +192,6 @@
</el-form-item>
</el-form>
<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"
@ -268,8 +266,6 @@
</el-form-item>
</el-form>
<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"
@ -318,9 +314,6 @@
></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">
@ -354,8 +347,6 @@
</el-form-item>
</el-form>
<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"
@ -425,8 +416,6 @@
</el-form-item>
</el-form>
<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"
@ -448,7 +437,7 @@
<img src="/assets/ability/applyFail.png" alt="" />
审核不通过
</div>
<div class="editbtn" v-show="userForm.status == 3" @click="goedit">去修改</div>
<div class="editbtn" v-show="userForm.status == 3" @click="goedit">去修改</div>
<div class="contentBox" v-show="userForm.status == 2">
<div class="applySuccessAll">
<img src="/assets/ability/applysuccess.png" alt="" />
@ -472,13 +461,14 @@ import {
couldBookUpdate,
couldApply,
delBook,
addLists,
updateLists,
} from '@/api/tester/TesterApply'
export default {
components: { imageUpload },
data() {
return {
flag: false,
active: 0,
//
certifform: {},
@ -514,7 +504,7 @@ export default {
intro: [{ required: true, message: '请输入工作内容', trigger: 'blur' }],
},
//
projectList: [{}],
projectList: [{ type: 0 }],
projectRules: {
name: [{ required: true, message: '请输入公司名称', trigger: 'blur' }],
startTime: [{ required: true, message: '请输入开始时间', trigger: 'blur' }],
@ -545,7 +535,7 @@ export default {
url: [{ required: true, message: '请上传证书', trigger: 'blur' }],
},
//
educationList: [{}],
educationList: [{ type: 2 }],
educationRules: {
name: [{ required: true, message: '请输入学校名称', trigger: 'blur' }],
startTime: [{ required: true, message: '请输入开始时间', trigger: 'blur' }],
@ -553,6 +543,7 @@ export default {
education: [{ required: true, message: '请输入学历', trigger: 'change' }],
major: [{ required: true, message: '请输入专业名称', trigger: 'blur' }],
},
base: process.env.VUE_APP_BASE_API,
}
},
watch: {
@ -575,7 +566,7 @@ export default {
//
goedit() {
this.userForm.status = null
this.active =1
this.active = 1
},
//
saveInfo() {
@ -592,7 +583,7 @@ export default {
//
this.projectList = res.experience.filter((it) => it.type == 0)
if (!this.projectList.length) {
this.projectList = [{}]
this.projectList = [{ type: 0 }]
}
this.workList = res.experience.filter((it) => it.type == 1)
if (!this.workList.length) {
@ -600,34 +591,41 @@ export default {
}
this.educationList = res.experience.filter((it) => it.type == 2)
if (!this.educationList.length) {
this.educationList = [{}]
this.educationList = [{ type: 2 }]
}
//
if (res.personalInfo) {
this.userForm = res.personalInfo
if (!this.userForm.city || !this.userForm.testSkills || !this.userForm.personalAdvantage) {
this.userForm.flag = false
if (this.city) {
this.province = this.userForm.city.split('-')[0]
this.city = this.userForm.city.split('-')[1]
} else {
this.userForm.flag = true
this.province = '北京市'
this.city = '北京市'
this.userForm.city = '北京市-北京市'
}
this.province = this.userForm.city.split('-')[0]
this.city = this.userForm.city.split('-')[1]
// 1 2 0
// ,0123
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.active = 6
} else if (res.personalInfo.status === 3) {
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) => {
return {
url: it.fileUrl,
url: this.base + it.filePath,
credentialsName: it.fileName,
fileId: it.fileId,
}
@ -694,59 +692,175 @@ export default {
if (this.active == 0) {
if (this.certifform.status != 1) {
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('保存成功')
})
}
}
return
}
if (this.active == 2) {
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 {
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.userForm.flag) {
return this.$message.warning('请先保存个人简介')
}
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.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 {
flagArr3.push(false)
}
})
})
if (flagArr3.some((it) => !it)) {
this.$message.warning('请填写完整')
} else {
return this.$message.warning('至少保存一条教育经历')
//
if (this.educationList[0].caseId) {
//
updateLists(this.educationList).then((res) => {
this.getCloudAllList()
this.active++
this.$message.success('保存成功')
})
} else {
addLists(this.educationList).then((res) => {
this.getCloudAllList()
this.active++
this.$message.success('保存成功')
})
}
}
return
}
if (this.active == 4 && this.certificateList.length) {
const flagArr4 = []
this.certificateList.forEach((it, index) => {
this.$refs[`certificateRef${index}`][0].validate((valid) => {
if (valid) {
flagArr4.push(true)
} else {
flagArr4.push(false)
}
})
})
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
}
this.active++
},
//
addWork() {
if (this.workList.length >= 10) return this.$message.warning('工作经历最多添加10条')
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()
})
}
})
this.workList.push({ type: 1 })
},
//
delWork(i) {
@ -755,52 +869,17 @@ export default {
cancelButtonText: '取消',
type: 'warning',
}).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.$message({
type: 'success',
message: '删除成功!',
})
}
this.workList.splice(i, 1)
this.$message({
type: 'success',
message: '删除成功!',
})
})
},
//
addProject() {
if (this.projectList.length >= 20) return this.$message.warning('项目经历最多添加20条')
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()
})
}
})
this.projectList.push({ type: 0 })
},
//
delProject(i) {
@ -809,74 +888,19 @@ export default {
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('保存个人简介成功')
this.userForm.flag = true
})
}
if (this.projectList.length == 1) return this.$message.warning('最少有一项')
this.projectList.splice(i, 1)
this.$message({
type: 'success',
message: '删除成功!',
})
})
},
//
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) {
this.$confirm('此操作将永久删除, 是否继续?', '提示', {
@ -884,49 +908,17 @@ export default {
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: '删除成功!',
})
}
this.certificateList.splice(i, 1)
this.$message({
type: 'success',
message: '删除成功!',
})
})
},
//
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('此操作将永久删除, 是否继续?', '提示', {
@ -934,22 +926,12 @@ export default {
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: '删除成功!',
})
}
if (this.educationList.length == 1) return this.$message.warning('最少有一项')
this.educationList.splice(i, 1)
this.$message({
type: 'success',
message: '删除成功!',
})
})
},
//
@ -977,8 +959,8 @@ export default {
<style scoped>
.editbtn {
margin:auto;
color: #0066EB;
margin: auto;
color: #0066eb;
text-align: center;
cursor: pointer;
}

@ -80,6 +80,7 @@
<script>
import { mapGetters } from 'vuex'
import { getJobById, shenqingJob } from '@/api/ability'
import { getCloudAll } from '@/api/tester/TesterApply'
export default {
data() {
return {
@ -115,8 +116,21 @@ export default {
this.$message.success('职位申请成功')
})
} else {
this.$message.warning('请先入驻成为云员工')
// this.$router.push('/ability/apply')
getCloudAll(this.userId).then((res) => {
//
if (res.personalInfo) {
if (res.personalInfo.status === 2) {
const data = JSON.parse(JSON.stringify(this.userinform))
data.testerStatus = 2
this.$store.commit('SET_USERINFORM', data)
shenqingJob(this.jonInfo.jobId, { userId: this.userId }).then((res) => {
this.$message.success('职位申请成功')
})
} else {
this.$message.warning('请先入驻成为云员工')
}
}
})
}
}
},

@ -183,6 +183,7 @@ export default {
//
zhangmiOpen: false,
zhangcode: '123123',
base: process.env.VUE_APP_BASE_API
}
},
computed: {
@ -244,6 +245,11 @@ export default {
MyToolslist() {
listMyTools().then((response) => {
this.myToolList = response.data
this.myToolList.forEach(it => {
if (it.icon.indexOf('http') == -1) {
it.icon = this.base + it.icon
}
})
this.onTools = this.myToolList.filter((item) => {
return item.status == 0
})

Loading…
Cancel
Save