Commit c85d48d0 authored by 徐俊's avatar 徐俊

xujun

parent 5b55bb04
......@@ -476,9 +476,15 @@ export default {
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) {
return fetch(`/v1/science-admin/com-talent-apply/save`, params, 'post', 'json')
}
},
},
task: {
getListByPage (params) {
......
......@@ -308,8 +308,8 @@
</a-col>
<a-col :span="8">
<div>
<a-form-model-item prop="telephone">
<a-input v-model="formData.telephone" :maxLength="50" style="width:80%" />
<a-form-model-item prop="mobile">
<a-input v-model="formData.mobile" :maxLength="50" style="width:80%" />
</a-form-model-item>
</div>
</a-col>
......@@ -409,7 +409,7 @@ export default {
holdPost1: null,
holdPost2: null,
holdPost3: null,
telephone: null,
mobile: null,
fax: null,
email: null,
resumeList: [],
......@@ -433,17 +433,67 @@ export default {
holdPost1: [{ required: true, message: '*', trigger: 'blur' },],
holdPost2: [{ 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' }],
email: [{ required: true, message: '*', trigger: 'blur' }],
},
};
},
created () {
if (this.value)
this.getTalentApplyById()
else
this.getNewTalentApply()
},
methods: {
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() {
if (this.formData.certId == "" || this.formData.certId == null)
return
......@@ -451,8 +501,10 @@ export default {
this.loading = true
this.$api.person.getPersonByCertId({ certId: this.formData.certId }).then(({ data = {} }) => {
if (data) {
console.log(data)
this.formData = data
this.formData.personId = data.id
console.log(this.formData)
}
this.loading = false
}).catch(() => { this.loading = false })
......@@ -524,7 +576,7 @@ export default {
obj = {
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,
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;
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