|
@@ -135,13 +135,15 @@
|
|
|
@close="showUploadDialog = false"
|
|
|
@submit="handleSubmitAttachment"
|
|
|
>
|
|
|
+ <div class="color-warning mb-3" style="font-size: 13px;">* 仅支持.doc, .docx, .pdf文件且大小不能超过20MB</div>
|
|
|
<CtForm ref="CtFormRef" :items="formItems">
|
|
|
<template #uploadFile="{ item }">
|
|
|
<TextInput v-model="item.value" :item="item" @click="openFileInput"></TextInput>
|
|
|
<File ref="uploadFile" @success="handleUploadResume"></File>
|
|
|
</template>
|
|
|
</CtForm>
|
|
|
- <div class="color-666" style="font-size: 13px;">* 仅支持.doc, .docx, .pdf文件且大小不能超过20MB</div>
|
|
|
+ <!-- 学生-实习到岗信息 -->
|
|
|
+ <studentDeliveryForm v-if="baseInfo?.type && Number(baseInfo.type) === 1" ref="studentDeliveryFormRef" />
|
|
|
</CtDialog>
|
|
|
|
|
|
<!-- 面试邀请 -->
|
|
@@ -177,7 +179,7 @@
|
|
|
|
|
|
<!-- 选择附件简历投递 -->
|
|
|
<CtDialog :visible="showResume" :widthType="2" titleClass="text-h6" title="发送简历" @close="showResume = false; selectResume = null; enRequestPositionInfo = {}" @submit="handleSubmitResume">
|
|
|
- <div style="position: relative; min-height: 200px">
|
|
|
+ <div style="position: relative;">
|
|
|
<v-radio-group v-model="selectResume">
|
|
|
<div v-for="val in resumeList" :key="val.id" class="d-flex align-center radioBox">
|
|
|
<v-radio :label="val.title" :value="val.id" color="primary"></v-radio>
|
|
@@ -185,6 +187,7 @@
|
|
|
</div>
|
|
|
</v-radio-group>
|
|
|
</div>
|
|
|
+ <studentDeliveryForm v-if="baseInfo?.type && Number(baseInfo?.type) === 1" ref="studentDeliveryFormRef" />
|
|
|
</CtDialog>
|
|
|
<Loading :visible="pageLoading" />
|
|
|
</template>
|
|
@@ -220,6 +223,7 @@ import { dealDictArrayData } from '@/utils/position'
|
|
|
import { previewFile } from '@/utils'
|
|
|
import { timesTampChange } from '@/utils/date'
|
|
|
import { useRouter } from 'vue-router'
|
|
|
+import studentDeliveryForm from '@/views/recruit/personal/components/studentDeliveryForm.vue'
|
|
|
|
|
|
const { t } = useI18n()
|
|
|
const chatRef = ref()
|
|
@@ -236,6 +240,8 @@ const channelItem = ref(null)
|
|
|
const messageItems = ref([])
|
|
|
const pageSize = ref(1)
|
|
|
const hasMore = ref(false)
|
|
|
+const studentDeliveryFormRef = ref()
|
|
|
+const baseInfo = ref(localStorage.getItem('baseInfo') ? JSON.parse(localStorage.getItem('baseInfo')) : {})
|
|
|
|
|
|
const positionList = ref([])
|
|
|
const showTip = ref(false)
|
|
@@ -624,77 +630,112 @@ const handleSubmitAttachment = async () => {
|
|
|
obj[e.key] = e.truthValue || e.value
|
|
|
})
|
|
|
if (!obj.title || !obj.url) return
|
|
|
- await savePersonResumeCv(obj)
|
|
|
- const text = {
|
|
|
- remark: '发送简历',
|
|
|
- query: {
|
|
|
- src: obj.url,
|
|
|
- title: obj.title
|
|
|
- },
|
|
|
- type: 1
|
|
|
+
|
|
|
+ // 学生实习到岗信息
|
|
|
+ let practice = {}
|
|
|
+ if (baseInfo.value?.type && Number(baseInfo.value?.type) === 1) {
|
|
|
+ practice = studentDeliveryFormRef.value.getQueryParams()
|
|
|
+ console.log(practice, '上传简历-到岗信息')
|
|
|
}
|
|
|
- if (enRequestPositionInfo.value) text.query.positionInfo = enRequestPositionInfo.value
|
|
|
- send (JSON.stringify(text), channelItem.value, 105)
|
|
|
+ if (practice && Object.keys(practice).length > 0 && !practice.practiceStartTime || !practice.practiceEndTime) return Snackbar.warning('请完善实习到岗信息')
|
|
|
+
|
|
|
+ // 保存附件
|
|
|
+ await savePersonResumeCv(obj)
|
|
|
|
|
|
// 简历投递至简历库
|
|
|
if (isEmployment.value !== '-1') {
|
|
|
- await jobCvRelHireSend({
|
|
|
+ let params = {
|
|
|
jobId: positionInfo.value.id || selectJobId.value,
|
|
|
url: obj.url,
|
|
|
recommendUserId: isEmployment.value
|
|
|
- })
|
|
|
+ }
|
|
|
+ // 如果是学生则需要带上实习信息
|
|
|
+ if (practice && Object.keys(practice).length > 0) params = Object.assign(params, practice)
|
|
|
+ await jobCvRelHireSend(params)
|
|
|
} else {
|
|
|
const jobId = enRequestPositionInfo.value && enRequestPositionInfo.value?.id ? enRequestPositionInfo.value?.id : positionInfo.value.id || selectJobId.value
|
|
|
const type = (enRequestPositionInfo.value && Object.keys(enRequestPositionInfo.value).length ? enRequestPositionInfo.value.hire : positionInfo.value.hire) ? 1 : 0
|
|
|
- await jobCvRelSend({
|
|
|
+ let params = {
|
|
|
jobId,
|
|
|
title: obj.title,
|
|
|
url: obj.url,
|
|
|
type
|
|
|
- })
|
|
|
+ }
|
|
|
+ // 如果是学生则需要带上实习信息
|
|
|
+ if (practice && Object.keys(practice).length > 0) params = Object.assign(params, practice)
|
|
|
+ await jobCvRelSend(params)
|
|
|
}
|
|
|
handleChangeSendResumeStatus(true)
|
|
|
showUploadDialog.value = false
|
|
|
- enRequestPositionInfo.value = {}
|
|
|
-}
|
|
|
|
|
|
-async function handleSubmitResume () {
|
|
|
- if (!selectResume.value) {
|
|
|
- Snackbar.error(t('resume.selectResumeToSubmit'))
|
|
|
- return
|
|
|
- }
|
|
|
- const _info = resumeList.value.find((item) => item.id === selectResume.value)
|
|
|
const text = {
|
|
|
remark: '发送简历',
|
|
|
query: {
|
|
|
- src: _info.url,
|
|
|
- title: _info.title,
|
|
|
- id: _info.id,
|
|
|
+ src: obj.url,
|
|
|
+ title: obj.title
|
|
|
},
|
|
|
type: 1
|
|
|
}
|
|
|
if (enRequestPositionInfo.value) text.query.positionInfo = enRequestPositionInfo.value
|
|
|
send (JSON.stringify(text), channelItem.value, 105)
|
|
|
|
|
|
+ enRequestPositionInfo.value = {}
|
|
|
+}
|
|
|
+
|
|
|
+async function handleSubmitResume () {
|
|
|
+ if (!selectResume.value) {
|
|
|
+ Snackbar.warning(t('resume.selectResumeToSubmit'))
|
|
|
+ return
|
|
|
+ }
|
|
|
+ const _info = resumeList.value.find((item) => item.id === selectResume.value)
|
|
|
+
|
|
|
+ // 学生实习到岗信息
|
|
|
+ let practice = {}
|
|
|
+ if (baseInfo.value?.type && Number(baseInfo.value?.type) === 1) {
|
|
|
+ practice = studentDeliveryFormRef.value.getQueryParams()
|
|
|
+ console.log(practice, '选择简历-到岗信息')
|
|
|
+ }
|
|
|
+ if (practice && Object.keys(practice).length > 0 && !practice.practiceStartTime || !practice.practiceEndTime) return Snackbar.warning('请完善实习到岗信息')
|
|
|
+
|
|
|
// 简历投递至简历库
|
|
|
if (isEmployment.value !== '-1') {
|
|
|
- await jobCvRelHireSend({
|
|
|
+ let params = {
|
|
|
jobId: positionInfo.value.id || selectJobId.value,
|
|
|
url: _info.url,
|
|
|
recommendUserId: isEmployment.value
|
|
|
- })
|
|
|
+ }
|
|
|
+ // 如果是学生则需要带上实习信息
|
|
|
+ if (practice && Object.keys(practice).length > 0) params = Object.assign(params, practice)
|
|
|
+ await jobCvRelHireSend(params)
|
|
|
} else {
|
|
|
const jobId = enRequestPositionInfo.value && enRequestPositionInfo.value?.id ? enRequestPositionInfo.value?.id : positionInfo.value.id || selectJobId.value
|
|
|
const type = (enRequestPositionInfo.value && Object.keys(enRequestPositionInfo.value).length ? enRequestPositionInfo.value.hire : positionInfo.value.hire) ? 1 : 0
|
|
|
- await jobCvRelSend({
|
|
|
+ let params = {
|
|
|
jobId,
|
|
|
title: _info.title,
|
|
|
url: _info.url,
|
|
|
type
|
|
|
- })
|
|
|
+ }
|
|
|
+ // 如果是学生则需要带上实习信息
|
|
|
+ if (practice && Object.keys(practice).length > 0) params = Object.assign(params, practice)
|
|
|
+
|
|
|
+ await jobCvRelSend(params)
|
|
|
}
|
|
|
handleChangeSendResumeStatus(true)
|
|
|
showResume.value = false
|
|
|
+
|
|
|
+ const text = {
|
|
|
+ remark: '发送简历',
|
|
|
+ query: {
|
|
|
+ src: _info.url,
|
|
|
+ title: _info.title,
|
|
|
+ id: _info.id,
|
|
|
+ },
|
|
|
+ type: 1
|
|
|
+ }
|
|
|
+ if (enRequestPositionInfo.value) text.query.positionInfo = enRequestPositionInfo.value
|
|
|
+ send (JSON.stringify(text), channelItem.value, 105)
|
|
|
+
|
|
|
enRequestPositionInfo.value = {}
|
|
|
}
|
|
|
|