|
@@ -549,6 +549,7 @@ export default {
|
|
realName: '',
|
|
realName: '',
|
|
resignationDate: '',
|
|
resignationDate: '',
|
|
subjectIdList: [],
|
|
subjectIdList: [],
|
|
|
|
+ jobSubjectIdList: [],
|
|
wechatNo: '',
|
|
wechatNo: '',
|
|
organId: '',
|
|
organId: '',
|
|
sourceFrom: '',
|
|
sourceFrom: '',
|
|
@@ -606,7 +607,8 @@ export default {
|
|
updateData() {
|
|
updateData() {
|
|
if (this.detail) {
|
|
if (this.detail) {
|
|
try {
|
|
try {
|
|
- this.detail.subjectIdList = this.detail.subjectIdList.split(',')
|
|
|
|
|
|
+ this.detail.subjectIdList = this.detail.subjectIdList ? this.detail.subjectIdList.split(',') : []
|
|
|
|
+ this.detail.jobSubjectIdList = this.detail.jobSubjectIdList ? this.detail.jobSubjectIdList.split(',') : []
|
|
} catch (error) {}
|
|
} catch (error) {}
|
|
if (this.detail.organId === 0) {
|
|
if (this.detail.organId === 0) {
|
|
this.detail.organId = ''
|
|
this.detail.organId = ''
|
|
@@ -624,10 +626,13 @@ export default {
|
|
}
|
|
}
|
|
this.form = {...this.form}
|
|
this.form = {...this.form}
|
|
} catch (error) {}
|
|
} catch (error) {}
|
|
|
|
+
|
|
|
|
+ console.log(this.form)
|
|
} else {
|
|
} else {
|
|
this.form.educations = [{level: '', school: '', year: '', subject: ''}]
|
|
this.form.educations = [{level: '', school: '', year: '', subject: ''}]
|
|
this.form = {...this.form}
|
|
this.form = {...this.form}
|
|
}
|
|
}
|
|
|
|
+
|
|
this.$refs['ruleForm'].resetFields()
|
|
this.$refs['ruleForm'].resetFields()
|
|
},
|
|
},
|
|
addEducation() {
|
|
addEducation() {
|
|
@@ -644,9 +649,9 @@ export default {
|
|
if (valid) {
|
|
if (valid) {
|
|
const { $message } = this
|
|
const { $message } = this
|
|
this.form.educationalBackground = JSON.stringify(this.form.educations)
|
|
this.form.educationalBackground = JSON.stringify(this.form.educations)
|
|
- const {educations, subjectIdList, ...rest} = this.form
|
|
|
|
|
|
+ const {educations, subjectIdList, jobSubjectIdList, ...rest} = this.form
|
|
if (this.detail && this.detail.id) {
|
|
if (this.detail && this.detail.id) {
|
|
- employeeUpdate(Object.assign({id: this.detail.id, subjectIdList: (subjectIdList || []).join(',')}, rest))
|
|
|
|
|
|
+ employeeUpdate(Object.assign({id: this.detail.id, subjectIdList: (subjectIdList || []).join(','), jobSubjectIdList: (jobSubjectIdList || []).join(',')}, rest))
|
|
.then(res => {
|
|
.then(res => {
|
|
if (res.code === 200) {
|
|
if (res.code === 200) {
|
|
$message.success('修改成功')
|
|
$message.success('修改成功')
|