|
@@ -196,6 +196,7 @@ const handleEliminate = async (item) => {
|
|
|
bizId: item.id,
|
|
|
jobId: item.job.id,
|
|
|
userId: item.userId,
|
|
|
+ jobCvRelId: props.tab === 0 ? item.id : item.cvRel?.id,
|
|
|
type: props.tab === 0 ? '0' : '1' // 投递简历0 已邀约1
|
|
|
}
|
|
|
// 招聘会职位则带id
|
|
@@ -217,7 +218,9 @@ const handleCancelEliminate = async (item) => {
|
|
|
}
|
|
|
|
|
|
// 查看简历
|
|
|
-const handlePreviewResume = async ({ url, id }) => {
|
|
|
+const handlePreviewResume = async (item) => {
|
|
|
+ const url = props.tab === 0 ? item.url : item.cvRel.url
|
|
|
+ const id = props.tab === 0 ? item.id : item.cvRel.id
|
|
|
if (!url || !id) return Snackbar.warning('简历不存在')
|
|
|
try {
|
|
|
const res = await personJobCvLook(id)
|
|
@@ -233,14 +236,14 @@ const handlePreviewResume = async ({ url, id }) => {
|
|
|
// 邀请面试
|
|
|
const itemData = ref({})
|
|
|
const handleInterviewInvite = (item) => {
|
|
|
- if (item.interViewStatus) return
|
|
|
- if (item?.jobClosed) return Snackbar.warning('职位已关闭') // 职位已关闭
|
|
|
+ if (item.handleStatus) return
|
|
|
+ if (item?.jobClosed) return // 职位已关闭
|
|
|
itemData.value = item
|
|
|
showInvite.value = true
|
|
|
}
|
|
|
|
|
|
const handleToCommunicate = async (item) => {
|
|
|
- if (item?.jobClosed) return Snackbar.warning('职位已关闭') // 职位已关闭
|
|
|
+ if (item?.jobClosed) return // 职位已关闭
|
|
|
const userId = item.userId
|
|
|
await talkToUser({userId, text: defaultTextEnt})
|
|
|
let url = `/recruit/enterprise/chatTools?id=${userId}`
|
|
@@ -258,6 +261,8 @@ const handleEditSubmit = async () => {
|
|
|
const query = inviteRef.value.getQuery()
|
|
|
if (!query?.time) return Snackbar.warning('请选择面试时间')
|
|
|
|
|
|
+ query.jobCvRelId = itemData.value.id
|
|
|
+
|
|
|
formLoading.value = true
|
|
|
try {
|
|
|
await saveInterviewInvite(query)
|
|
@@ -289,22 +294,45 @@ const handleToInterviewManagement = () => {
|
|
|
|
|
|
// 下载附件
|
|
|
const handleDownloadAttachment = (k) => {
|
|
|
- if (!k.url) return
|
|
|
- getBlob(k.url).then(blob => {
|
|
|
- saveAs(blob, k.title)
|
|
|
+ const url = props.tab === 0 ? k.url : k.cvRel?.url
|
|
|
+ if (!url) return
|
|
|
+ getBlob(url).then(blob => {
|
|
|
+ saveAs(blob, props.tab === 0 ? k.title : k.cvRel?.title)
|
|
|
})
|
|
|
}
|
|
|
|
|
|
const actionItems = (item) => {
|
|
|
const arr = []
|
|
|
- if (props.tab === 0) arr.push({ title: item.interViewStatus ? '邀请面试(当前投递记录已邀约面试)' : '邀请面试', disabled: item.interViewStatus, color: 'success', click: handleInterviewInvite, icon: 'mdi-account-clock-outline' }, { title: '立即沟通', color: 'primary', click: handleToCommunicate, icon: 'mdi-comment-processing-outline' })
|
|
|
+ // 有返回简历信息的才展示查看简历&下载简历
|
|
|
+ if ((props.tab === 0 && item.url) || (props.tab !== 0 && item?.cvRel && item.cvRel?.url)) arr.push(
|
|
|
+ { title: '查看附件', color: 'warning', click: handlePreviewResume, icon: 'mdi-eye-outline' },
|
|
|
+ { title: '下载附件', color: 'error', click: handleDownloadAttachment, icon: 'mdi-arrow-down-bold-circle-outline' }
|
|
|
+ )
|
|
|
+ if (props.tab === 0) {
|
|
|
+ arr.push(
|
|
|
+ {
|
|
|
+ title: item?.jobClosed ? '邀请面试(职位已关闭)' : (item.handleStatus ? '邀请面试(已邀面试或已标记为不合适)' : '邀请面试'),
|
|
|
+ disabled: item?.jobClosed || item.handleStatus,
|
|
|
+ color: 'success',
|
|
|
+ click: handleInterviewInvite,
|
|
|
+ icon: 'mdi-account-clock-outline'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: item?.jobClosed ? '立即沟通(职位已关闭)' : '立即沟通',
|
|
|
+ color: 'primary',
|
|
|
+ disabled: item?.jobClosed,
|
|
|
+ click: handleToCommunicate,
|
|
|
+ icon: 'mdi-comment-processing-outline'
|
|
|
+ }
|
|
|
+ )
|
|
|
+ }
|
|
|
if ([0, 1].includes(props.tab)) arr.push({ title: '不合适', color: 'indigo', click: handleEliminate, icon: 'mdi-account-remove-outline' })
|
|
|
if (props.tab === 4) arr.push({ title: '取消不合适', color: 'light-blue', click: handleCancelEliminate, icon: 'mdi-account-check-outline' })
|
|
|
if (props.tab === 2 && item?.job?.hire) arr.push({ title: '结算', click: handleSettlement, icon: 'mdi-currency-cny' })
|
|
|
if (props.tab === 1 && ['3', '4'].includes(item.status)) arr.push({ title: '入职', click: handleEnterByEnterprise, icon: 'mdi-account-arrow-right-outline' })
|
|
|
// 面试后才能够加入储备
|
|
|
if ([1, 2, 3].includes(props.tab) && !item.inTalentPool) arr.push({ title: '加入储备', color: '#00897B', click: handleJoinToTalentPool, icon: 'mdi-account-star-outline' })
|
|
|
- return [{ title: '查看附件', color: 'warning', click: handlePreviewResume, icon: 'mdi-eye-outline' }, { title: '下载附件', color: 'error', click: handleDownloadAttachment, icon: 'mdi-arrow-down-bold-circle-outline' }, ...arr]
|
|
|
+ return arr
|
|
|
}
|
|
|
</script>
|
|
|
|