Commit f0fc85de authored by 徐俊's avatar 徐俊

xujun

parent 2ed58a7f
...@@ -53,13 +53,13 @@ export default { ...@@ -53,13 +53,13 @@ export default {
}) })
}, },
getSpecInfo (key) { getSpecInfo (key) {
console.log(this.specArray, this.value,1) //console.log(this.specArray, this.value,1)
let newArray = this.specArray.filter( let newArray = this.specArray.filter(
function (el) { function (el) {
return el.key == key return el.key == key
} }
); );
console.log(this.specArray, newArray, this.value,2) //console.log(this.specArray, newArray, this.value,2)
if (!!newArray && newArray.length > 0) if (!!newArray && newArray.length > 0)
return [newArray[0].ppkey, newArray[0].pkey, newArray[0].key] return [newArray[0].ppkey, newArray[0].pkey, newArray[0].key]
else else
...@@ -85,6 +85,7 @@ export default { ...@@ -85,6 +85,7 @@ export default {
value: { value: {
handler (value) { handler (value) {
if (!!value) { if (!!value) {
this.loadSpecList()
// this.selected = getSpecArray(this.value) // this.selected = getSpecArray(this.value)
// if (!!this.selected && this.selected.length == 3) { // if (!!this.selected && this.selected.length == 3) {
// this.$emit("input", this.selected[2]) // this.$emit("input", this.selected[2])
......
...@@ -444,7 +444,7 @@ export default { ...@@ -444,7 +444,7 @@ export default {
}; };
}, },
created () { created () {
if (this.value) if (this.value)
this.getTalentApplyById() this.getTalentApplyById()
else else
this.getNewTalentApply() this.getNewTalentApply()
...@@ -482,6 +482,33 @@ export default { ...@@ -482,6 +482,33 @@ export default {
this.$emit('load', false) this.$emit('load', false)
}) })
}, },
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) {
this.formData.personId = data.id
this.formData.personName = data.personName
this.formData.sex = data.sex
this.formData.nation = data.nation
this.formData.birthday = data.birthday
this.formData.degree = data.degree
this.formData.degreeTime = data.degreeTime
this.formData.degreeUnit = data.degreeUnit
this.formData.graduateTeacher = data.graduateTeacher
this.formData.politicalParty = data.politicalParty
this.formData.title = data.title
this.formData.spec = data.spec
this.formData.mobile = data.mobile
this.formData.email = data.email
this.formData.fax = data.fax
console.log(this.formData)
}
this.loading = false
}).catch(() => { this.loading = false })
},
loadList () { loadList () {
if (!!!this.formData.membersList || this.formData.membersList.length == 0) if (!!!this.formData.membersList || this.formData.membersList.length == 0)
this.formData.membersList = [] this.formData.membersList = []
...@@ -498,21 +525,6 @@ export default { ...@@ -498,21 +525,6 @@ export default {
if (!!!this.formData.fileList || this.formData.fileList.length == 0) if (!!!this.formData.fileList || this.formData.fileList.length == 0)
this.formData.fileList = [] this.formData.fileList = []
}, },
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) {
this.formData = data
this.formData.personId = data.id
this.formData.id = this.value
console.log(this.formData)
}
this.loading = false
}).catch(() => { this.loading = false })
},
onCertIdChange () { onCertIdChange () {
this.getPersonByCertId() this.getPersonByCertId()
}, },
...@@ -548,10 +560,9 @@ export default { ...@@ -548,10 +560,9 @@ export default {
let state = obj.projState let state = obj.projState
if (state != 30 && step == 5) if (state != 30 && step == 5)
obj.projState = 10 obj.projState = 10
console.log(obj)
let pars = isEmptyParams(obj) let pars = isEmptyParams(obj)
let par = { ...pars } let par = { ...pars }
console.log(par)
// this.$api.talent.save(par).then(({ data = {} }) => { // this.$api.talent.save(par).then(({ data = {} }) => {
// if (data) { // if (data) {
// this.formData.id = data // this.formData.id = data
...@@ -634,43 +645,6 @@ export default { ...@@ -634,43 +645,6 @@ export default {
break; break;
} }
}, },
getTalent () {
this.$emit('load', true)
if (!!this.value) {
this.$api.talent.getTalentInfoById({ id: this.value }).then(({ data = {} }) => {
if (data) {
if (typeof data.talentType === 'string' && data.talentType) {
data.talentType = data.talentType.split(',')
}
if (typeof data.graduateTeacher === 'string' && data.graduateTeacher) {
data.graduateTeacher = data.graduateTeacher.split(',')
}
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)
})
} else {
this.$api.talent.getNewTalent({ projType: getType() }).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 () { loadList () {
}, },
......
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