Commit a3621e74 authored by 徐俊's avatar 徐俊

xujun

parent 0d39c453
...@@ -205,6 +205,9 @@ export default { ...@@ -205,6 +205,9 @@ export default {
getPersonById (params) { getPersonById (params) {
return fetch(`/v1/science-admin/com-person/getPersonById`, params) return fetch(`/v1/science-admin/com-person/getPersonById`, params)
}, },
getPersonByCertId (params) {
return fetch(`/v1/science-admin/com-person/getPersonByCertId`, params)
},
getAppPersonInfo () { getAppPersonInfo () {
return fetch('/v1/science-admin/com-person/getAppPersonInfo') return fetch('/v1/science-admin/com-person/getAppPersonInfo')
}, },
......
...@@ -15,11 +15,25 @@ ...@@ -15,11 +15,25 @@
<div>身份证号</div> <div>身份证号</div>
</div> </div>
</a-col> </a-col>
<a-col :span="21"> <a-col :span="5">
<div class="special-middle"> <div class="special-middle">
<div> <div>
<a-form-model-item prop="address"> <a-form-model-item prop="address">
<a-input v-model="formData.certId" :maxLength="18" style="width: 200px;" /> <a-input v-model="formData.certId" @change="onCertIdChange" :maxLength="18" style="width: 200px;" />
</a-form-model-item>
</div>
</div>
</a-col>
<a-col :span="3" class="bg-gray">
<div class="special-middle">
<div>人才类别</div>
</div>
</a-col>
<a-col :span="13">
<div class="special-middle">
<div>
<a-form-model-item prop="talentCategory">
<para-select v-model="formData.talentCategory" :typeId="21" :width="180" />
</a-form-model-item> </a-form-model-item>
</div> </div>
</div> </div>
...@@ -63,7 +77,7 @@ ...@@ -63,7 +77,7 @@
<div class="special-middle"> <div class="special-middle">
<div> <div>
<a-form-model-item prop="nation"> <a-form-model-item prop="nation">
<base-select v-model="formData.nation" :type="11" :isAll="true" :width="120" /> <para-select v-model="formData.nation" :typeId="11" :width="180" />
</a-form-model-item> </a-form-model-item>
</div> </div>
</div> </div>
...@@ -393,6 +407,8 @@ export default { ...@@ -393,6 +407,8 @@ export default {
holdPost2: null, holdPost2: null,
holdPost3: null, holdPost3: null,
telephone: null, telephone: null,
fax: null,
email: null,
}, },
rules: { rules: {
certId: [{ required: true, message: '*', trigger: 'blur' },], certId: [{ required: true, message: '*', trigger: 'blur' },],
...@@ -424,8 +440,40 @@ export default { ...@@ -424,8 +440,40 @@ export default {
}, },
methods: { methods: {
moment, moment,
save (step) { getPersonByCertId() {
if (this.formData.certId == "" || this.formData.certId == null)
return
this.loading = true
this.$api.person.getPersonByCertId({ certId: this.formData.certId }).then(({ data = {} }) => {
if (data) {
console.log(data)
this.formData = data
}
this.loading = false
}).catch(() => { this.loading = false })
},
onCertIdChange () {
this.getPersonByCertId()
},
save (step) {
if (this.checkInfo(step)) {
var obj = this.getObj(step)
obj.step = step
this.$emit('load', true)
let pars = isEmptyParams(obj)
let par = { ...pars }
this.$api.talent.save(par).then(({ data = {} }) => {
if (data) {
this.formData.id = data
this.$message.success('保存成功!')
this.$emit('close', 'save')
}
this.$emit('load', false)
}).catch(() => {
this.$emit('load', false)
})
}
}, },
submit (step, next) { submit (step, next) {
if (this.checkInfo(step)) { if (this.checkInfo(step)) {
...@@ -464,6 +512,32 @@ export default { ...@@ -464,6 +512,32 @@ export default {
}) })
} }
}, },
getObj (step) {
var obj = null
switch (step) {
case 0:
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,
}
break;
case 1:
break;
case 2:
break;
case 3:
break;
case 4:
break;
case 5:
break;
}
Object.keys(obj).forEach(key => {
obj[key] = this.formData[key];
})
return obj
},
checkInfo (step) { checkInfo (step) {
switch (step) { switch (step) {
case 0: case 0:
......
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