|
@@ -97,6 +97,7 @@
|
|
|
@handleRefuse="handleRefuse"
|
|
|
@handlePreview="handlePreview"
|
|
|
@handleSendResume="handleSendResume"
|
|
|
+ @handleBack="handleBack"
|
|
|
>
|
|
|
<template #tools>
|
|
|
<v-btn
|
|
@@ -180,7 +181,7 @@ import Chatting from './components/chatting.vue'
|
|
|
import { initConnect, send, initChart, getMoreMessages, checkConversation } from '@/hooks/web/useIM'
|
|
|
import { useI18n } from '@/hooks/web/useI18n'
|
|
|
import { getPositionDetails, jobCvRelCheckSend, jobCvRelSend, jobCvRelHireSend } from '@/api/position'
|
|
|
-import { getInterviewInviteListByInviteUserId, getMessageType } from '@/api/common'
|
|
|
+import { getInterviewInviteListByInviteUserId, getMessageType, messageBack } from '@/api/common'
|
|
|
// import { getUserInfo } from '@/api/personal/user'
|
|
|
import { getBaseInfo } from '@/api/common'
|
|
|
import { getJobAdvertised } from '@/api/enterprise'
|
|
@@ -205,7 +206,7 @@ const chatRef = ref()
|
|
|
|
|
|
const IM = useIMStore()
|
|
|
// 自己的信息
|
|
|
-const { entBaseInfo } = useUserStore()
|
|
|
+const { entBaseInfo, baseInfo } = useUserStore()
|
|
|
|
|
|
const isEnterprise = inject('isEnterprise')
|
|
|
// 实例
|
|
@@ -415,6 +416,7 @@ async function getMessageTypeSync () {
|
|
|
handleChangeSendResumeStatus(check)
|
|
|
}
|
|
|
|
|
|
+// 修改发送状态
|
|
|
function handleChangeSendResumeStatus (status) {
|
|
|
if (!isEnterprise) {
|
|
|
const item = userTools.value.find(e => e.key === 'sendResume')
|
|
@@ -493,6 +495,23 @@ async function handleSendResume (item) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+// 撤回简历
|
|
|
+async function handleBack (val) {
|
|
|
+ console.log(val)
|
|
|
+ try {
|
|
|
+ // 撤回简历
|
|
|
+ // 撤回聊天
|
|
|
+ // await messageBack({
|
|
|
+ // channelId: val.channel_id,
|
|
|
+ // messageId: val.message_id,
|
|
|
+ // nickName: baseInfo.name
|
|
|
+ // // enterpriseId: ''
|
|
|
+ // })
|
|
|
+ } catch (error) {
|
|
|
+ console.log(error)
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
/**
|
|
|
* 发送简历
|
|
|
* text param
|
|
@@ -594,13 +613,21 @@ const handlePreview = (val) => {
|
|
|
}
|
|
|
|
|
|
const handleGetMore = async () => {
|
|
|
+ // 当前滚动条高度
|
|
|
+ const scrollHeight = chatRef.value.chatRef.scrollHeight
|
|
|
+ // 当前滚动条距离
|
|
|
+ const scrollTop = chatRef.value.chatRef.scrollTop
|
|
|
try {
|
|
|
chatRef.value.changeLoading(true)
|
|
|
pageSize.value++
|
|
|
const { list, more } = await getMoreMessages(pageSize.value, channelItem.value)
|
|
|
messageItems.value.unshift(...list.value)
|
|
|
hasMore.value = more
|
|
|
- // chatRef.value.scrollBottom()
|
|
|
+ nextTick(() => {
|
|
|
+ // 渲染后高度
|
|
|
+ const _scrollHeight = chatRef.value.chatRef.scrollHeight
|
|
|
+ chatRef.value.chatRef.scrollTop = _scrollHeight - scrollHeight - scrollTop
|
|
|
+ })
|
|
|
} finally {
|
|
|
chatRef.value.changeLoading(false)
|
|
|
}
|