Commit 0eca14b7 authored by wangxl's avatar wangxl

333

parent 7b580a66
......@@ -494,6 +494,9 @@ export default {
report (params) {
return fetch(`/v1/science-admin/com-talent-apply/report`, params, 'post', 'json')
},
isTalentExist () {
return fetch(`/v1/science-admin/com-talent-apply/isTalentExist`)
},
},
task: {
getListByPage (params) {
......
......@@ -56,7 +56,7 @@ export default {
components: {
talentCreate, talentView
},
data() {
data () {
return {
form: this.$form.createForm(this, { name: 'advanced_search' }),
activekey: '1',
......@@ -118,7 +118,7 @@ export default {
this.tableData = dataList
this.pagination.total = total
this.loading = false
} this.loading = false
}).catch(() => { this.loading = false })
},
......@@ -156,8 +156,17 @@ export default {
this.getListByPage()
},
ApplyTalent () {
this.id = null
this.visibleEdit = true
this.$api.talent.isTalentExist({}).then(({ data = {} }) => {
console.log(data)
if (data) {
this.$message.error('请勿重复填报!')
} else {
this.id = null
this.visibleEdit = true
}
}).catch(() => {
this.$message.error('500 Internal Server Error!')
})
},
closeWindow (value) {
if (value === 'submit') {
......@@ -212,7 +221,7 @@ export default {
}).catch(() => { this.loading = false })
}
},
exportData() {
exportData () {
}
}
......
......@@ -18,9 +18,10 @@
<a-col :span="5">
<div class="special-middle">
<div>
<a-form-model-item prop="certId">
<a-input v-model="formData.certId" @change="onCertIdChange" :maxLength="18" style="width: 200px;" />
</a-form-model-item>
{{ formData.certId }}
<!-- <a-form-model-item prop="certId">
<a-input v-model="formData.certId" :maxLength="18" style="width: 200px;" />
</a-form-model-item> -->
</div>
</div>
</a-col>
......@@ -48,9 +49,10 @@
<a-col :span="5">
<div class="special-middle">
<div>
<a-form-model-item prop="personName">
{{ formData.personName }}
<!-- <a-form-model-item prop="personName">
<a-input placeholder="姓名(限10字)" v-model="formData.personName" :maxLength="10" style="width:80%" />
</a-form-model-item>
</a-form-model-item> -->
</div>
</div>
</a-col>
......@@ -165,7 +167,7 @@
<div class="special-middle">
<div>
<a-form-model-item prop="graduateTeacher">
<para-check v-model="formData.graduateTeacher" :typeId="18" :disabled="false" />
<para-check v-model="formData.graduateTeacher" :typeId="15" :disabled="false" />
</a-form-model-item>
</div>
</div>
......@@ -309,9 +311,10 @@
<a-col :span="8">
<div class="special-middle">
<div>
<a-form-model-item prop="mobile">
{{ formData.mobile }}
<!-- <a-form-model-item prop="mobile">
<a-input v-model="formData.mobile" :maxLength="50" style="width:80%" />
</a-form-model-item>
</a-form-model-item> -->
</div>
</div>
</a-col>
......@@ -322,7 +325,7 @@
<div class="special-middle">
<div>
<a-form-model-item prop="fax">
<a-input v-model="formData.fax" :maxLength="50" style="width:80%" />
<a-input v-model="formData.fax" :maxLength="50" style="width:240px" />
</a-form-model-item>
</div>
</div>
......@@ -336,7 +339,7 @@
<div class="special-middle">
<div>
<a-form-model-item prop="email">
<a-input v-model="formData.email" :maxLength="50" style="width:40%" />
<a-input v-model="formData.email" :maxLength="50" style="width:240px" />
</a-form-model-item>
</div>
</div>
......@@ -633,88 +636,59 @@ export default {
};
},
created () {
this.getTalentTraningInfo()
if (this.value)
this.getTalentApplyById()
else
this.getNewTalentApply()
this.getTalentInfo()
},
methods: {
moment,
getTalentTraningInfo () {
this.$api.systemSet.getTalentTraningInfo().then(({ data = {} }) => {
if (data) {
this.talentTraningInfo = data
}
})
},
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) {
// 处理字符串转数组
let talentType = null
if (typeof data.talentType === 'string' && data.talentType) {
data.talentType = data.talentType.split(',')
talentType = [...data.talentType]
getTalentInfo () {
this.$emit('load', true)
if (!!this.value) {
this.$api.talent.getTalentApplyById({ id: this.value }).then(({ data = {} }) => {
if (data) {
// 处理字符串转数组
let talentType = null
if (typeof data.talentType === 'string' && data.talentType) {
data.talentType = data.talentType.split(',')
talentType = [...data.talentType]
}
if (typeof data.graduateTeacher === 'string' && data.graduateTeacher) {
data.graduateTeacher = data.graduateTeacher.split(',')
}
this.formData = data
this.talentCategoryHolder(talentType)
this.$emit('onStepChange', { step: 0, state: data.completeStatus })
this.loadList()
} else {
this.$emit('close', 'error')
}
if (typeof data.graduateTeacher === 'string' && data.graduateTeacher) {
data.graduateTeacher = data.graduateTeacher.split(',')
this.$emit('load', false)
}).catch(() => {
this.$emit('close', 'error')
this.$emit('load', false)
})
} else {
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.formData = data
this.talentCategoryHolder(talentType)
this.$emit('onStepChange', { step: 0, state: data.completeStatus })
this.loadList()
} else {
this.$emit('load', false)
}).catch(() => {
this.$emit('close', 'error')
}
this.$emit('load', false)
}).catch(() => {
this.$emit('close', 'error')
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 = {} }) => {
getTalentTraningInfo () {
this.$api.systemSet.getTalentTraningInfo().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
this.talentTraningInfo = data
}
this.loading = false
}).catch(() => { this.loading = false })
})
},
loadList () {
if (!!!this.formData.membersList || this.formData.membersList.length == 0)
......@@ -732,9 +706,6 @@ export default {
if (!!!this.formData.fileList || this.formData.fileList.length == 0)
this.formData.fileList = []
},
onCertIdChange () {
this.getPersonByCertId()
},
save (step) {
if (this.checkInfo(step)) {
var obj = this.getObj(step)
......@@ -895,14 +866,7 @@ export default {
checkInfo (step) {
switch (step) {
case 0:
if (this.formData.certId == "" || this.formData.certId == null) {
alert('身份证号不能为空')
return false
}
if (this.formData.personName == "" || this.formData.personName == null) {
alert('人员姓名不能为空')
return false
} else return true
return true
break;
case 1:
return this.checkResumeList()
......
......@@ -141,7 +141,7 @@
<a-col :span="5">
<div class="special-middle">
<div>
<para-check v-model="value.graduateTeacher" :typeId="18" :disabled="true" />
<para-check v-model="value.graduateTeacher" :typeId="15" :disabled="true" />
</div>
</div>
</a-col>
......
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