Commit 0eca14b7 authored by wangxl's avatar wangxl

333

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