|
@@ -22,26 +22,36 @@
|
|
|
</template>
|
|
|
</p>
|
|
|
</div>
|
|
|
- <!-- <div class="position-content" v-if="!isEnterprise">
|
|
|
- <div class="d-flex mb-2">
|
|
|
- <div class="font-weight-black">{{ info.name }}</div>
|
|
|
- <div class="position-content-emolument">{{ info.payFrom }} - {{ info.payFrom }}</div>
|
|
|
+ </div>
|
|
|
+ <v-divider></v-divider>
|
|
|
+ <div class="pa-3" v-if="interview.length">
|
|
|
+ <div v-for="val in interview" :key="val.id" class="color-666">
|
|
|
+ <div class="d-flex justify-space-between">
|
|
|
+ <div class="font-weight-bold">
|
|
|
+ <span>{{ val.job.name }}</span>
|
|
|
+ <span class="ml-3">{{ val.job.payFrom }}-{{ val.job.payTo }}/{{ val.job.payUnit }}</span>
|
|
|
+ </div>
|
|
|
+ <div>{{ statusList.find(e => e.value === val.status).label }}</div>
|
|
|
</div>
|
|
|
- <div class="text-subtitle-2">{{ info?.enterprise?.name }}</div>
|
|
|
- <div class="pt-3">
|
|
|
- <v-chip
|
|
|
- v-for="(item, index) in info?.enterprise?.welfareList"
|
|
|
- :key="item + index"
|
|
|
- color="green"
|
|
|
- label
|
|
|
- class="mr-3 mb-3"
|
|
|
- >
|
|
|
- {{ item }}
|
|
|
- </v-chip>
|
|
|
+ <div class="d-flex align-center mt-1 font-size-14 justify-space-between">
|
|
|
+ <div>
|
|
|
+ <span>面试时间:{{ timesTampChange(val.time, 'Y-M-D h:m') }}</span>
|
|
|
+ <span class="septal-line"></span>
|
|
|
+ <span>面试地点:{{ val.address }}</span>
|
|
|
+ <span class="septal-line"></span>
|
|
|
+ <span>联系电话:{{ val.invitePhone }}</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="mt-2 d-flex justify-space-between align-center">
|
|
|
+ <div class="tipsText" @click="handleToCenter">在“个人中心-面试”中管理我的面试</div>
|
|
|
+ <div v-if="val.status === '0'">
|
|
|
+ <v-btn class="mr-3" variant="outlined" color="error" size="small" @click="handleRefuse(val)">拒绝邀请</v-btn>
|
|
|
+ <v-btn variant="outlined" color="primary" size="small" @click="handleAgree(val)">接受邀请</v-btn>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div> -->
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <v-divider></v-divider>
|
|
|
+ <v-divider v-if="interview.length"></v-divider>
|
|
|
<div class="my-3 message-box" @scroll="handleScroll" ref="chatRef">
|
|
|
<div>
|
|
|
<div class="d-flex justify-center" v-if="hasMore">
|
|
@@ -86,8 +96,6 @@
|
|
|
<div class="text-subtitle-2 text-right">
|
|
|
地址:{{ val.payload.content.positionInfo.address }}
|
|
|
</div>
|
|
|
-
|
|
|
-
|
|
|
</div>
|
|
|
</v-card>
|
|
|
</template>
|
|
@@ -108,23 +116,31 @@
|
|
|
{{ val.payload.content.text }}
|
|
|
</div>
|
|
|
</template>
|
|
|
- <!-- 发起职位 -->
|
|
|
+ <!-- 发起面试邀请 -->
|
|
|
<div v-else-if="val.payload.type === 101">
|
|
|
- <v-chip
|
|
|
- class="ma-2"
|
|
|
- color="teal"
|
|
|
- label
|
|
|
- >
|
|
|
- 发起了面试邀请
|
|
|
- <v-icon icon="mdi-email-newsletter" end></v-icon>
|
|
|
+ <v-chip class="ma-2" color="teal" label>
|
|
|
+ <v-icon icon="mdi-email-newsletter" start></v-icon>
|
|
|
+ 发起了面试邀请
|
|
|
+ </v-chip>
|
|
|
+ </div>
|
|
|
+ <div v-else-if="val.payload.type === 103">
|
|
|
+ <v-chip class="ma-2" label color="error">
|
|
|
+ <v-icon icon="mdi-close" start></v-icon>
|
|
|
+ 拒绝了面试邀请
|
|
|
+ </v-chip>
|
|
|
+ </div>
|
|
|
+ <div v-else-if="val.payload.type === 104">
|
|
|
+ <v-chip class="ma-2" label color="primary">
|
|
|
+ <v-icon icon="mdi-check" start></v-icon>
|
|
|
+ 接受了面试邀请
|
|
|
</v-chip>
|
|
|
</div>
|
|
|
<div v-else class="message-text" :class="{ active: val.from_uid === IM.uid}">
|
|
|
{{ val.payload.content }}
|
|
|
</div>
|
|
|
</div>
|
|
|
- <!-- 插入面试职位邀请 -->
|
|
|
- <div v-if="val.payload.type === 101" class="d-flex justify-center">
|
|
|
+ <!-- 插入个人-面试职位邀请:同意、拒绝 -->
|
|
|
+ <div v-if="isEnterprise && val.payload.type === 101" class="d-flex justify-center">
|
|
|
<v-card
|
|
|
color="teal"
|
|
|
variant="tonal"
|
|
@@ -135,7 +151,6 @@
|
|
|
>
|
|
|
<v-card-item>
|
|
|
<div>
|
|
|
- <!-- {{val.payload.content}} -->
|
|
|
<div class="text-overline mb-1">
|
|
|
面试邀请
|
|
|
</div>
|
|
@@ -149,36 +164,18 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
- <!-- <div class="text-caption"></div> -->
|
|
|
<div class="text-caption">面试时间: {{ timesTampChange(val.payload.content?.time) }}</div>
|
|
|
<div class="text-caption">面试地点: {{ val.payload.content.address }}</div>
|
|
|
<div class="text-caption">联系电话: {{ val.payload.content.invitePhone }}</div>
|
|
|
</div>
|
|
|
</v-card-item>
|
|
|
-
|
|
|
- <v-card-actions class="justify-end" v-if="val.from_uid !== IM.uid">
|
|
|
- <v-btn @click="handleAgree(val.payload.content)">
|
|
|
- 接受邀请
|
|
|
- </v-btn>
|
|
|
- </v-card-actions>
|
|
|
</v-card>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <!-- <v-divider></v-divider> -->
|
|
|
<div class="tools pa-3" v-if="Object.keys(info).length > 0">
|
|
|
<slot name="tools"></slot>
|
|
|
- <!-- <v-btn
|
|
|
- v-for="tool in tools"
|
|
|
- :key="tool.name"
|
|
|
- size="small"
|
|
|
- :prepend-icon="tool.icon"
|
|
|
- class="mr-3"
|
|
|
- @click="tool.handle"
|
|
|
- >
|
|
|
- {{ tool.name }}
|
|
|
- </v-btn> -->
|
|
|
</div>
|
|
|
<div class="bottom-info">
|
|
|
<v-divider></v-divider>
|
|
@@ -189,21 +186,16 @@
|
|
|
placeholder="请输入消息 按Ctrl+Enter换行"
|
|
|
hide-details
|
|
|
no-resize
|
|
|
+ color="primary"
|
|
|
bg-color="white"
|
|
|
variant="plain"
|
|
|
:disabled="Object.keys(info).length === 0"
|
|
|
@keydown="handleKeyDown"
|
|
|
>
|
|
|
- <!-- @keydown.stop.prevent="handleKeyDown" -->
|
|
|
<template #append-inner>
|
|
|
<v-btn color="primary" :disabled="!inputVal" style="align-self: center;" @click="handleSend">发送</v-btn>
|
|
|
</template>
|
|
|
</v-textarea>
|
|
|
- <!-- <v-text-field v-model="inputVal" label="请输入消息" color="primary" density="comfortable" variant="plain" hide-details></v-text-field> -->
|
|
|
- <!-- <div class="d-flex align-center justify-end bottom-send">
|
|
|
- <div class="color-ccc font-size-14 mr-5">按Enter键发送</div>
|
|
|
- <v-btn color="primary" size="small" :disabled="!inputVal" @click="handleSend">发送</v-btn>
|
|
|
- </div> -->
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -211,14 +203,16 @@
|
|
|
|
|
|
<script setup>
|
|
|
defineOptions({ name: 'message-chatting'})
|
|
|
-import { ref, nextTick, onMounted } from 'vue'
|
|
|
+import { ref, nextTick, onMounted, inject } from 'vue'
|
|
|
import { timesTampChange } from '@/utils/date'
|
|
|
import { useIMStore } from '@/store/im'
|
|
|
+import { useRouter } from 'vue-router';
|
|
|
+import { getDict } from '@/hooks/web/useDictionaries'
|
|
|
|
|
|
import { useUserStore } from '@/store/user'
|
|
|
-// const isEnterprise = inject('isEnterprise')
|
|
|
+const isEnterprise = inject('isEnterprise')
|
|
|
|
|
|
-const emits = defineEmits(['handleMore', 'handleSend'])
|
|
|
+const emits = defineEmits(['handleMore', 'handleSend', 'handleAgree', 'handleRefuse'])
|
|
|
|
|
|
defineProps({
|
|
|
items: {
|
|
@@ -236,9 +230,14 @@ defineProps({
|
|
|
hasMore: {
|
|
|
type: Boolean,
|
|
|
default: false
|
|
|
+ },
|
|
|
+ interview: {
|
|
|
+ type: Array,
|
|
|
+ default: () => []
|
|
|
}
|
|
|
})
|
|
|
|
|
|
+const router = useRouter()
|
|
|
const overlay = ref(false)
|
|
|
const IM = useIMStore()
|
|
|
const userStore = useUserStore()
|
|
@@ -251,27 +250,6 @@ const inputVal = ref('')
|
|
|
const pullDowning = ref(false) // 下拉中
|
|
|
const pulldownFinished = ref(false) // 下拉完成
|
|
|
|
|
|
-// const enterpriseTools = [
|
|
|
-// { name: '查看面试', icon: 'mdi-email-newsletter', handle: handleInquire },
|
|
|
-// { name: '面试邀约', icon: 'mdi-email', handle: handleInvite }
|
|
|
-// ]
|
|
|
-
|
|
|
-// const userTools = [
|
|
|
-// { name: '查看面试', icon: 'mdi-email-newsletter', handle: handleInquire }
|
|
|
-// ]
|
|
|
-
|
|
|
-// const tools = isEnterprise ? enterpriseTools : userTools
|
|
|
-
|
|
|
-// 查看
|
|
|
-// function handleInquire () {
|
|
|
-// console.log(props.info)
|
|
|
-// emits('handleInquire', props.info.userId, props.info.enterpriseId || undefined)
|
|
|
-// }
|
|
|
-// // 邀请
|
|
|
-// function handleInvite () {
|
|
|
-// emits('handleInvite', props.info.userId, props.info.enterpriseId || undefined)
|
|
|
-// }
|
|
|
-
|
|
|
// 滚动到底部
|
|
|
const scrollBottom = () => {
|
|
|
const chat = chatRef.value
|
|
@@ -282,6 +260,15 @@ const scrollBottom = () => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+// 求职端-获取求职者与当前邀请人的面试记录
|
|
|
+const statusList = ref([])
|
|
|
+const getStatusList = () => {
|
|
|
+ getDict('menduner_interview_invite_status').then(({data}) => {
|
|
|
+ if (data.length) statusList.value = data
|
|
|
+ })
|
|
|
+}
|
|
|
+if (!isEnterprise) getStatusList()
|
|
|
+
|
|
|
onMounted(() => {
|
|
|
nextTick(() => {
|
|
|
scrollBottom()
|
|
@@ -296,39 +283,6 @@ const handleSend = () => {
|
|
|
emits('handleSend', inputVal)
|
|
|
}
|
|
|
|
|
|
-// const pullDown = async () => {
|
|
|
-// if (messages.value.length == 0) {
|
|
|
-// return
|
|
|
-// }
|
|
|
-// const firstMsg = messages.value[0]
|
|
|
-// if (firstMsg.messageSeq == 1) {
|
|
|
-// pulldownFinished.value = true
|
|
|
-// return
|
|
|
-// }
|
|
|
-// const limit = 15
|
|
|
-// const msgs = await WKSDK.shared().chatManager.syncMessages(to.value, {
|
|
|
-// limit: limit,
|
|
|
-// startMessageSeq: firstMsg.messageSeq - 1,
|
|
|
-// endMessageSeq: 0,
|
|
|
-// pullMode: PullMode.Down,
|
|
|
-// })
|
|
|
-// if (msgs.length < limit) {
|
|
|
-// pulldownFinished.value = true;
|
|
|
-// }
|
|
|
-// if (msgs && msgs.length > 0) {
|
|
|
-// msgs.reverse().forEach((m) => {
|
|
|
-// messages.value.unshift(m)
|
|
|
-// })
|
|
|
-// }
|
|
|
-// nextTick(function () {
|
|
|
-// const chat = chatRef.value
|
|
|
-// const firstMsgEl = document.getElementById(firstMsg.clientMsgNo)
|
|
|
-// if (firstMsgEl) {
|
|
|
-// chat.scrollTop = firstMsgEl.offsetTop
|
|
|
-// }
|
|
|
-// })
|
|
|
-// }
|
|
|
-
|
|
|
const handleScroll = (e) => {
|
|
|
const targetScrollTop = e.target.scrollTop;
|
|
|
if (targetScrollTop <= 250) {
|
|
@@ -336,13 +290,7 @@ const handleScroll = (e) => {
|
|
|
if (pullDowning.value || pulldownFinished.value) {
|
|
|
return
|
|
|
}
|
|
|
- console.log('下拉')
|
|
|
pullDowning.value = true
|
|
|
- // pullDown().then(() => {
|
|
|
- // pullDowning.value = false
|
|
|
- // }).catch(() => {
|
|
|
- // pullDowning.value = false
|
|
|
- // })
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -369,12 +317,23 @@ const reset = () => {
|
|
|
inputVal.value = ''
|
|
|
}
|
|
|
|
|
|
+// 同意面试邀请
|
|
|
const handleAgree = (val) => {
|
|
|
- // const { positionInfo, ...obj } = val
|
|
|
- // console.log(positionInfo)
|
|
|
+ if (!val.id) return
|
|
|
emits('handleAgree', val)
|
|
|
}
|
|
|
|
|
|
+// 拒绝面试邀请
|
|
|
+const handleRefuse = (val) => {
|
|
|
+ if (!val.id) return
|
|
|
+ emits('handleRefuse', val)
|
|
|
+}
|
|
|
+
|
|
|
+// 跳转个人中心-面试
|
|
|
+const handleToCenter = () => {
|
|
|
+ router.push({ path: '/recruit/personal/personalCenter', query: { showInterviewScheduleMore: true } })
|
|
|
+}
|
|
|
+
|
|
|
defineExpose({
|
|
|
reset,
|
|
|
changeLoading,
|
|
@@ -489,6 +448,14 @@ input {
|
|
|
border: none;
|
|
|
}
|
|
|
}
|
|
|
+.tipsText {
|
|
|
+ color: var(--color-999);
|
|
|
+ font-size: 12px;
|
|
|
+ cursor: pointer;
|
|
|
+ &:hover {
|
|
|
+ color: var(--v-primary-base);
|
|
|
+ }
|
|
|
+}
|
|
|
|
|
|
/* 滚动条样式 */
|
|
|
::-webkit-scrollbar {
|