|
@@ -49,6 +49,48 @@
|
|
|
</div>
|
|
|
<div v-for="(val, i) in items" :key="i" :id="val.id">
|
|
|
<div class="time-box">{{ timesTampChange(+(val.timestamp.padEnd(13, '0'))) }}</div>
|
|
|
+
|
|
|
+ <!-- <template v-if="val.payload.type === 102 && val.from_uid !== IM.uid"> -->
|
|
|
+ <template v-if="val.payload.type === 102">
|
|
|
+ <v-card
|
|
|
+ color="teal"
|
|
|
+ variant="tonal"
|
|
|
+ class="mx-auto"
|
|
|
+ width="400"
|
|
|
+ min-height="150"
|
|
|
+ :elevation="3"
|
|
|
+ >
|
|
|
+ <div class="pa-3">
|
|
|
+ <div class="text-h6"> {{ val.payload.content.positionInfo.name }}</div>
|
|
|
+ <div class="text-subtitle-2">薪酬待遇: {{ val.payload.content.positionInfo.payFrom }} - {{ val.payload.content.positionInfo.payTo }}</div>
|
|
|
+ <div>
|
|
|
+ <v-chip
|
|
|
+ color="secondary"
|
|
|
+ v-for="(v, i) in val.payload.content.positionInfo.enterprise.welfareList"
|
|
|
+ :key="val.message_id + v + i"
|
|
|
+ x-small
|
|
|
+ class="mt-1 mr-1"
|
|
|
+ >
|
|
|
+ {{ v }}
|
|
|
+ </v-chip>
|
|
|
+ </div>
|
|
|
+ <v-divider class="my-3"></v-divider>
|
|
|
+ <div class="text-subtitle-2 text-right">
|
|
|
+ <v-avatar size="24">
|
|
|
+ <v-img :src="val.payload.content.positionInfo.contact.avatar"></v-img>
|
|
|
+ </v-avatar>
|
|
|
+ {{ val.payload.content.positionInfo.contact.name }}
|
|
|
+ {{ val.payload.content.positionInfo.contact.postNameCn }}
|
|
|
+ {{ val.payload.content.positionInfo.enterprise.name }}
|
|
|
+ </div>
|
|
|
+ <div class="text-subtitle-2 text-right">
|
|
|
+ 地址:{{ val.payload.content.positionInfo.address }}
|
|
|
+ </div>
|
|
|
+
|
|
|
+
|
|
|
+ </div>
|
|
|
+ </v-card>
|
|
|
+ </template>
|
|
|
<div :class="['message-view_item', val.from_uid === IM.uid ? 'is-self' : 'is-other']">
|
|
|
<div style="width: 40px; height: 40px;">
|
|
|
<v-avatar>
|
|
@@ -60,7 +102,14 @@
|
|
|
></v-img>
|
|
|
</v-avatar>
|
|
|
</div>
|
|
|
- <div v-if="val.payload.type === 101">
|
|
|
+ <!-- 显示沟通职位 -->
|
|
|
+ <template v-if="val.payload.type === 102">
|
|
|
+ <div class="message-text" :class="{ active: val.from_uid === IM.uid}">
|
|
|
+ {{ val.payload.content.text }}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <!-- 发起职位 -->
|
|
|
+ <div v-else-if="val.payload.type === 101">
|
|
|
<v-chip
|
|
|
class="ma-2"
|
|
|
color="teal"
|
|
@@ -74,29 +123,42 @@
|
|
|
{{ val.payload.content }}
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div v-if="val.payload.type === 101 && val.from_uid !== IM.uid" class="d-flex justify-center">
|
|
|
+ <!-- 插入面试职位邀请 -->
|
|
|
+ <div v-if="val.payload.type === 101" class="d-flex justify-center">
|
|
|
<v-card
|
|
|
color="teal"
|
|
|
variant="tonal"
|
|
|
class="mx-auto"
|
|
|
+ min-width="400"
|
|
|
+ min-height="150"
|
|
|
+ :elevation="3"
|
|
|
>
|
|
|
<v-card-item>
|
|
|
<div>
|
|
|
+ <!-- {{val.payload.content}} -->
|
|
|
<div class="text-overline mb-1">
|
|
|
面试邀请
|
|
|
</div>
|
|
|
- <div class="text-h6 mb-1">
|
|
|
- {{ val.payload.content.jobName }}
|
|
|
+ <div class=" d-flex justify-space-between">
|
|
|
+ <div class="text-h6 mb-1">
|
|
|
+ {{ val.payload.content.positionInfo.data.name }}
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ {{ val.payload.content.positionInfo.data.payFrom }} -
|
|
|
+ {{ val.payload.content.positionInfo.data.payTo }}
|
|
|
+ </div>
|
|
|
</div>
|
|
|
-
|
|
|
+
|
|
|
<!-- <div class="text-caption"></div> -->
|
|
|
- <div class="text-caption">联系电话: {{ val.payload.content.invitePhone }} 面试时间: {{ val.payload.content.time }}</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>
|
|
|
- <v-btn>
|
|
|
- 同意
|
|
|
+ <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>
|
|
@@ -106,7 +168,8 @@
|
|
|
</div>
|
|
|
<!-- <v-divider></v-divider> -->
|
|
|
<div class="tools pa-3" v-if="Object.keys(info).length > 0">
|
|
|
- <v-btn
|
|
|
+ <slot name="tools"></slot>
|
|
|
+ <!-- <v-btn
|
|
|
v-for="tool in tools"
|
|
|
:key="tool.name"
|
|
|
size="small"
|
|
@@ -115,7 +178,7 @@
|
|
|
@click="tool.handle"
|
|
|
>
|
|
|
{{ tool.name }}
|
|
|
- </v-btn>
|
|
|
+ </v-btn> -->
|
|
|
</div>
|
|
|
<div class="bottom-info">
|
|
|
<v-divider></v-divider>
|
|
@@ -148,16 +211,16 @@
|
|
|
|
|
|
<script setup>
|
|
|
defineOptions({ name: 'message-chatting'})
|
|
|
-import { ref, nextTick, onMounted, inject } from 'vue'
|
|
|
+import { ref, nextTick, onMounted } from 'vue'
|
|
|
import { timesTampChange } from '@/utils/date'
|
|
|
import { useIMStore } from '@/store/im'
|
|
|
|
|
|
import { useUserStore } from '@/store/user'
|
|
|
-const isEnterprise = inject('isEnterprise')
|
|
|
+// const isEnterprise = inject('isEnterprise')
|
|
|
|
|
|
-const emits = defineEmits(['handleInquire', 'handleInvite', 'handleMore', 'handleSend'])
|
|
|
+const emits = defineEmits(['handleMore', 'handleSend'])
|
|
|
|
|
|
-const props = defineProps({
|
|
|
+defineProps({
|
|
|
items: {
|
|
|
type: Array,
|
|
|
default: () => []
|
|
@@ -188,26 +251,26 @@ 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 enterpriseTools = [
|
|
|
+// { name: '查看面试', icon: 'mdi-email-newsletter', handle: handleInquire },
|
|
|
+// { name: '面试邀约', icon: 'mdi-email', handle: handleInvite }
|
|
|
+// ]
|
|
|
|
|
|
-const userTools = [
|
|
|
- { name: '查看面试', icon: 'mdi-email-newsletter', handle: handleInquire }
|
|
|
-]
|
|
|
+// const userTools = [
|
|
|
+// { name: '查看面试', icon: 'mdi-email-newsletter', handle: handleInquire }
|
|
|
+// ]
|
|
|
|
|
|
-const tools = isEnterprise ? enterpriseTools : userTools
|
|
|
+// 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)
|
|
|
-}
|
|
|
+// 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 = () => {
|
|
@@ -305,6 +368,13 @@ const handleKeyDown = (event) => {
|
|
|
const reset = () => {
|
|
|
inputVal.value = ''
|
|
|
}
|
|
|
+
|
|
|
+const handleAgree = (val) => {
|
|
|
+ const { positionInfo, ...obj } = val
|
|
|
+ console.log(positionInfo)
|
|
|
+ emits('handleAgree', obj)
|
|
|
+}
|
|
|
+
|
|
|
defineExpose({
|
|
|
reset,
|
|
|
changeLoading,
|
|
@@ -380,6 +450,7 @@ defineExpose({
|
|
|
margin: 8px 0;
|
|
|
position: relative;
|
|
|
.message-text {
|
|
|
+ overflow-wrap: break-word;
|
|
|
background-color: #f0f2f5;
|
|
|
border-radius: 6px;
|
|
|
max-width: 85%;
|