Commit c85d48d0 authored by 徐俊's avatar 徐俊

xujun

parent 5b55bb04
...@@ -476,9 +476,15 @@ export default { ...@@ -476,9 +476,15 @@ export default {
getCount (params) { getCount (params) {
return fetch(`/v1/science-admin/com-talent-apply/getCount`, params) return fetch(`/v1/science-admin/com-talent-apply/getCount`, params)
}, },
getNewTalentApply () {
return fetch(`/v1/science-admin/com-talent-apply/getNewTalentApply`)
},
getTalentApplyById (params) {
return fetch(`/v1/science-admin/com-talent-apply/getTalentApplyById`, params)
},
save (params) { save (params) {
return fetch(`/v1/science-admin/com-talent-apply/save`, params, 'post', 'json') return fetch(`/v1/science-admin/com-talent-apply/save`, params, 'post', 'json')
} },
}, },
task: { task: {
getListByPage (params) { getListByPage (params) {
......
...@@ -308,8 +308,8 @@ ...@@ -308,8 +308,8 @@
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<div> <div>
<a-form-model-item prop="telephone"> <a-form-model-item prop="mobile">
<a-input v-model="formData.telephone" :maxLength="50" style="width:80%" /> <a-input v-model="formData.mobile" :maxLength="50" style="width:80%" />
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
...@@ -409,7 +409,7 @@ export default { ...@@ -409,7 +409,7 @@ export default {
holdPost1: null, holdPost1: null,
holdPost2: null, holdPost2: null,
holdPost3: null, holdPost3: null,
telephone: null, mobile: null,
fax: null, fax: null,
email: null, email: null,
resumeList: [], resumeList: [],
...@@ -433,17 +433,67 @@ export default { ...@@ -433,17 +433,67 @@ export default {
holdPost1: [{ required: true, message: '*', trigger: 'blur' },], holdPost1: [{ required: true, message: '*', trigger: 'blur' },],
holdPost2: [{ required: true, message: '*', trigger: 'blur' },], holdPost2: [{ required: true, message: '*', trigger: 'blur' },],
holdPost3: [{ required: true, message: '*', trigger: 'blur' },], holdPost3: [{ required: true, message: '*', trigger: 'blur' },],
telephone: [{ required: true, message: '*', trigger: 'blur' }], mobile: [{ required: true, message: '*', trigger: 'blur' }],
fax: [{ required: true, message: '*', trigger: 'blur' }], fax: [{ required: true, message: '*', trigger: 'blur' }],
email: [{ required: true, message: '*', trigger: 'blur' }], email: [{ required: true, message: '*', trigger: 'blur' }],
}, },
}; };
}, },
created () { created () {
if (this.value)
this.getTalentApplyById()
else
this.getNewTalentApply()
}, },
methods: { methods: {
moment, moment,
getNewTalentApply() {
this.$api.talent.getNewTalentApply({ }).then(({ data = {} }) => {
if (data) {
this.formData = data
this.formData.sex = ''
this.$emit('onStepChange', { step: 0, state: data.completeStatus })
this.loadList()
} else {
this.$emit('close', 'error')
}
this.$emit('load', false)
}).catch(() => {
this.$emit('close', 'error')
this.$emit('load', false)
})
},
getTalentApplyById() {
this.$api.talent.getTalentApplyById({ id: this.value }).then(({ data = {} }) => {
if (data) {
this.formData = data
this.$emit('onStepChange', { step: 0, state: data.completeStatus })
this.loadList()
} else {
this.$emit('close', 'error')
}
this.$emit('load', false)
}).catch(() => {
this.$emit('close', 'error')
this.$emit('load', false)
})
},
loadList () {
if (!!!this.formData.membersList || this.formData.membersList.length == 0)
this.formData.membersList = []
if (!!!this.formData.budgetList || this.formData.budgetList.length == 0)
this.formData.budgetList = []
if (!!!this.formData.resumeList || this.formData.resumeList.length == 0)
this.formData.resumeList = []
if (!!!this.formData.scientificList || this.formData.scientificList.length == 0)
this.formData.scientificList = []
if (!!!this.formData.fileList || this.formData.fileList.length == 0)
this.formData.fileList = []
},
getPersonByCertId() { getPersonByCertId() {
if (this.formData.certId == "" || this.formData.certId == null) if (this.formData.certId == "" || this.formData.certId == null)
return return
...@@ -451,8 +501,10 @@ export default { ...@@ -451,8 +501,10 @@ export default {
this.loading = true this.loading = true
this.$api.person.getPersonByCertId({ certId: this.formData.certId }).then(({ data = {} }) => { this.$api.person.getPersonByCertId({ certId: this.formData.certId }).then(({ data = {} }) => {
if (data) { if (data) {
console.log(data)
this.formData = data this.formData = data
this.formData.personId = data.id this.formData.personId = data.id
console.log(this.formData)
} }
this.loading = false this.loading = false
}).catch(() => { this.loading = false }) }).catch(() => { this.loading = false })
...@@ -524,7 +576,7 @@ export default { ...@@ -524,7 +576,7 @@ export default {
obj = { obj = {
id: null, reportYear: null, certId: null, personName: null, nation: null, sex: null, birthday: null, degree: null, degreeTime: null, id: null, reportYear: null, certId: null, personName: null, nation: null, sex: null, birthday: null, degree: null, degreeTime: null,
degreeUnit: null, spec: null, graduateTeacher: null, title: null, politicalParty: null, duty: null, talentType: null, honoraryTitle: null, degreeUnit: null, spec: null, graduateTeacher: null, title: null, politicalParty: null, duty: null, talentType: null, honoraryTitle: null,
holdPost1: null, holdPost2: null, holdPost3: null, telephone: null, fax: null, email: null, holdPost1: null, holdPost2: null, holdPost3: null, mobile: null, fax: null, email: null,
} }
break; break;
case 1: case 1:
......
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