Commit f0fc85de authored by 徐俊's avatar 徐俊

xujun

parent 2ed58a7f
......@@ -53,13 +53,13 @@ export default {
})
},
getSpecInfo (key) {
console.log(this.specArray, this.value,1)
//console.log(this.specArray, this.value,1)
let newArray = this.specArray.filter(
function (el) {
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)
return [newArray[0].ppkey, newArray[0].pkey, newArray[0].key]
else
......@@ -85,6 +85,7 @@ export default {
value: {
handler (value) {
if (!!value) {
this.loadSpecList()
// this.selected = getSpecArray(this.value)
// if (!!this.selected && this.selected.length == 3) {
// this.$emit("input", this.selected[2])
......
......@@ -482,6 +482,33 @@ export default {
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 () {
if (!!!this.formData.membersList || this.formData.membersList.length == 0)
this.formData.membersList = []
......@@ -498,21 +525,6 @@ export default {
if (!!!this.formData.fileList || this.formData.fileList.length == 0)
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 () {
this.getPersonByCertId()
},
......@@ -548,10 +560,9 @@ export default {
let state = obj.projState
if (state != 30 && step == 5)
obj.projState = 10
console.log(obj)
let pars = isEmptyParams(obj)
let par = { ...pars }
console.log(par)
// this.$api.talent.save(par).then(({ data = {} }) => {
// if (data) {
// this.formData.id = data
......@@ -634,43 +645,6 @@ export default {
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 () {
},
......
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