Commit 23d69457 authored by 徐俊's avatar 徐俊

xujun

parent 8dd452d4
...@@ -485,6 +485,12 @@ export default { ...@@ -485,6 +485,12 @@ export default {
save (params) { save (params) {
return fetch(`/v1/science-admin/com-talent-apply/save`, params, 'post', 'json') return fetch(`/v1/science-admin/com-talent-apply/save`, params, 'post', 'json')
}, },
delete (params) {
return fetch(`/v1/science-admin/com-talent-apply/delete/${params.id}`, params, 'delete', 'json')
},
report (params) {
return fetch(`/v1/science-admin/com-talent-apply/report`, params, 'post', 'json')
},
}, },
task: { task: {
getListByPage (params) { getListByPage (params) {
...@@ -791,6 +797,9 @@ export default { ...@@ -791,6 +797,9 @@ export default {
save (params) { save (params) {
return fetch(`/v1/science-admin/system-set/save`, params, 'post', 'json') return fetch(`/v1/science-admin/system-set/save`, params, 'post', 'json')
}, },
getTalentTraningInfo (params) {
return fetch(`/v1/science-admin/system-set/getTalentTraningInfo`, params)
},
}, },
parameter: { parameter: {
getListByPage (params) { getListByPage (params) {
......
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
<a-popconfirm title="确定要上报吗?" v-if="((record.talentState == 10 || record.talentState == 30))" ok-text="确定" cancel-text="取消" @confirm="recordClick(record,'report')"> <a-popconfirm title="确定要上报吗?" v-if="((record.talentState == 10 || record.talentState == 30))" ok-text="确定" cancel-text="取消" @confirm="recordClick(record,'report')">
<a-button type="link" size="small">上报</a-button> <a-button type="link" size="small">上报</a-button>
</a-popconfirm> </a-popconfirm>
<a-button type="link" size="small" v-if="record.talentState <= 10" @click="recordClick(record,'delete')">删除</a-button>
</template> </template>
</a-table> </a-table>
<a-pagination v-if="pagination.total > 0" :total="pagination.total" show-size-changer show-quick-jumper v-model="pagination.pageIndex" :page-size="pagination.pageSize" :page-size-options="pagination.pageSizeOptions" @showSizeChange="showSizeChange" @change="change" :showTotal="() => `共 ${pagination.total} 条`" /> <a-pagination v-if="pagination.total > 0" :total="pagination.total" show-size-changer show-quick-jumper v-model="pagination.pageIndex" :page-size="pagination.pageSize" :page-size-options="pagination.pageSizeOptions" @showSizeChange="showSizeChange" @change="change" :showTotal="() => `共 ${pagination.total} 条`" />
...@@ -179,7 +180,36 @@ export default { ...@@ -179,7 +180,36 @@ export default {
this.id = record.id this.id = record.id
this.visibleEdit = true this.visibleEdit = true
} else if (type === 'delete') { } else if (type === 'delete') {
let self = this
this.$confirm({
title: '',
content: '确定要删除该人才申报记录?',
okText: '确定',
okType: 'danger',
cancelText: '取消',
onOk () {
self.loading = true
let par = { id: record.id }
self.$api.talent.delete(par).then(({ code, data }) => {
if (data) {
self.$message.success('删除成功!')
self.getListByPage()
}
self.loading = false
}).catch(() => { self.loading = false })
},
onCancel () {
},
})
} else if (type === 'report') {
this.loading = true
this.$api.talent.report({ auditObjectId: record.id, auditType: 6 }).then(({ data = {} }) => {
if (data) {
this.$message.success('上报成功!')
this.getListByPage()
}
this.loading = false
}).catch(() => { this.loading = false })
} }
}, },
exportData() { exportData() {
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<div class="special-middle"> <div class="special-middle">
<div> <div>
<a-form-model-item prop="talentCategory"> <a-form-model-item prop="talentCategory">
<para-select v-model="formData.talentCategory" :typeId="21" :width="180" /> <para-select v-model="formData.talentCategory" :typeId="21" @change="talentCategoryChange" :width="180" />
</a-form-model-item> </a-form-model-item>
</div> </div>
</div> </div>
...@@ -584,6 +584,17 @@ export default { ...@@ -584,6 +584,17 @@ export default {
scientificList: [], scientificList: [],
fileList: [], fileList: [],
}, },
talentTraningInfo: {
HTTalent: null,
ALTalent: null,
RTTalent: null,
ALTrainingYear: null,
ALEveryYearFee: null,
HTTrainingYear: null,
HTEveryYearFee: null,
RTTrainingYear: null,
RTEveryYearFee: null,
},
rules: { rules: {
talentCategory: [{ required: true, message: '*', trigger: 'change' },], talentCategory: [{ required: true, message: '*', trigger: 'change' },],
certId: [{ required: true, message: '*', trigger: 'blur' },], certId: [{ required: true, message: '*', trigger: 'blur' },],
...@@ -612,9 +623,12 @@ export default { ...@@ -612,9 +623,12 @@ export default {
planTarget: [{ required: true, message: '*', trigger: 'blur' }], planTarget: [{ required: true, message: '*', trigger: 'blur' }],
unitAdvice: [{ required: true, message: '*', trigger: 'blur' }], unitAdvice: [{ required: true, message: '*', trigger: 'blur' }],
}, },
talentTypeId: -1,
}; };
}, },
created () { created () {
this.getTalentTraningInfo()
if (this.value) if (this.value)
this.getTalentApplyById() this.getTalentApplyById()
else else
...@@ -622,6 +636,14 @@ export default { ...@@ -622,6 +636,14 @@ export default {
}, },
methods: { methods: {
moment, moment,
getTalentTraningInfo () {
this.$api.systemSet.getTalentTraningInfo().then(({ data = {} }) => {
if (data) {
this.talentTraningInfo = data
console.log(this.talentTraningInfo)
}
})
},
getNewTalentApply() { getNewTalentApply() {
this.$api.talent.getNewTalentApply({ }).then(({ data = {} }) => { this.$api.talent.getNewTalentApply({ }).then(({ data = {} }) => {
if (data) { if (data) {
...@@ -642,13 +664,16 @@ export default { ...@@ -642,13 +664,16 @@ export default {
this.$api.talent.getTalentApplyById({ id: this.value }).then(({ data = {} }) => { this.$api.talent.getTalentApplyById({ id: this.value }).then(({ data = {} }) => {
if (data) { if (data) {
// 处理字符串转数组 // 处理字符串转数组
let talentType = null
if (typeof data.talentType === 'string' && data.talentType) { if (typeof data.talentType === 'string' && data.talentType) {
data.talentType = data.talentType.split(',') data.talentType = data.talentType.split(',')
talentType = [...data.talentType]
} }
if (typeof data.graduateTeacher === 'string' && data.graduateTeacher) { if (typeof data.graduateTeacher === 'string' && data.graduateTeacher) {
data.graduateTeacher = data.graduateTeacher.split(',') data.graduateTeacher = data.graduateTeacher.split(',')
} }
this.formData = data this.formData = data
this.talentCategoryHolder(talentType)
this.$emit('onStepChange', { step: 0, state: data.completeStatus }) this.$emit('onStepChange', { step: 0, state: data.completeStatus })
this.loadList() this.loadList()
} else { } else {
...@@ -893,37 +918,25 @@ export default { ...@@ -893,37 +918,25 @@ export default {
}, },
FundChange() { FundChange() {
this.formData.totalFund = this.formData.applyFund + this.formData.otherFund this.formData.totalFund = this.formData.applyFund + this.formData.otherFund
} },
}, talentCategoryChange() {
computed: { this.talentCategoryHolder(null)
talentTypeId() { },
if (this.formData.talentCategory === '57de1220-ff12-11ef-b6cb-0c42a1380f01' || talentCategoryHolder(talentType) {
this.formData.talentCategory === '57de1220-ff12-11ef-b6cb-0c42a1380f03') { if (this.formData.talentCategory === this.talentTraningInfo.HTTalent ||
return 23; this.formData.talentCategory === this.talentTraningInfo.RTTalent) {
} else if (this.formData.talentCategory === '57de1220-ff12-11ef-b6cb-0c42a1380f02') { this.talentTypeId = 23
return 16; } else if (this.formData.talentCategory === this.talentTraningInfo.ALTalent) {
this.talentTypeId = 16
} else { } else {
return 16; this.talentTypeId = 16
} }
if (talentType)
this.formData.talentType = talentType
else
this.formData.talentType = []
} }
}, },
watch: {
'formData.talentCategory': {
handler(newVal, oldVal) {
if (newVal !== oldVal) {
// 清空选择
this.formData.talentType = [];
// 添加一个短暂的延迟,确保组件有时间响应变化
// this.$nextTick(() => {
// // 可以在这里添加一些额外的逻辑,如果需要的话
// console.log('人才类别已更改为:', newVal);
// console.log('当前使用的 typeId:', this.talentTypeId);
// });
}
},
immediate: true
}
}
}; };
</script> </script>
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