|
@@ -39,7 +39,7 @@
|
|
|
color="primary"
|
|
|
class="mb-2"
|
|
|
:active="val.channel.channelID === info?.channel?.channelID"
|
|
|
- :title="val.userInfoVo ? (val.userInfoVo.userInfoResp?.name ? val.userInfoVo.userInfoResp.name : '游客') : '系统消息'"
|
|
|
+ :title="val.userInfoVo ? (val.userInfoVo.userInfoResp?.name ? val.userInfoVo.userInfoResp.name : val.userInfoVo.userInfoResp?.phone) : '系统消息'"
|
|
|
:subtitle="timesTampChange(+val.timestamp.padEnd(13, '0'))"
|
|
|
>
|
|
|
<template v-slot:title="{ title }">
|
|
@@ -148,8 +148,13 @@
|
|
|
<InvitePage v-if="showInvite" ref="inviteRef" :item-data="itemData" :position="positionList"></InvitePage>
|
|
|
</CtDialog>
|
|
|
|
|
|
+ <!-- 求简历-选择求简历的职位 -->
|
|
|
+ <CtDialog :visible="showSelectPosition" :widthType="2" titleClass="text-h6" title="选择要求简历的职位" @close="showSelectPosition = false" @submit="handleRequestResumeSubmit">
|
|
|
+ <CtForm v-if="showSelectPosition" ref="requestFromRef" :items="requestFormItems"></CtForm>
|
|
|
+ </CtDialog>
|
|
|
+
|
|
|
<!-- 选择附件简历投递 -->
|
|
|
- <CtDialog :visible="showResume" :widthType="2" titleClass="text-h6" title="发送简历" @close="showResume = false; selectResume = null " @submit="handleSubmitResume">
|
|
|
+ <CtDialog :visible="showResume" :widthType="2" titleClass="text-h6" title="发送简历" @close="showResume = false; selectResume = null; enRequestPositionInfo = {}" @submit="handleSubmitResume">
|
|
|
<div style="position: relative; min-height: 200px">
|
|
|
<v-radio-group v-model="selectResume">
|
|
|
<v-radio v-for="val in resumeList" :key="val.id" :value="val.id" :label="val.title" color="primary"></v-radio>
|
|
@@ -204,9 +209,28 @@ const messageItems = ref([])
|
|
|
const pageSize = ref(1)
|
|
|
const hasMore = ref(false)
|
|
|
|
|
|
+const positionList = ref([])
|
|
|
const showInvite = ref(false)
|
|
|
+// 企业-求简历
|
|
|
+const showSelectPosition = ref(false)
|
|
|
+const requestFromRef = ref()
|
|
|
+const requestFormItems = ref({
|
|
|
+ options: [
|
|
|
+ {
|
|
|
+ type: 'autocomplete',
|
|
|
+ key: 'jobId',
|
|
|
+ value: null,
|
|
|
+ label: '招聘职位 *',
|
|
|
+ outlined: true,
|
|
|
+ clearable: false,
|
|
|
+ itemText: 'label',
|
|
|
+ itemValue: 'value',
|
|
|
+ rules: [v => !!v || '请选择招聘职位'],
|
|
|
+ items: positionList
|
|
|
+ }
|
|
|
+ ]
|
|
|
+})
|
|
|
|
|
|
-const positionList = ref([])
|
|
|
|
|
|
const showDelete = ref(false)
|
|
|
const itemData = ref({})
|
|
@@ -252,8 +276,8 @@ const showRightNoData = ref(false)
|
|
|
const info = ref({})
|
|
|
|
|
|
const enterpriseTools = ref([
|
|
|
- { name: '求简历', icon: 'mdi-email', color:"primary", loading: false, handle: handleRequest, disabled: false, disabledText: '简历已接收' },
|
|
|
- { name: '面试邀约', icon: 'mdi-email', color:"primary", loading: false, handle: handleInvite, disabled: false, disabledText: '面试邀约' }
|
|
|
+ { name: '求简历', key: 'requestResume', icon: 'mdi-email', color:"primary", loading: false, handle: handleInvite, disabled: false, disabledText: '简历已接收' },
|
|
|
+ { name: '面试邀约', key: 'interviewInvite', icon: 'mdi-email', color:"primary", loading: false, handle: handleInvite, disabled: false, disabledText: '面试邀约' }
|
|
|
])
|
|
|
|
|
|
const userTools = ref([
|
|
@@ -385,9 +409,9 @@ async function getMessageTypeSync () {
|
|
|
|
|
|
function handleChangeSendResumeStatus (status) {
|
|
|
if (!isEnterprise) {
|
|
|
- const item = userTools.value.find(e => e.key === 'sendResume')
|
|
|
- item.disabled = status
|
|
|
- }
|
|
|
+ const item = userTools.value.find(e => e.key === 'sendResume')
|
|
|
+ item.disabled = status
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
async function handleChange (items) {
|
|
@@ -442,6 +466,7 @@ const handleUploadResume = async (url, title, filename) => {
|
|
|
|
|
|
// 获取简历
|
|
|
const showUploadDialog = ref(false)
|
|
|
+const enRequestPositionInfo = ref({}) // 企业求简历时选中的职位信息
|
|
|
async function handleSendResume (item) {
|
|
|
try {
|
|
|
item.loading = true
|
|
@@ -453,6 +478,7 @@ async function handleSendResume (item) {
|
|
|
return
|
|
|
}
|
|
|
resumeList.value = result
|
|
|
+ if (item?.content?.query?.positionInfo?.data && Object.keys(item?.content?.query?.positionInfo?.data).length) enRequestPositionInfo.value = item?.content?.query?.positionInfo?.data
|
|
|
showResume.value = true
|
|
|
} finally {
|
|
|
item.loading = false
|
|
@@ -481,7 +507,6 @@ const handleSubmitAttachment = async () => {
|
|
|
})
|
|
|
if (!obj.title || !obj.url) return
|
|
|
await savePersonResumeCv(obj)
|
|
|
- showUploadDialog.value = false
|
|
|
const text = {
|
|
|
remark: '发送简历',
|
|
|
query: {
|
|
@@ -490,7 +515,29 @@ const handleSubmitAttachment = async () => {
|
|
|
},
|
|
|
type: 1
|
|
|
}
|
|
|
+ if (enRequestPositionInfo.value) text.query.positionInfo = enRequestPositionInfo.value
|
|
|
send (JSON.stringify(text), channelItem.value, 105)
|
|
|
+
|
|
|
+ // 简历投递至简历库
|
|
|
+ if (isEmployment.value !== '-1') {
|
|
|
+ await jobCvRelHireSend({
|
|
|
+ jobId: positionInfo.value.id,
|
|
|
+ url: obj.url,
|
|
|
+ recommendUserId: isEmployment.value
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ const jobId = enRequestPositionInfo.value && enRequestPositionInfo.value?.id ? enRequestPositionInfo.value?.id : positionInfo.value.id
|
|
|
+ const type = (enRequestPositionInfo.value && Object.keys(enRequestPositionInfo.value).length ? enRequestPositionInfo.value.hire : positionInfo.value.hire) ? 1 : 0
|
|
|
+ await jobCvRelSend({
|
|
|
+ jobId,
|
|
|
+ title: obj.title,
|
|
|
+ url: obj.url,
|
|
|
+ type
|
|
|
+ })
|
|
|
+ }
|
|
|
+ handleChangeSendResumeStatus(true)
|
|
|
+ showUploadDialog.value = false
|
|
|
+ enRequestPositionInfo.value = {}
|
|
|
}
|
|
|
|
|
|
async function handleSubmitResume () {
|
|
@@ -508,6 +555,7 @@ async function handleSubmitResume () {
|
|
|
},
|
|
|
type: 1
|
|
|
}
|
|
|
+ if (enRequestPositionInfo.value) text.query.positionInfo = enRequestPositionInfo.value
|
|
|
send (JSON.stringify(text), channelItem.value, 105)
|
|
|
|
|
|
// 简历投递至简历库
|
|
@@ -518,28 +566,18 @@ async function handleSubmitResume () {
|
|
|
recommendUserId: isEmployment.value
|
|
|
})
|
|
|
} else {
|
|
|
+ const jobId = enRequestPositionInfo.value && enRequestPositionInfo.value?.id ? enRequestPositionInfo.value?.id : positionInfo.value.id
|
|
|
+ const type = (enRequestPositionInfo.value && Object.keys(enRequestPositionInfo.value).length ? enRequestPositionInfo.value.hire : positionInfo.value.hire) ? 1 : 0
|
|
|
await jobCvRelSend({
|
|
|
- jobId: positionInfo.value.id,
|
|
|
+ jobId,
|
|
|
title: _info.title,
|
|
|
url: _info.url,
|
|
|
- type: positionInfo.value.hire ? 1 : 0
|
|
|
+ type
|
|
|
})
|
|
|
}
|
|
|
handleChangeSendResumeStatus(true)
|
|
|
showResume.value = false
|
|
|
-}
|
|
|
-// 求简历
|
|
|
-function handleRequest () {
|
|
|
- const text = {
|
|
|
- remark: '求简历',
|
|
|
- query: {
|
|
|
- src: '',
|
|
|
- title: '',
|
|
|
- id: '',
|
|
|
- },
|
|
|
- type: 2
|
|
|
- }
|
|
|
- send (JSON.stringify(text), channelItem.value, 105)
|
|
|
+ enRequestPositionInfo.value = {}
|
|
|
}
|
|
|
|
|
|
// 简历预览
|
|
@@ -588,6 +626,7 @@ async function handleInvite (item) {
|
|
|
// userId: '',
|
|
|
// jobId: ''
|
|
|
// }
|
|
|
+ if (item.key === 'requestResume') return showSelectPosition.value = true
|
|
|
showInvite.value = true
|
|
|
// send(JSON.stringify(msg), channelItem.value, 101)
|
|
|
// console.log(query)
|
|
@@ -598,6 +637,7 @@ async function handleInvite (item) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+// 企业-发送面试邀请
|
|
|
const handleSubmit = async () => {
|
|
|
const { valid } = await inviteRef.value.CtFormRef.formRef.validate()
|
|
|
if (!valid) {
|
|
@@ -617,7 +657,27 @@ const handleSubmit = async () => {
|
|
|
Snackbar.success(t('common.operationSuccessful'))
|
|
|
send(JSON.stringify(query), channelItem.value, 101)
|
|
|
showInvite.value = false
|
|
|
+}
|
|
|
|
|
|
+// 企业-求简历
|
|
|
+const handleRequestResumeSubmit = async () => {
|
|
|
+ const { valid } = await requestFromRef.value.formRef.validate()
|
|
|
+ if (!valid) return
|
|
|
+ const jobId = requestFormItems.value.options.find(e => e.key === 'jobId').value
|
|
|
+ const positionInfo = positionList.value.find(e => e.value === jobId)
|
|
|
+
|
|
|
+ const text = {
|
|
|
+ remark: '求简历',
|
|
|
+ query: {
|
|
|
+ src: '',
|
|
|
+ title: '',
|
|
|
+ id: '',
|
|
|
+ positionInfo
|
|
|
+ },
|
|
|
+ type: 2
|
|
|
+ }
|
|
|
+ send (JSON.stringify(text), channelItem.value, 105)
|
|
|
+ showSelectPosition.value = false
|
|
|
}
|
|
|
|
|
|
const handleAgree = (val) => {
|