Commit 6c4b62e6 authored by wangxl's avatar wangxl

44

parent 21198a2f
......@@ -238,7 +238,7 @@ export default {
},
},
},
data() {
data () {
return {
educationList: [],
studyList: [],
......@@ -250,7 +250,7 @@ export default {
}
};
},
created() {
created () {
// 根据 resumeType 分类并排序
if (this.resumeList && this.resumeList.length > 0) {
// 学历记录
......@@ -260,7 +260,7 @@ export default {
.map(item => ({
...item,
resumeRange: item.resumeStart && item.resumeEnd ?
[moment(item.resumeStart), moment(item.resumeEnd)] : []
[item.resumeStart, item.resumeEnd] : []
}))
// 研修经历
......@@ -270,7 +270,7 @@ export default {
.map(item => ({
...item,
resumeRange: item.resumeStart && item.resumeEnd ?
[moment(item.resumeStart), moment(item.resumeEnd)] : []
[item.resumeStart, item.resumeEnd] : []
}))
// 工作经历
......@@ -280,7 +280,7 @@ export default {
.map(item => ({
...item,
resumeRange: item.resumeStart && item.resumeEnd ?
[moment(item.resumeStart), moment(item.resumeEnd)] : []
[item.resumeStart, item.resumeEnd] : []
}))
this.formModel.educationList = this.educationList
......@@ -291,25 +291,25 @@ export default {
methods: {
moment,
checkDateRange,
educationDateChange(dates, dateStrings, index) {
educationDateChange (dates, dateStrings, index) {
if (dateStrings[0] && dateStrings[1]) {
this.educationList[index].resumeStart = dateStrings[0]
this.educationList[index].resumeEnd = dateStrings[1]
}
},
studyDateChange(dates, dateStrings, index) {
studyDateChange (dates, dateStrings, index) {
if (dateStrings[0] && dateStrings[1]) {
this.studyList[index].resumeStart = dateStrings[0]
this.studyList[index].resumeEnd = dateStrings[1]
}
},
workDateChange(dates, dateStrings, index) {
workDateChange (dates, dateStrings, index) {
if (dateStrings[0] && dateStrings[1]) {
this.workList[index].resumeStart = dateStrings[0]
this.workList[index].resumeEnd = dateStrings[1]
}
},
addEducationArray() {
addEducationArray () {
const newItem = {
...Education,
showIndex: this.educationList.length + 1,
......@@ -320,13 +320,13 @@ export default {
this.$refs.form && this.$refs.form.clearValidate()
})
},
deleteEducationArray(item) {
deleteEducationArray (item) {
let index = this.educationList.indexOf(item)
if (index !== -1) {
this.educationList.splice(index, 1)
}
},
addStudyArray() {
addStudyArray () {
const newItem = {
...Study,
showIndex: this.studyList.length + 1,
......@@ -337,13 +337,13 @@ export default {
this.$refs.form && this.$refs.form.clearValidate()
})
},
deleteStudyArray(item) {
deleteStudyArray (item) {
let index = this.studyList.indexOf(item)
if (index !== -1) {
this.studyList.splice(index, 1)
}
},
addWorkArray() {
addWorkArray () {
const newItem = {
...Work,
showIndex: this.workList.length + 1,
......@@ -354,13 +354,13 @@ export default {
this.$refs.form && this.$refs.form.clearValidate()
})
},
deleteWorkArray(item) {
deleteWorkArray (item) {
let index = this.workList.indexOf(item)
if (index !== -1) {
this.workList.splice(index, 1)
}
},
mergeResumeList() {
mergeResumeList () {
// 清空原有数据
this.resumeList.length = 0
......@@ -421,21 +421,21 @@ export default {
},
watch: {
educationList: {
handler(val) {
handler (val) {
this.formModel.educationList = val
},
deep: true,
immediate: true
},
studyList: {
handler(val) {
handler (val) {
this.formModel.studyList = val
},
deep: true,
immediate: true
},
workList: {
handler(val) {
handler (val) {
this.formModel.workList = val
},
deep: true,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment