|
|
@@ -87,13 +87,10 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="content-l-box-item-r" style="flex-shrink: 0;">
|
|
|
- {{item.messageTime?getMonthOrDay(item.messageTime):''}}
|
|
|
- <!-- <div class="flex justify-end" style="margin-top: 5px;">
|
|
|
- <div v-if="item.contentCount"
|
|
|
- class="content-l-box-item-r-dian flex align-center justify-center">
|
|
|
- {{item.contentCount}}
|
|
|
- </div>
|
|
|
- </div> -->
|
|
|
+ {{item.messageTime? getDateDiff(item.messageTime):''}}
|
|
|
+ <div class="flex justify-end delete-btn" style="margin-top: 5px;" @click="deleteMsg(item)">
|
|
|
+ 删除
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -122,15 +119,12 @@
|
|
|
{{title}}
|
|
|
</div>
|
|
|
<el-divider direction="vertical" />
|
|
|
- <div class="content-r-msg-title-n" v-if="postPushInfo.stationName">
|
|
|
- {{postPushInfo.stationName}}
|
|
|
+ <div class="content-r-msg-title-n" v-if="postPushInfo.ruleClassifyName">
|
|
|
+ {{ postPushInfo.ruleClassifyName }}
|
|
|
</div>
|
|
|
<div class="content-r-msg-title-p" v-if="postPushInfo.salaryRange">
|
|
|
{{postPushInfo.salaryRange}}
|
|
|
</div>
|
|
|
- <div class="content-r-msg-title-e" v-if="postPushInfo.education">
|
|
|
- {{postPushInfo.education}}
|
|
|
- </div>
|
|
|
</view>
|
|
|
<view class="content-r-msg-title flex align-center" v-if="userType == 2">
|
|
|
<div class="content-r-msg-title-s" v-if="resumesInfo.userName">
|
|
|
@@ -140,16 +134,71 @@
|
|
|
<div class="content-r-msg-title-n" v-if="resumesInfo.intentionRuleClassifyName">
|
|
|
{{resumesInfo.intentionRuleClassifyName}}
|
|
|
</div>
|
|
|
- <div class="content-r-msg-title-p" v-if="resumesInfo.intentionSalaryRange">
|
|
|
- {{resumesInfo.intentionSalaryRange}}
|
|
|
- </div>
|
|
|
- <div class="content-r-msg-title-e" v-if="resumesInfo.resumesWorkExperience">
|
|
|
- {{ resumesInfo.resumesWorkExperience || '0' }}年
|
|
|
- </div>
|
|
|
</view>
|
|
|
<!-- 聊天记录 -->
|
|
|
<div class="content-r-msg-chat flex align-center justify-center">
|
|
|
<div ref="messageBox" class="content-r-msg-chats">
|
|
|
+ <!-- 岗位简介 -->
|
|
|
+ <div class="resume-box" v-if="JSON.stringify(postPushInfo) != '{}' && userType == 1" @click.stop="handleClick(postPushInfo.postPushId)">
|
|
|
+ <div class="position-title">{{ postPushInfo.ruleClassifyName || '暂无岗位' }}
|
|
|
+ <span class="position-num">{{ postPushInfo.salaryRange }}</span>
|
|
|
+ </div>
|
|
|
+ <div class="company-text">{{ title }} {{ postPushInfo.company ? postPushInfo.company.companyPeople : '0人' }}</div>
|
|
|
+ <div class="resume-label information flex flex-wrap">
|
|
|
+ <el-tag type="info">{{ postPushInfo.education }}</el-tag>
|
|
|
+ <el-tag type="info">{{ postPushInfo.experience }}</el-tag>
|
|
|
+ <el-tag type="info" v-if="postPushInfo.company">{{ postPushInfo.company.workRestTime }}</el-tag>
|
|
|
+ <el-tag type="info" v-for="(item, index) in postPushInfo.welfareTag ? postPushInfo.welfareTag.split(';') : []"
|
|
|
+ :key="index">{{ item }}</el-tag>
|
|
|
+ </div>
|
|
|
+ <template v-if="isHtmlContent">
|
|
|
+ <div :class="['position-content', !isJobDescExpanded ? 'position-content-itemAll' : '']" v-html="postPushInfo.positionDetails"></div>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <div :class="['position-content', !isJobDescExpanded ? 'position-content-itemAll' : '']">{{ postPushInfo.positionDetails }}</div>
|
|
|
+ </template>
|
|
|
+ <div class="expand-more" @click.stop="isJobDescExpanded = !isJobDescExpanded">{{ isJobDescExpanded ? '收起' : '展开更多' }}</div>
|
|
|
+ <!-- hr信息 -->
|
|
|
+ <div class="flex align-center personnel">
|
|
|
+ <img class="resume-avatar" :src="postPushInfo.hr && postPushInfo.hr.hrImg ? postPushInfo.hr.hrImg : '/default.jpg'" alt="" style="width: 35px;height: 35px;">
|
|
|
+ <div>{{ postPushInfo.user && postPushInfo.user.userName ? postPushInfo.user.userName : '未知' }}·{{ postPushInfo.hr && postPushInfo.hr.hrPosition || '创始人' }}</div>
|
|
|
+ </div>
|
|
|
+ <div class="resume-time resume-label">{{ conversationInfo.createTime && conversationInfo.createTime }}向你发起沟通</div>
|
|
|
+ </div>
|
|
|
+ <!-- 简历简介 -->
|
|
|
+ <div class="resume-box" v-if="JSON.stringify(resumesInfo) != '{}' && userType == 2" @click="goToPage">
|
|
|
+ <div class="flex align-center">
|
|
|
+ <img class="resume-avatar" :src="resumesInfo && resumesInfo.avatar || '/default.jpg'" alt="" />
|
|
|
+ <div class="flex flex-direction justify-between" style="gap: 5px;">
|
|
|
+ <div>期望:{{ resumesInfo.intentionRuleClassifyName }}
|
|
|
+ <span class="text-color">{{ resumesInfo.intentionSalaryRange }}</span>
|
|
|
+ </div>
|
|
|
+ <div class="resume-label flex">
|
|
|
+ <span>{{ resumesInfo.resumesWorkExperience || 0 }}年</span>
|
|
|
+ <span>{{ postPushInfo.education }}</span>
|
|
|
+ <span>{{ postPushInfo.salaryRange }}</span>
|
|
|
+ <span>{{ resumesStatusMap[resumesInfo.resumesStatus] || '未知' }}</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="resume-label information">{{
|
|
|
+ resumesInfo.resumesListDtoList && resumesInfo.resumesListDtoList.companyName || '' }}·{{
|
|
|
+ resumesInfo.resumesListDtoList && resumesInfo.resumesListDtoList.lastWorkPosition || ''
|
|
|
+ }}</div>
|
|
|
+ <div class="resume-label information">{{
|
|
|
+ resumesInfo.resumesListDtoList && resumesInfo.resumesListDtoList.school || '' }}·{{
|
|
|
+ resumesInfo.resumesListDtoList && resumesInfo.resumesListDtoList.profession || '' }}
|
|
|
+ </div>
|
|
|
+ <div class="resume-tag flex flex-wrap">
|
|
|
+ <el-tag type="info" v-for="(skill, skillIndex) in resumesInfo.resumesListDtoList && resumesInfo.resumesListDtoList.intentIndustry && resumesInfo.resumesListDtoList.intentIndustry.split('/') || []"
|
|
|
+ :key="skillIndex">{{ skill }}</el-tag>
|
|
|
+ </div>
|
|
|
+ <div class="information resume-content">{{ resumesInfo.adv }}</div>
|
|
|
+ <div class="resume-time resume-label flex">
|
|
|
+ <span>{{ conversationInfo.createTime && conversationInfo.createTime }}</span>
|
|
|
+ <span>沟通的职位-{{ resumesInfo.intentionRuleClassifyName }}</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<div class="message-box-item" v-for="(item,index) in megList" :key="index">
|
|
|
<!-- 对方的消息 -->
|
|
|
<div class="message-boxs message-box-l flex flex-wrap" v-if="item.userId != userId">
|
|
|
@@ -265,7 +314,7 @@
|
|
|
<div class="message-box-l-con inv-style" v-if="item.content && (item.messageType === 96 || item.messageType === 97)">{{ item.content }}</div>
|
|
|
<div
|
|
|
style="width: 100%;color: #999999;font-size: 12px;padding-left: 50px;margin-top: 4px;">
|
|
|
- {{item.createTime}}
|
|
|
+ {{ getDateDiff(item.createTime) }}
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- 我发的消息 -->
|
|
|
@@ -350,7 +399,7 @@
|
|
|
<img class="message-boxs-avatar" :src="avatar?avatar:'/default.jpg'" alt="" />
|
|
|
<div
|
|
|
style="width: 100%;color: #999999;font-size: 12px;padding-right: 50px;margin-top: 4px;text-align: right;">
|
|
|
- {{item.createTime}}
|
|
|
+ {{getDateDiff(item.createTime)}}
|
|
|
</div>
|
|
|
|
|
|
|
|
|
@@ -492,6 +541,7 @@
|
|
|
components: { AttachmentSelectDialog },
|
|
|
data() {
|
|
|
return {
|
|
|
+ isJobDescExpanded: false,
|
|
|
showDialog: false,
|
|
|
miamshi: {
|
|
|
hrPhone: '', //手机号
|
|
|
@@ -576,7 +626,14 @@
|
|
|
isShowCommon:false, //是否显示常用语
|
|
|
changYongList:[],
|
|
|
webSocketState:false,
|
|
|
- webSco:null
|
|
|
+ webSco:null,
|
|
|
+ conversationInfo: {},
|
|
|
+ resumesStatusMap: {
|
|
|
+ 0: '离职-随时到岗',
|
|
|
+ 1: '在职-月内到岗',
|
|
|
+ 2: '在职-考虑机会',
|
|
|
+ 3: '在职-暂不考虑'
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -588,6 +645,10 @@
|
|
|
},
|
|
|
avatar() {
|
|
|
return this.$store.state.avatar;
|
|
|
+ },
|
|
|
+ isHtmlContent() {
|
|
|
+ const str = this.postPushInfo?.positionDetails || '';
|
|
|
+ return /<[^>]+>/.test(str);
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
@@ -601,6 +662,110 @@
|
|
|
}, 1000);
|
|
|
},
|
|
|
methods: {
|
|
|
+ deleteMsg(item){
|
|
|
+ ElMessageBox.confirm(
|
|
|
+ '确定删除这条消息?',
|
|
|
+ '温馨提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.$Request.get(`/app/chat/deleteConversation?chatConversationId=${item.chatConversationId}`).then(res => {
|
|
|
+ if (res.code == 0) {
|
|
|
+ ElMessage({
|
|
|
+ message: res.msg || '删除成功',
|
|
|
+ type: 'success',
|
|
|
+ duration: 1500,
|
|
|
+ offset: this.screenHeight / 2
|
|
|
+ })
|
|
|
+ this.getChatList()
|
|
|
+ }
|
|
|
+ });
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getDateDiff(data) {
|
|
|
+ // 兼容字符串或时间戳
|
|
|
+ let timePublish;
|
|
|
+ if (typeof data === 'string') {
|
|
|
+ // PC 浏览器可以正常识别 "2026-01-05 18:46:39"
|
|
|
+ timePublish = new Date(data.replace(/-/g, '/')); // 保留这步以防某些老浏览器异常
|
|
|
+ } else if (typeof data === 'number') {
|
|
|
+ timePublish = new Date(data);
|
|
|
+ } else {
|
|
|
+ timePublish = data instanceof Date ? data : new Date();
|
|
|
+ }
|
|
|
+
|
|
|
+ if (isNaN(timePublish.getTime())) return '';
|
|
|
+
|
|
|
+ const timeNow = new Date();
|
|
|
+
|
|
|
+ const publishYear = timePublish.getFullYear();
|
|
|
+ const publishMonth = timePublish.getMonth() + 1;
|
|
|
+ const publishDate = timePublish.getDate();
|
|
|
+ const publishHour = timePublish.getHours().toString().padStart(2, '0');
|
|
|
+ const publishMinute = timePublish.getMinutes().toString().padStart(2, '0');
|
|
|
+
|
|
|
+ // 计算两个日期的“自然日”差值
|
|
|
+ const nowZero = new Date(timeNow.getFullYear(), timeNow.getMonth(), timeNow.getDate());
|
|
|
+ const publishZero = new Date(publishYear, timePublish.getMonth(), publishDate);
|
|
|
+ const diffDays = Math.floor((nowZero - publishZero) / (1000 * 60 * 60 * 24));
|
|
|
+
|
|
|
+ const weekDays = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'];
|
|
|
+ const weekStr = weekDays[timePublish.getDay()];
|
|
|
+ const sameYear = publishYear === timeNow.getFullYear();
|
|
|
+
|
|
|
+ let result = '';
|
|
|
+
|
|
|
+ if (diffDays === 0) {
|
|
|
+ // 今天
|
|
|
+ result = `${publishHour}:${publishMinute}`;
|
|
|
+ } else if (diffDays === 1) {
|
|
|
+ // 昨天
|
|
|
+ result = `昨天 ${publishHour}:${publishMinute}`;
|
|
|
+ } else if (diffDays < 7) {
|
|
|
+ // 一周内
|
|
|
+ result = `${weekStr} ${publishHour}:${publishMinute}`;
|
|
|
+ } else if (sameYear) {
|
|
|
+ // 同一年
|
|
|
+ result = `${publishMonth}月${publishDate}日 ${publishHour}:${publishMinute}`;
|
|
|
+ } else {
|
|
|
+ // 跨年
|
|
|
+ result = `${publishYear}年${publishMonth}月${publishDate}日 ${publishHour}:${publishMinute}`;
|
|
|
+ }
|
|
|
+
|
|
|
+ return result;
|
|
|
+ },
|
|
|
+ goToPage(){
|
|
|
+ if (localStorage.getItem('token')) {
|
|
|
+ this.$router.push({
|
|
|
+ name: 'resumeInfo',
|
|
|
+ query: {
|
|
|
+ resumesId: this.resumesId,
|
|
|
+ postPushId: this.postPushId,
|
|
|
+ ruleClassifyId: this.postPushInfo?.ruleClassifyId || '',
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$router.push({
|
|
|
+ name: 'login'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ handleClick(postPushId){
|
|
|
+ if (localStorage.getItem('token')) {
|
|
|
+ this.$router.push({
|
|
|
+ name: 'postInfo',
|
|
|
+ query: {
|
|
|
+ postPushId: postPushId
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$router.push({
|
|
|
+ name: 'login'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
getChangYong() {
|
|
|
let state = 0
|
|
|
if (this.userType == 1) {
|
|
|
@@ -1285,6 +1450,7 @@
|
|
|
params: data
|
|
|
}).then(res => {
|
|
|
if (res.code == 0) {
|
|
|
+ this.conversationInfo = res.data
|
|
|
if (res.data.isSendWx) { //是否交换微信
|
|
|
this.isSendWx = true
|
|
|
} else {
|
|
|
@@ -1368,14 +1534,6 @@
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- //把时间转换为月日
|
|
|
- getMonthOrDay(time) {
|
|
|
- let date = new Date(time) // 获取时间
|
|
|
- // var year = date.getFullYear() // 获取年
|
|
|
- let month = date.getMonth() + 1 // 获取月
|
|
|
- let strDate = date.getDate() // 获取日
|
|
|
- return month + '月' + strDate + '日'
|
|
|
- },
|
|
|
getChatList() {
|
|
|
let data = {
|
|
|
page: 1,
|
|
|
@@ -1891,4 +2049,83 @@
|
|
|
border-radius: 50%;
|
|
|
background: #d9d9d9;
|
|
|
}
|
|
|
+ .resume-box{
|
|
|
+ margin-bottom: 20px;
|
|
|
+ background-color: #F0F0F0;
|
|
|
+ border-radius: 8px;
|
|
|
+ padding: 15px;
|
|
|
+ cursor: pointer;
|
|
|
+ .resume-avatar{
|
|
|
+ width: 46px;
|
|
|
+ height: 46px;
|
|
|
+ border-radius: 50%;
|
|
|
+ margin-right: 10px;
|
|
|
+ }
|
|
|
+ .text-color{
|
|
|
+ color: #016BF6;
|
|
|
+ font-size: 14px;
|
|
|
+ margin-left: 5px;
|
|
|
+ }
|
|
|
+ .resume-label{
|
|
|
+ color: #9ca4ab;
|
|
|
+ font-size: 14px;
|
|
|
+ gap: 10px;
|
|
|
+ }
|
|
|
+ .information{
|
|
|
+ margin: 10px 0;
|
|
|
+ }
|
|
|
+ .resume-tag{
|
|
|
+ gap:6px;
|
|
|
+ }
|
|
|
+ .resume-content{
|
|
|
+ color: #616e7c;
|
|
|
+ font-size: 14px;
|
|
|
+ }
|
|
|
+ .resume-time{
|
|
|
+ border-top: 1px solid #e9e3e3;
|
|
|
+ padding-top: 5px;
|
|
|
+ }
|
|
|
+ .position-title{
|
|
|
+ font-size: 20px;
|
|
|
+ font-weight: 500;
|
|
|
+ }
|
|
|
+ .position-num{
|
|
|
+ color: #016bf6;
|
|
|
+ font-size: 16px;
|
|
|
+ margin-left: 10px;
|
|
|
+ }
|
|
|
+ .company-text{
|
|
|
+ color: #9ca4ab;
|
|
|
+ margin-top: 5px;
|
|
|
+ }
|
|
|
+ .position-content{
|
|
|
+ color: #999999;
|
|
|
+ font-size: 14px;
|
|
|
+ white-space: pre-wrap;
|
|
|
+ }
|
|
|
+ .position-content-itemAll{
|
|
|
+ display: -webkit-box;
|
|
|
+ -webkit-line-clamp: 4;
|
|
|
+ -webkit-box-orient: vertical;
|
|
|
+ overflow: hidden;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ }
|
|
|
+ .expand-more{
|
|
|
+ color: #007AFF;
|
|
|
+ font-size: 14px;
|
|
|
+ cursor: pointer;
|
|
|
+ margin-top: 10px;
|
|
|
+ }
|
|
|
+ .personnel{
|
|
|
+ margin: 10px 0;
|
|
|
+ font-size: 14px;
|
|
|
+ color: #1A1A1A;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .delete-btn{
|
|
|
+ display: none;
|
|
|
+ }
|
|
|
+ .content-l-box-item:hover .delete-btn {
|
|
|
+ display: flex;
|
|
|
+ }
|
|
|
</style>
|