工作经历项目经历个数限制

main
lijingyu007 11 months ago
parent 0749bedc05
commit ee75909171
  1. 2
      src/page/homepage/personability/abilityApply.vue
  2. 52
      src/page/personalpage/home/resume.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({})
},
//

@ -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.$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() {

Loading…
Cancel
Save