index.vue 70 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408
  1. <template>
  2. <div class="message flex align-center justify-center" @click.stop="closeDialog()">
  3. <!-- 消息主体 -->
  4. <div class="content flex align-center justify-between">
  5. <!-- 左侧聊天列表 -->
  6. <div class="content-l">
  7. <div class="tabs">
  8. <el-tabs v-model="activeName" @tab-click="handleTabClick">
  9. <el-tab-pane label="全部" name="all"></el-tab-pane>
  10. <el-tab-pane label="已读" name="read"></el-tab-pane>
  11. <el-tab-pane label="未读" name="unread"></el-tab-pane>
  12. <el-tab-pane label="沟通过" name="communicated"></el-tab-pane>
  13. <el-tab-pane label="已邀约" name="invited"></el-tab-pane>
  14. <el-tab-pane label="面试过" name="interviewed"></el-tab-pane>
  15. </el-tabs>
  16. </div>
  17. <div class="content-l-box flex algin-center justify-center flex-wrap">
  18. <div class="content-l-box-items" :class="selectIndex==1?'megActive':''" @click="getSysMsgList(true)"
  19. v-for="(item,index) in msgList" :key="index">
  20. <div class="content-l-box-item flex justify-between">
  21. <div class="content-l-box-item-l flex align-center">
  22. <img src="/images/message/sysIcon.png" alt="" srcset="" />
  23. <div class="content-l-box-item-con">
  24. <div class="content-l-box-item-con-title">
  25. {{item.title?item.title: '系统消息'}}
  26. </div>
  27. <div class="content-l-box-item-con-cons">
  28. {{item.content}}
  29. </div>
  30. </div>
  31. </div>
  32. <div class="content-l-box-item-r">
  33. <div v-if="messageCount>0"
  34. class="content-l-box-item-r-dian flex align-center justify-center">
  35. {{messageCount}}
  36. </div>
  37. </div>
  38. </div>
  39. </div>
  40. <!-- <div class="content-l-box-items">
  41. <div class="content-l-box-item flex justify-between">
  42. <div class="content-l-box-item-l flex align-center">
  43. <img src="/images/message/kefuIcon.png" alt="" srcset="" />
  44. <div class="content-l-box-item-con">
  45. <div class="content-l-box-item-con-title">
  46. 在线客服
  47. </div>
  48. <div class="content-l-box-item-con-cons">
  49. 联系在线客服
  50. </div>
  51. </div>
  52. </div>
  53. <div class="content-l-box-item-r">
  54. <div v-if="userCount>0"
  55. class="content-l-box-item-r-dian flex align-center justify-center">
  56. {{userCount}}
  57. </div>
  58. </div>
  59. </div>
  60. </div> -->
  61. <div class="content-l-box-items" :class="liftIndex==index?'megActive':''"
  62. @click.stop="startMsg(item,index)" v-for="(item,index) in leftList" :key="index">
  63. <div class="content-l-box-item flex justify-between">
  64. <div class="content-l-box-item-l flex align-center">
  65. <div style="position: relative;">
  66. <img :src="item.avatar ? item.avatar : '/default.jpg'" alt="" srcset="" />
  67. <div v-if="item.contentCount > 0" class="contentCount">{{ item.contentCount }}</div>
  68. </div>
  69. <div class="content-l-box-item-con">
  70. <div class="content-l-box-item-con-title flex algin-center">
  71. {{item.userName}}
  72. <span>
  73. {{item.stationName}}
  74. </span>
  75. </div>
  76. <div v-if="item.messageType == 1" class="content-l-box-item-con-cons">
  77. {{ item.content }}
  78. </div>
  79. <div v-else-if="item.messageType == 10" class="content-l-box-item-con-cons">
  80. 简历已发送
  81. </div>
  82. <div v-else-if="item.messageType == 18" class="content-l-box-item-con-cons">
  83. 位置
  84. </div>
  85. <div v-else-if="item.messageType == 9" class="content-l-box-item-con-cons">
  86. 简历请求
  87. </div>
  88. <div v-else-if="item.messageType == 6" class="content-l-box-item-con-cons">
  89. 微信请求
  90. </div>
  91. <div v-else-if="item.messageType == 5" class="content-l-box-item-con-cons">
  92. 手机号请求
  93. </div>
  94. <div v-else-if="item.messageType == 2" class="content-l-box-item-con-cons">
  95. [图片]
  96. </div>
  97. <div v-else-if="item.messageType == 3" class="content-l-box-item-con-cons">
  98. [语音]
  99. </div>
  100. <div v-else-if="item.messageType == 7" class="content-l-box-item-con-cons">
  101. [交换手机]
  102. </div>
  103. <div v-else-if="item.messageType == 8" class="content-l-box-item-con-cons">
  104. [交换微信]
  105. </div>
  106. <div v-else-if="item.messageType == 12" class="content-l-box-item-con-cons">
  107. {{ item.content }}已拒绝
  108. </div>
  109. <div v-else-if="item.messageType == 4" class="content-l-box-item-con-cons">
  110. <img v-if="item.content && item.messageType === 4" :src="emjSrc + item.content"
  111. style="height: 20px; width: 20px;" alt="icon" />
  112. </div>
  113. <div v-else-if="item.messageType == 20" class="content-l-box-item-con-cons">
  114. [视频通话]
  115. </div>
  116. <div v-else-if="item.messageType == 21" class="content-l-box-item-con-cons">
  117. [语音通话]
  118. </div>
  119. <div v-else-if="item.messageType == 99" class="content-l-box-item-con-cons">
  120. [面试邀约]
  121. </div>
  122. <div v-else-if="item.messageType == 98" class="content-l-box-item-con-cons">
  123. [{{ item.content }}]
  124. </div>
  125. <div v-else-if="item.messageType == 96 || item.messageType == 97"
  126. class="content-l-box-item-con-cons">
  127. [{{ item.content }}]
  128. </div>
  129. <div v-else class="content-l-box-item-con-cons">
  130. [其他消息类型]
  131. </div>
  132. </div>
  133. </div>
  134. <div class="content-l-box-item-r" style="flex-shrink: 0;">
  135. {{item.messageTime? getDateDiff(item.messageTime):''}}
  136. <div class="flex justify-end delete-btn" style="margin-top: 5px;" @click.stop="deleteMsg(item)">
  137. 删除
  138. </div>
  139. </div>
  140. </div>
  141. </div>
  142. </div>
  143. </div>
  144. <!-- 右侧消息窗口 -->
  145. <div class="content-r">
  146. <div v-if="selectIndex==1" v-infinite-scroll="handleScroll" ref="contentrtz" class="content-r-tz">
  147. <div class="content-r-tz-item" v-for="(item,index) in sysMsgList" :key="index">
  148. <div class="content-r-tz-item-title">
  149. {{item.title}}
  150. </div>
  151. <div class="content-r-tz-item-cons flex align-center justify-between">
  152. {{item.content}}
  153. <el-badge :is-dot="item.isSee == 0?true:false" style="margin-right: 10px;">
  154. <span>{{item.createAt}}</span>
  155. </el-badge>
  156. </div>
  157. </div>
  158. </div>
  159. <div v-else-if="selectIndex==3" class="content-r-msg">
  160. <view class="content-r-msg-title flex align-center" v-if="userType == 1">
  161. <div class="content-r-msg-title-s" v-if="title">
  162. {{title}}
  163. </div>
  164. <el-divider direction="vertical" />
  165. <div class="content-r-msg-title-n" v-if="postPushInfo.ruleClassifyName">
  166. {{ postPushInfo.ruleClassifyName }}
  167. </div>
  168. <div class="content-r-msg-title-p" v-if="postPushInfo.salaryRange">
  169. {{postPushInfo.salaryRange}}
  170. </div>
  171. </view>
  172. <view class="content-r-msg-title flex align-center" v-if="userType == 2">
  173. <div class="content-r-msg-title-s" v-if="resumesInfo.userName">
  174. {{resumesInfo.userName}}
  175. </div>
  176. <el-divider direction="vertical" />
  177. <div class="content-r-msg-title-n" v-if="resumesInfo.intentionRuleClassifyName">
  178. {{resumesInfo.intentionRuleClassifyName}}
  179. </div>
  180. </view>
  181. <!-- 聊天记录 -->
  182. <div class="content-r-msg-chat flex align-center justify-center">
  183. <div ref="messageBox" class="content-r-msg-chats">
  184. <!-- 岗位简介 -->
  185. <div class="resume-box" v-if="JSON.stringify(postPushInfo) != '{}' && userType == 1" @click.stop="handleClick(postPushInfo.postPushId)">
  186. <div class="position-title">{{ postPushInfo.ruleClassifyName || '暂无岗位' }}
  187. <span class="position-num">{{ postPushInfo.salaryRange }}</span>
  188. </div>
  189. <div class="company-text">{{ title }} {{ postPushInfo.company ? postPushInfo.company.companyPeople : '0人' }}</div>
  190. <div class="resume-label information flex flex-wrap">
  191. <el-tag type="info">{{ postPushInfo.education }}</el-tag>
  192. <el-tag type="info">{{ postPushInfo.experience }}</el-tag>
  193. <el-tag type="info" v-if="postPushInfo.company">{{ postPushInfo.company.workRestTime }}</el-tag>
  194. <el-tag type="info" v-for="(item, index) in postPushInfo.welfareTag ? postPushInfo.welfareTag.split(';') : []"
  195. :key="index">{{ item }}</el-tag>
  196. </div>
  197. <template v-if="isHtmlContent">
  198. <div :class="['position-content', !isJobDescExpanded ? 'position-content-itemAll' : '']" v-html="postPushInfo.positionDetails"></div>
  199. </template>
  200. <template v-else>
  201. <div :class="['position-content', !isJobDescExpanded ? 'position-content-itemAll' : '']">{{ postPushInfo.positionDetails }}</div>
  202. </template>
  203. <div class="expand-more" @click.stop="isJobDescExpanded = !isJobDescExpanded">{{ isJobDescExpanded ? '收起' : '展开更多' }}</div>
  204. <!-- hr信息 -->
  205. <div class="flex align-center personnel">
  206. <img class="resume-avatar" :src="postPushInfo.hr && postPushInfo.hr.hrImg ? postPushInfo.hr.hrImg : '/default.jpg'" alt="" style="width: 35px;height: 35px;">
  207. <div>{{ postPushInfo.user && postPushInfo.user.userName ? postPushInfo.user.userName : '未知' }}·{{ postPushInfo.hr && postPushInfo.hr.hrPosition || '创始人' }}</div>
  208. </div>
  209. <div class="resume-time resume-label">{{ conversationInfo.createTime && conversationInfo.createTime }}向你发起沟通</div>
  210. </div>
  211. <!-- 简历简介 -->
  212. <div class="resume-box" v-if="JSON.stringify(resumesInfo) != '{}' && userType == 2" @click="goToPage">
  213. <div class="flex align-center">
  214. <img class="resume-avatar" :src="resumesInfo && resumesInfo.avatar || '/default.jpg'" alt="" />
  215. <div class="flex flex-direction justify-between" style="gap: 5px;">
  216. <div>期望:{{ resumesInfo.intentionRuleClassifyName }}
  217. <span class="text-color">{{ resumesInfo.intentionSalaryRange }}</span>
  218. </div>
  219. <div class="resume-label flex">
  220. <span>{{ resumesInfo.resumesWorkExperience || 0 }}年</span>
  221. <span>{{ postPushInfo.education }}</span>
  222. <span>{{ postPushInfo.salaryRange }}</span>
  223. <span>{{ resumesStatusMap[resumesInfo.resumesStatus] || '未知' }}</span>
  224. </div>
  225. </div>
  226. </div>
  227. <div class="resume-label information">{{
  228. resumesInfo.resumesListDtoList && resumesInfo.resumesListDtoList.companyName || '' }}·{{
  229. resumesInfo.resumesListDtoList && resumesInfo.resumesListDtoList.lastWorkPosition || ''
  230. }}</div>
  231. <div class="resume-label information">{{
  232. resumesInfo.resumesListDtoList && resumesInfo.resumesListDtoList.school || '' }}·{{
  233. resumesInfo.resumesListDtoList && resumesInfo.resumesListDtoList.profession || '' }}
  234. </div>
  235. <div class="resume-tag flex flex-wrap">
  236. <el-tag type="info" v-for="(skill, skillIndex) in resumesInfo.resumesListDtoList && resumesInfo.resumesListDtoList.intentIndustry && resumesInfo.resumesListDtoList.intentIndustry.split('/') || []"
  237. :key="skillIndex">{{ skill }}</el-tag>
  238. </div>
  239. <div class="information resume-content">{{ resumesInfo.adv }}</div>
  240. <div class="resume-time resume-label flex">
  241. <span>{{ conversationInfo.createTime && conversationInfo.createTime }}</span>
  242. <span>沟通的职位-{{ resumesInfo.intentionRuleClassifyName }}</span>
  243. </div>
  244. </div>
  245. <div class="message-box-item" v-for="(item,index) in megList" :key="index">
  246. <!-- 对方的消息 -->
  247. <div class="message-boxs message-box-l flex flex-wrap" v-if="item.userId != userId">
  248. <img class="message-boxs-avatar" :src="item.avatar?item.avatar:'/default.jpg'" @click="goToPageDetail"
  249. alt="" />
  250. <div class="message-box-l-con" v-if="item.messageType==1">
  251. {{item.content}}
  252. </div>
  253. <div class="message-box-l-con flex align-center" v-if="item.messageType==20">
  254. 视频通话
  255. <img src="../../../public/images/message/historyVideo_black.png"
  256. style="width: 25px;height: 25px;margin-left: 10px;" mode=""></img>
  257. </div>
  258. <div class="message-box-l-con flex align-center" v-if="item.messageType==21">
  259. 语音通话
  260. <img src="../../../public/images/message/historyAudio_black.png"
  261. style="width: 25px;height: 25px;margin-left: 10px;" mode=""></img>
  262. </div>
  263. <div class="message-box-l-con flex algin-center" style="cursor: pointer;"
  264. @click="jumpToTencentMap(item.content.latitude,item.content.longitude,item.content.address)"
  265. v-if="item.messageType==18">
  266. {{item.content.address}}
  267. <el-icon style="margin-left: 10px;" :size="20" color="#00DD9A">
  268. <MapLocation />
  269. </el-icon>
  270. </div>
  271. <!-- 图片 -->
  272. <div class="message-box-l-con" style="background-color: #ffffff;"
  273. v-if="item.messageType==2">
  274. <el-image style="width: 100px;height: 100px;border-radius: 4px;"
  275. :src="item.content" fit="cover" :zoom-rate="1.2" :max-scale="7"
  276. :min-scale="0.2" :preview-src-list="[item.content]" :initial-index="4" />
  277. </div>
  278. <!-- 语音消息 -->
  279. <div class="message-box-l-con" v-if="item.messageType==3">
  280. 语音消息,请前往APP或小程序查看
  281. </div>
  282. <!-- 表情 -->
  283. <div class="message-box-l-con" style="background-color: #ffffff;"
  284. v-if="item.messageType==4">
  285. <img :src="emjSrc+item.content" alt="" />
  286. </div>
  287. <!-- 交换手机号请求 -->
  288. <div class="message-box-l-phone"
  289. v-if="item.messageType==5 && item.content=='手机号请求'">
  290. 我想跟你交换手机号,是否同意?
  291. <div class="message-box-l-phone-btn flex align-center">
  292. <el-button plain size="small"
  293. @click.stop="refuseFun(item.chatContentId)">拒绝</el-button>
  294. <el-button type="primary" size="small"
  295. @click.stop="tongyi(item.messageType,item.chatContentId)">同意</el-button>
  296. </div>
  297. </div>
  298. <!-- 交换手机号请求同意 -->
  299. <div class="message-box-l-con"
  300. v-if="item.messageType === 5 && item.content!='手机号请求'">
  301. 已同意交换手机号
  302. </div>
  303. <!-- 交换微信号请求 -->
  304. <div class="message-box-l-phone"
  305. v-if="item.messageType==6 && item.content=='微信号请求'">
  306. 我想跟你交换微信号,是否同意?
  307. <div class="message-box-l-phone-btn flex align-center">
  308. <el-button plain size="small"
  309. @click.stop="refuseFun(item.chatContentId)">拒绝</el-button>
  310. <el-button type="primary" size="small"
  311. @click.stop="tongyi(item.messageType,item.chatContentId)">同意</el-button>
  312. </div>
  313. </div>
  314. <!-- 交换微信号请求同意 -->
  315. <div class="message-box-l-con"
  316. v-if="item.messageType === 6 && item.content!='微信号请求'">
  317. 已同意交换微信号
  318. </div>
  319. <div class="message-box-l-con" v-if="item.messageType==7">
  320. <div class="" v-if="item.userType==1">
  321. 我的手机号为:{{JSON.parse(item.content).userPhone}}
  322. </div>
  323. <div v-else>
  324. 我的手机号为:{{JSON.parse(item.content).companyPhone}}
  325. </div>
  326. </div>
  327. <div class="message-box-l-con" v-if="item.messageType==8">
  328. <div class="" v-if="item.userType==1">
  329. 我的微信号为:{{JSON.parse(item.content).userWx}}
  330. </div>
  331. <div v-else>
  332. 我的微信号为:{{JSON.parse(item.content).companyWx}}
  333. </div>
  334. </div>
  335. <!-- 交换手机号请求拒绝 -->
  336. <div class="message-box-l-con" v-if="item.messageType==12">
  337. {{item.content}}已拒绝
  338. </div>
  339. <!-- 简历请求 -->
  340. <div class="message-box-l-phone" v-if="item.messageType==9 && item.content=='简历请求'">
  341. 我想要你的一份简历,是否同意?
  342. <div class="message-box-l-phone-btn flex align-center">
  343. <el-button plain size="small"
  344. @click.stop="refuseFun(item.chatContentId)">拒绝</el-button>
  345. <el-button type="primary" size="small"
  346. @click.stop="resumesTy()">同意</el-button>
  347. </div>
  348. </div>
  349. <!-- 简历请求已同意 -->
  350. <div class="message-box-l-con"
  351. v-if="item.content && item.messageType === 9 && item.content!=='简历请求'">
  352. {{item.content}}
  353. </div>
  354. <!-- 预览简历 -->
  355. <div class="message-box-l-con inv-style" v-if="item.content && item.messageType === 10">
  356. <template v-if="item.userType == 1">
  357. <view class="flex align-center" @click="previewResume(item.content)">
  358. 点击预览附件简历</view>
  359. </template>
  360. <template v-else>{{ item.content }}</template>
  361. </div>
  362. <div class="message-box-l-con inv-style" v-if="item.content && item.messageType === 99">您收到了{{ item.content }}</div>
  363. <!-- 面试拒绝或同意 -->
  364. <div class="message-box-l-con inv-style" v-if="item.content && (item.messageType === 96 || item.messageType === 97)">{{ item.content }}</div>
  365. <div
  366. style="width: 100%;color: #999999;font-size: 12px;padding-left: 50px;margin-top: 4px;">
  367. {{ getDateDiff(item.createTime) }}
  368. </div>
  369. </div>
  370. <!-- 我发的消息 -->
  371. <div class="message-boxs message-box-r flex flex-wrap" v-else>
  372. <!-- 文字消息 -->
  373. <div class="message-box-r-con" v-if="item.messageType==1">
  374. {{item.content}}
  375. </div>
  376. <div class="message-box-r-con flex align-center" v-if="item.messageType==20">
  377. 视频通话
  378. <img src="../../../public/images/message/historyVideo_white.png"
  379. style="width: 25px;height: 25px;margin-left: 10px;" mode=""></img>
  380. </div>
  381. <div class="message-box-r-con flex align-center" v-if="item.messageType==21">
  382. 语音通话
  383. <img src="../../../public/images/message/historyAudio_white.png"
  384. style="width: 25px;height: 25px;margin-left: 10px;" mode=""></img>
  385. </div>
  386. <div class="message-box-r-con flex algin-center" style="cursor: pointer;"
  387. @click="jumpToTencentMap(item.content.latitude,item.content.longitude,item.content.address)"
  388. v-if="item.messageType==18">
  389. {{item.content.address}}
  390. <el-icon style="margin-left: 10px;" :size="20" color="#ffffff">
  391. <MapLocation />
  392. </el-icon>
  393. </div>
  394. <!-- 简历请求 -->
  395. <div class="message-box-r-con" v-if="item.messageType==9">
  396. 简历请求已发送,等待对方同意
  397. </div>
  398. <!-- 图片 -->
  399. <div class="message-box-r-con" style="background-color: #ffffff;"
  400. v-if="item.messageType==2">
  401. <el-image style="width: 100px;height: 100px;border-radius: 4px;"
  402. :src="item.content" fit="cover" :zoom-rate="1.2" :max-scale="7"
  403. :min-scale="0.2" :preview-src-list="[item.content]" :initial-index="4" />
  404. </div>
  405. <!-- 语音消息 -->
  406. <div class="message-box-r-con" v-if="item.messageType==3">
  407. 语音消息,请前往APP或小程序查看
  408. </div>
  409. <!-- 表情消息 -->
  410. <div class="message-box-r-con" style="background-color: #ffffff;"
  411. v-if="item.messageType==4">
  412. <img :src="emjSrc+item.content" alt="" />
  413. </div>
  414. <!-- 交换手机号请求 -->
  415. <div class="message-box-r-con" v-if="item.messageType==5">
  416. 交换手机号请求已发送,等待对方同意
  417. </div>
  418. <div class="message-box-r-con" v-if="item.messageType==7">
  419. <div class="" v-if="item.userType==1">
  420. 我的手机号为:{{JSON.parse(item.content).userPhone}}
  421. </div>
  422. <div v-else>
  423. 我的手机号为:{{JSON.parse(item.content).companyPhone}}
  424. </div>
  425. </div>
  426. <!-- 交换微信号请求 -->
  427. <div class="message-box-r-con" v-if="item.messageType==6">
  428. 交换微信号请求已发送,等待对方同意
  429. </div>
  430. <div class="message-box-r-con" v-if="item.messageType==8">
  431. <div class="" v-if="item.userType==1">
  432. 我的微信号为:{{JSON.parse(item.content).userWx}}
  433. </div>
  434. <div v-else>
  435. 我的微信号为:{{JSON.parse(item.content).companyWx}}
  436. </div>
  437. </div>
  438. <!-- 交换手机号请求拒绝 -->
  439. <div class="message-box-r-con" v-if="item.messageType==12">
  440. {{item.content}}已拒绝
  441. </div>
  442. <!-- 简历预览 -->
  443. <div class="message-box-r-con invitation" v-if="item.content && item.messageType === 10">
  444. <template v-if="item.userType == 1">
  445. <view class="flex align-center" @click="previewResume(item.content)">点击预览附件简历</view>
  446. </template>
  447. <template v-else>{{ item.content }}</template>
  448. </div>
  449. <!-- 面试邀约消息 -->
  450. <div class="message-box-r-con invitation" v-if="item.content && item.messageType === 99">您发送了{{ item.content }}</div>
  451. <!-- 面试拒绝或同意 -->
  452. <div class="message-box-r-con invitation"
  453. v-if="item.content && (item.messageType === 96 || item.messageType === 97)">{{
  454. item.content }}</div>
  455. <img class="message-boxs-avatar" :src="avatar?avatar:'/default.jpg'" alt="" />
  456. <div
  457. style="width: 100%;color: #999999;font-size: 12px;padding-right: 50px;margin-top: 4px;text-align: right;">
  458. {{getDateDiff(item.createTime)}}
  459. </div>
  460. </div>
  461. </div>
  462. </div>
  463. </div>
  464. <!-- 底部 -->
  465. <div class="content-r-msg-btom flex align-center justify-center">
  466. <div class="content-r-msg-btoms">
  467. <div class="message-btom-content">
  468. <el-input @keyup.enter.prevent="sendMessage(1)" style="margin-top: 10px;" resize="none" v-model="content" :autosize="{ minRows: 3, maxRows: 3 }"
  469. type="textarea" placeholder="请输入内容" />
  470. </div>
  471. <div class="message-btom-btn flex align-center justify-between">
  472. <div class="message-btom-btn-l flex align-center">
  473. <div @click.stop="czlist(index)" @mouseover="changeImageSrc(index)"
  474. @mouseout="resetImageSrc(index)"
  475. class="message-btom-btn-l-item flex align-center" v-for="(item,index) in czList"
  476. :key="index">
  477. <div v-if="index == 1" class="flex align-center">
  478. <el-upload class="flex align-center" :action="action"
  479. :show-file-list="false" :on-success="handleAvatarSuccess">
  480. <img :src="czIndex==index?item.srcS:item.src" alt="" srcset="" />
  481. </el-upload>
  482. </div>
  483. <div v-else class="flex align-center">
  484. <img :src="czIndex==index?item.srcS:item.src" alt="" srcset="" />
  485. {{item.name}}
  486. </div>
  487. </div>
  488. <div v-if="isShowEmoj"
  489. class="message-btom-btn-l-emj flex align-center justify-center">
  490. <div class="message-btom-btn-l-emj-box">
  491. <img @click="sendMessage(4,item.url)" v-for="(item,index) in emojList"
  492. :key="index" :src="emjSrc+item.url" :alt="item.alt" srcset="" />
  493. </div>
  494. </div>
  495. <div v-if="isShowEmoj" class="message-btom-btn-l-emjs"></div>
  496. <!-- 常用语 -->
  497. <div v-if="isShowCommon"
  498. class="message-btom-btn-l-emj flex align-center justify-center">
  499. <ul class="message-btom-btn-l-emj-box sentence-panel">
  500. <li class="message-text" v-for="item in changYongList" :key="item.id" @click="selConfirm(item.label)">{{ item.label }}</li>
  501. </ul>
  502. </div>
  503. </div>
  504. <el-button type="primary" @click="sendMessage(1)">发送</el-button>
  505. </div>
  506. </div>
  507. </div>
  508. </div>
  509. <div v-else class="content-r-no flex align-center justify-center flex-wrap">
  510. <img src="/images/index/noJl.png" alt="" />
  511. <div class="content-r-no-txt">
  512. 与你沟通过的都会在左侧列表展示
  513. </div>
  514. </div>
  515. </div>
  516. </div>
  517. <el-dialog v-model="dialogms" title="面试邀请" width="30%" @close="closeMs" :destroy-on-close="true">
  518. <div style="padding: 20px;">
  519. <el-form label-position="right" ref="formms" :model="miamshi" class="">
  520. <el-form-item prop="position"
  521. :rules="[{ required: true, message: '请选择面试岗位', trigger: 'blur', },]" label="面试岗位">
  522. <el-select v-model="miamshi.position" placeholder="请选择面试岗位" filterable clearable>
  523. <el-option v-for="item in jobList" :key="item.id" :label="item.ruleClassifyName"
  524. :value="item.ruleClassifyId" />
  525. </el-select>
  526. </el-form-item>
  527. <el-form-item prop="interviewDateTime"
  528. :rules="[{required: true,message: '请选择面试时间',trigger: 'blur',},]" label="面试时间">
  529. <el-date-picker style="width: 100%;" v-model="miamshi.interviewDateTime" type="datetime"
  530. placeholder="请选择面试时间" format="YYYY-MM-DD HH:mm" date-format="MMM DD, YYYY"
  531. time-format="HH:mm" />
  532. </el-form-item>
  533. <el-form-item prop="address"
  534. :rules="[{required: true,message: '请选择面试地点',trigger: 'blur',},]" label="面试地点">
  535. <el-autocomplete style="width: 100%;" v-model="miamshi.address"
  536. :fetch-suggestions="querySearchAsync" placeholder="请输入面试地点" @select="handleSelect" />
  537. </el-form-item>
  538. <el-form-item prop="detailedAddress" :rules="[{ required: true, message: '请输入详细地址', trigger: 'blur', },]"
  539. label="详细地址">
  540. <el-input v-model="miamshi.detailedAddress" placeholder="请输入详细地址" clearable />
  541. </el-form-item>
  542. <el-form-item prop="hrName" :rules="[{ required: true, message: '请输入联系人名称', trigger: 'blur', },]"
  543. label="联系姓名">
  544. <el-input v-model="miamshi.hrName" placeholder="请输入联系人" clearable />
  545. </el-form-item>
  546. <el-form-item prop="hrPhone"
  547. :rules="[{ required: true, message: '请输入手机号', trigger: 'blur', },]" label="手机号码">
  548. <el-input v-model="miamshi.hrPhone" placeholder="请输入手机号" clearable />
  549. </el-form-item>
  550. <el-form-item prop="remarks" :rules="[{required: true,message: '请输入备注',trigger: 'blur',},]"
  551. label="面试备注">
  552. <el-input v-model="miamshi.remarks" placeholder="请输入备注" clearable />
  553. </el-form-item>
  554. </el-form>
  555. </div>
  556. <template #footer>
  557. <span class="dialog-footer flex align-center justify-end">
  558. <el-button @click="dialogms = false">取消</el-button>
  559. <el-button type="primary" @click="submitMs()">
  560. 确认
  561. </el-button>
  562. </span>
  563. </template>
  564. </el-dialog>
  565. <!-- 简历预览弹窗 -->
  566. <el-dialog v-model="showResumeDialog" title="简历预览" width="80%" top="5vh" :close-on-click-modal="false">
  567. <!-- 文件预览 -->
  568. <div class="preview-box">
  569. <iframe :src="previewUrl" style="width:100%;height:80vh;border:none;"></iframe>
  570. </div>
  571. <template #footer>
  572. <el-button @click="showResumeDialog = false">关闭</el-button>
  573. <el-button type="primary" @click="downloadResume">下载简历</el-button>
  574. </template>
  575. </el-dialog>
  576. <!-- 面试邀约弹窗 -->
  577. <el-dialog v-model="showBtn" title="面试邀约" width="15%" :close-on-click-modal="false">
  578. <div class="avatorm flex justify-center">
  579. <div class="avatorm-box flex justify-center">
  580. <!-- 用户头像 -->
  581. <template v-if="recordInfo.userEntity && recordInfo.userEntity.avatar">
  582. <img :src="recordInfo.userEntity.avatar" class="avatar-img" alt="">
  583. </template>
  584. <template v-else>
  585. <img src="/default.jpg" class="avatar-img" alt="">
  586. </template>
  587. <!-- HR头像 -->
  588. <template v-if="recordInfo.hr && recordInfo.hr.hrImg">
  589. <img :src="recordInfo.hr.hrImg" class="avatar-img" alt="">
  590. </template>
  591. <template v-else>
  592. <img src="/default.jpg" class="avatar-img" alt="">
  593. </template>
  594. </div>
  595. </div>
  596. <div class="avatorm flex justify-center" style="margin-top: 10px;">
  597. <div class="avatorm-box">
  598. <div class="avatorm-box-item flex">
  599. <div class="avatorm-box-item-t">面试岗位:</div>
  600. <div class="avatorm-box-item-r">{{ recordInfo.postPush ? recordInfo.postPush.ruleClassifyName : '未知'
  601. }}</div>
  602. </div>
  603. <div class="avatorm-box-item flex" v-if="recordInfo">
  604. <div class="avatorm-box-item-t">面试时间:</div>
  605. <div class="avatorm-box-item-r">
  606. {{ recordInfo.interviewDateTime && recordInfo.interviewDateTime.substring(0, 10) || '' }}
  607. {{ recordInfo.detailTime }}
  608. </div>
  609. </div>
  610. <div class="avatorm-box-item flex map-item">
  611. <div class="avatorm-box-item-t">面试地点:</div>
  612. <div class="avatorm-box-item-r">
  613. {{ recordInfo.detailedAddress }}
  614. <i class="iconfont icon-map" style="color: #016BF6; margin-left: 5px;"></i>
  615. </div>
  616. </div>
  617. <div class="avatorm-box-item flex">
  618. <div class="avatorm-box-item-t">面试备注:</div>
  619. <div class="avatorm-box-item-r">
  620. {{ recordInfo.remarks ? recordInfo.remarks : '暂无' }}
  621. </div>
  622. </div>
  623. </div>
  624. </div>
  625. <div class="avatorm flex justify-center" v-if="recordInfo.company">
  626. <div class="avatorm-box flex justify-center" style="margin-top: 10px;margin-bottom: 20px;">
  627. 来自 {{ recordInfo.company.companyAllName || recordInfo.company.companyName }} 的面试邀请,是否接受?
  628. </div>
  629. </div>
  630. <template #footer>
  631. <el-button @click="coleInterView(2)">拒绝</el-button>
  632. <el-button type="primary" @click="coleInterView(1)">同意</el-button>
  633. </template>
  634. </el-dialog>
  635. <!-- 附件列表 -->
  636. <AttachmentSelectDialog @closePostPush="closePostPush" @select="selectItem" v-if="showDialog" :showDialog="showDialog" />
  637. </div>
  638. </template>
  639. <script>
  640. import {
  641. ROOTPATH,
  642. ROOTPATH2,
  643. ROOTPATH3
  644. } from '../../../comment/httpUrl.js'
  645. //引入表情的json
  646. import emoj from './emoj.json'
  647. import {
  648. ElMessageBox,
  649. ElMessage,
  650. } from 'element-plus'
  651. import axios from 'axios';
  652. import jsonp from 'axios-jsonp'
  653. import AttachmentSelectDialog from '../../components/AttachmentSelectDialog/AttachmentSelectDialog.vue'
  654. export default {
  655. components: { AttachmentSelectDialog },
  656. data() {
  657. return {
  658. showResumeDialog:false,
  659. previewUrl:'',
  660. currentFileUrl:'',
  661. isJobDescExpanded: false,
  662. showDialog: false,
  663. miamshi: {
  664. hrPhone: '', //手机号
  665. hrName: '', //联系人
  666. position: '', //面试岗位
  667. interviewDateTime: '', //面试时间
  668. companyId: '', //公司id
  669. remarks: '', //面试备注
  670. userId: '', //面试者id
  671. postPushId: '', //岗位id
  672. province: '', //省
  673. city: '', //市
  674. county: '', //区
  675. lng: '', //经度
  676. lat: '', //纬度
  677. address: '', //地址
  678. detailedAddress: '', //详细地址
  679. },
  680. dialogms: false, //面试邀请弹窗
  681. webSco: null, //webscoket对象
  682. msgList: [], //系统消息
  683. userCount: 0,
  684. leftList: [], //左侧聊天列表
  685. byUserId: '', //userid
  686. chatConversationId: '', //聊天室id
  687. postPushId: '', //岗位id
  688. resumesId: '', //简历id
  689. postPushInfo: {}, //岗位信息
  690. resumesInfo: {}, //简历信息
  691. title: '',
  692. page: 1,
  693. limit: 100,
  694. megList: [],
  695. userId: '',
  696. isSendWx: false, //是否交换微信
  697. isSendPhone: false, //是否交换电话
  698. action: ROOTPATH + '/alioss/upload', //上传图片地址
  699. screenHeight: 0, //屏幕高度
  700. emjSrc: ROOTPATH3,
  701. content: '', //消息内容
  702. emojList: emoj.emojList, //表情
  703. czIndex: -1,
  704. czList: [{
  705. name: '',
  706. src: '/images/postimg/emij.png',
  707. srcS: '/images/postimg/emij_s.png',
  708. },
  709. {
  710. name: '',
  711. src: '/images/postimg/photo.png',
  712. srcS: '/images/postimg/photo_s.png',
  713. },
  714. {
  715. name: '',
  716. src: '/images/postimg/cyy.png',
  717. srcS: '/images/postimg/cyy_s.png',
  718. },
  719. {
  720. name: '发简历',
  721. src: '/images/postimg/jl.png',
  722. srcS: '/images/postimg/jl_s.png',
  723. },
  724. {
  725. name: '换电话',
  726. src: '/images/postimg/phone.png',
  727. srcS: '/images/postimg/phone_s.png',
  728. },
  729. {
  730. name: '换微信',
  731. src: '/images/postimg/weichat.png',
  732. srcS: '/images/postimg/weichat_s.png',
  733. }
  734. ], //操作图片
  735. isShowEmoj: false, //是否显示表情弹窗
  736. liftIndex: -1,
  737. selectIndex: -1,
  738. sysMsgList: [], //系统消息
  739. sysPgae: 1,
  740. sysPages: 1,
  741. sysLimit: 10,
  742. jobList:[],
  743. isShowCommon:false, //是否显示常用语
  744. changYongList:[],
  745. webSocketState: false,
  746. conversationInfo: {},
  747. resumesStatusMap: {
  748. 0: '离职-随时到岗',
  749. 1: '在职-月内到岗',
  750. 2: '在职-考虑机会',
  751. 3: '在职-暂不考虑',
  752. 4:'实习'
  753. },
  754. activeName: 'all',
  755. recordInfo:{},//面试邀请信息
  756. showBtn:false,
  757. recordsInter: '',
  758. time:null
  759. }
  760. },
  761. computed: {
  762. messageCount() {
  763. return this.$store.state.messageCount;
  764. },
  765. userType() {
  766. return this.$store.state.userType;
  767. },
  768. avatar() {
  769. return this.$store.state.avatar;
  770. },
  771. isHtmlContent() {
  772. const str = this.postPushInfo?.positionDetails || '';
  773. return /<[^>]+>/.test(str);
  774. }
  775. },
  776. beforeUnmount() {
  777. clearInterval(this.recordsInter)
  778. this.recordsInter = null
  779. clearInterval(this.time)
  780. this.time = null
  781. },
  782. mounted() {
  783. this.screenHeight = window.innerHeight
  784. this.userId = localStorage.getItem('userId')
  785. this.getMsgList()
  786. this.getweiduMsg()
  787. // 获取左侧列表
  788. this.time = setInterval(() => {
  789. this.getChatList();
  790. }, 3000)
  791. },
  792. methods: {
  793. //拒绝或者接受面试邀请
  794. coleInterView(type) {
  795. ElMessageBox.alert(type == 2 ? '确认拒绝该面试邀请吗?' : '确定接受该面试邀请', '提示', {
  796. confirmButtonText: '确认',
  797. showCancelButton: true,
  798. callback: (res) => {
  799. if (res == 'confirm') { //确认
  800. let data = {
  801. recordId: this.recordInfo.recordId,
  802. type: type
  803. }
  804. this.$Request.get('/app/interviewRecord/userUpdateInter', {
  805. params: data
  806. }).then(res => {
  807. if (res.code == 0) {
  808. ElMessage({
  809. message: type == 1 ? '已接受' : '已拒绝',
  810. type: type == 1 ? 'success' : 'error',
  811. duration: 1500,
  812. offset: this.screenHeight / 2
  813. })
  814. if (type == 1) {
  815. this.sendMessage(97, res.data)
  816. } else {
  817. this.sendMessage(96, res.data)
  818. }
  819. this.getCHarList()
  820. this.getStatusInfo()
  821. }
  822. })
  823. }
  824. }
  825. })
  826. },
  827. previewResume(attachmentAddress){
  828. const isFileLink = /^https?:\/\/.+\.(pdf|doc|docx|xls|xlsx)$/i.test(attachmentAddress);
  829. if (!isFileLink) {
  830. ElMessage({
  831. message: '该简历无法预览',
  832. type: 'warning',
  833. duration: 1500,
  834. offset: this.screenHeight / 2
  835. })
  836. return;
  837. }
  838. window.open(attachmentAddress, '_blank');
  839. // this.showResumeDialog = true;
  840. this.currentFileUrl = attachmentAddress;
  841. },
  842. // 下载简历
  843. downloadResume() {
  844. if (!this.currentFileUrl) return;
  845. window.open(this.currentFileUrl, '_blank');
  846. },
  847. goToPageDetail(){
  848. if (this.userType == 1) {
  849. this.handleClick(this.postPushInfo.postPushId)
  850. } else {
  851. this.goToPage()
  852. }
  853. },
  854. handleTabClick(tab) {
  855. this.activeName = tab.props.name
  856. },
  857. deleteMsg(item){
  858. ElMessageBox.confirm(
  859. '确定删除这条消息?',
  860. '温馨提示', {
  861. confirmButtonText: '确定',
  862. cancelButtonText: '取消',
  863. type: 'warning',
  864. })
  865. .then(() => {
  866. this.$Request.get(`/app/chat/deleteConversation?chatConversationId=${item.chatConversationId}`).then(res => {
  867. if (res.code == 0) {
  868. ElMessage({
  869. message: res.msg || '删除成功',
  870. type: 'success',
  871. duration: 1500,
  872. offset: this.screenHeight / 2
  873. })
  874. this.getChatList()
  875. }
  876. });
  877. })
  878. },
  879. getDateDiff(data) {
  880. // 兼容字符串或时间戳
  881. let timePublish;
  882. if (typeof data === 'string') {
  883. // PC 浏览器可以正常识别 "2026-01-05 18:46:39"
  884. timePublish = new Date(data.replace(/-/g, '/')); // 保留这步以防某些老浏览器异常
  885. } else if (typeof data === 'number') {
  886. timePublish = new Date(data);
  887. } else {
  888. timePublish = data instanceof Date ? data : new Date();
  889. }
  890. if (isNaN(timePublish.getTime())) return '';
  891. const timeNow = new Date();
  892. const publishYear = timePublish.getFullYear();
  893. const publishMonth = timePublish.getMonth() + 1;
  894. const publishDate = timePublish.getDate();
  895. const publishHour = timePublish.getHours().toString().padStart(2, '0');
  896. const publishMinute = timePublish.getMinutes().toString().padStart(2, '0');
  897. // 计算两个日期的“自然日”差值
  898. const nowZero = new Date(timeNow.getFullYear(), timeNow.getMonth(), timeNow.getDate());
  899. const publishZero = new Date(publishYear, timePublish.getMonth(), publishDate);
  900. const diffDays = Math.floor((nowZero - publishZero) / (1000 * 60 * 60 * 24));
  901. const weekDays = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'];
  902. const weekStr = weekDays[timePublish.getDay()];
  903. const sameYear = publishYear === timeNow.getFullYear();
  904. let result = '';
  905. if (diffDays === 0) {
  906. // 今天
  907. result = `${publishHour}:${publishMinute}`;
  908. } else if (diffDays === 1) {
  909. // 昨天
  910. result = `昨天 ${publishHour}:${publishMinute}`;
  911. } else if (diffDays < 7) {
  912. // 一周内
  913. result = `${weekStr} ${publishHour}:${publishMinute}`;
  914. } else if (sameYear) {
  915. // 同一年
  916. result = `${publishMonth}月${publishDate}日 ${publishHour}:${publishMinute}`;
  917. } else {
  918. // 跨年
  919. result = `${publishYear}年${publishMonth}月${publishDate}日 ${publishHour}:${publishMinute}`;
  920. }
  921. return result;
  922. },
  923. goToPage(){
  924. if (localStorage.getItem('token')) {
  925. const routeUrl = this.$router.resolve({
  926. name: 'resumeInfo',
  927. query: {
  928. resumesId: this.resumesId,
  929. postPushId: this.postPushId,
  930. ruleClassifyId: this.postPushInfo?.ruleClassifyId || '',
  931. }
  932. });
  933. window.open(routeUrl.href, '_blank');
  934. } else {
  935. this.$router.push({
  936. name: 'login'
  937. })
  938. }
  939. },
  940. handleClick(postPushId){
  941. if (localStorage.getItem('token')) {
  942. const routeUrl = this.$router.resolve({
  943. name: 'postInfo',
  944. query: {
  945. postPushId: postPushId
  946. }
  947. });
  948. window.open(routeUrl.href, '_blank');
  949. } else {
  950. this.$router.push({
  951. name: 'login'
  952. })
  953. }
  954. },
  955. getChangYong() {
  956. let state = 0
  957. if (this.userType == 1) {
  958. state = 70
  959. } else {
  960. state = 80
  961. }
  962. this.$Request.get(`/app/message/selectMessageByType?page=1&limit=100&state=${state}`)
  963. .then(res => {
  964. if (res.code == 0) {
  965. console.log(res.data.list)
  966. this.changYongList = [{ label: '你好啊,可以聊一聊~', id: 0 }];
  967. res.data.list.forEach(d => {
  968. let data = {
  969. label: d.content,
  970. id: d.id
  971. }
  972. this.changYongList.push(data);
  973. });
  974. }
  975. });
  976. },
  977. selConfirm(val){
  978. this.content = val;
  979. this.isShowCommon = false;
  980. },
  981. closePostPush(){
  982. this.showDialog = false
  983. },
  984. // 选择附件简历的数据
  985. selectItem(item){
  986. if(item.resumesAttachmentId){
  987. this.sendResumesSave(item.resumesAttachmentId);
  988. }
  989. },
  990. //关闭面试邀请回掉
  991. closeMs() {
  992. //清楚输入的值
  993. this.miamshi.detailedAddress = '';
  994. this.miamshi.interviewDateTime = '';
  995. this.miamshi.address = '';
  996. this.miamshi.remarks = '';
  997. this.miamshi.userId = '';
  998. this.miamshi.hrPhone = ''; //手机号
  999. this.miamshi.hrName = ''; //联系人
  1000. this.miamshi.position = ''; //面试岗位
  1001. },
  1002. jumpToTencentMap(latitude, longitude, name) {
  1003. var url = 'https://apis.map.qq.com/uri/v1/search?keyword=' + name + '&center=' + latitude + ',' +
  1004. longitude + '&radius=100&referer=OB4BZ-D4W3U-B7VVO-4PJWW-6TKDJ-WPB77';
  1005. window.open(url)
  1006. },
  1007. formatDate(dates, type) {
  1008. let date = new Date(dates)
  1009. let year = date.getFullYear()
  1010. let month = ("0" + (date.getMonth() + 1)).slice(-2)
  1011. let day = ("0" + date.getDate()).slice(-2)
  1012. let hour = date.getHours()
  1013. let minute = ("0" + date.getMinutes()).slice(-2)
  1014. // 处理 12小时制
  1015. let ampm = hour >= 12 ? 'PM' : 'AM'
  1016. hour = hour % 12
  1017. hour = hour ? hour : 12 // 0点转成12
  1018. hour = ("0" + hour).slice(-2)
  1019. if (type == 1) {
  1020. // 返回完整日期 + 固定时间
  1021. return `${year}-${month}-${day} 00:00:00`
  1022. } else {
  1023. // 返回 12小时制时间 + AM/PM
  1024. return `${hour}:${minute} ${ampm}`
  1025. }
  1026. },
  1027. submitMs() {
  1028. let obj = JSON.parse(JSON.stringify(this.miamshi))
  1029. let Time = this.formatDate(obj.interviewDateTime,1);
  1030. obj.detailTime = this.formatDate(obj.interviewDateTime,2);
  1031. let formms = this.$refs.formms
  1032. formms.validate((valid) => {
  1033. if (valid) {
  1034. if (!obj.lng || !obj.lat) {
  1035. ElMessage({
  1036. message: '请选择搜索出来的地址',
  1037. type: 'info',
  1038. duration: 1500,
  1039. offset: this.screenHeight / 2
  1040. })
  1041. return
  1042. }
  1043. let dataInfo = {
  1044. address:obj.address,
  1045. companyId:obj.companyId,
  1046. detailTime: obj.detailTime,
  1047. detailedAddress:obj.detailedAddress,
  1048. hrName: obj.hrName,
  1049. hrPhone: obj.hrPhone,
  1050. interviewDateTime: Time,
  1051. interviewerId:obj.userId,
  1052. lat: obj.lat,
  1053. lng: obj.lng,
  1054. onlineMsg:'',
  1055. onlineType:'',
  1056. postPushId: obj.postPushId,
  1057. recordId:'',//发送的这份面试的id,为空,代表添加,如果有值的话代表修改
  1058. remarks: obj.remarks,
  1059. resumesId:this.resumesId,
  1060. type:0
  1061. }
  1062. this.$Request.post("/app/interviewRecord/saveInterview", dataInfo, {
  1063. type: 'json'
  1064. }).then(res => {
  1065. if (res.code == 0) {
  1066. ElMessage({
  1067. message: '面试邀请已发送',
  1068. type: 'success',
  1069. duration: 1500,
  1070. offset: this.screenHeight / 2
  1071. })
  1072. this.sendMessage(99)
  1073. this.dialogms = false
  1074. }
  1075. // else {
  1076. // ElMessage({
  1077. // message: res.msg,
  1078. // type: 'error',
  1079. // duration: 1500,
  1080. // offset: this.screenHeight / 2
  1081. // })
  1082. // }
  1083. })
  1084. }
  1085. })
  1086. },
  1087. //选择地址
  1088. handleSelect(item) {
  1089. this.miamshi.companyId = localStorage.getItem('companyId');
  1090. this.miamshi.userId = this.byUserId
  1091. this.miamshi.postPushId = this.postPushId
  1092. this.miamshi.province = item.province
  1093. this.miamshi.city = item.city
  1094. this.miamshi.county = item.district
  1095. this.miamshi.lng = item.location.lng
  1096. this.miamshi.lat = item.location.lat
  1097. },
  1098. //地址搜索
  1099. querySearchAsync(queryString, cd) {
  1100. if (!queryString) {
  1101. cd([])
  1102. return
  1103. }
  1104. let data = {
  1105. key: "ZBABZ-ZWECU-UQTVV-4LYDR-COK3F-5SF75", //申请的密钥
  1106. keyword: queryString, //搜索内容
  1107. output: 'jsonp',
  1108. };
  1109. let url =
  1110. "https://apis.map.qq.com/ws/place/v1/suggestion"
  1111. axios.get(url, {
  1112. params: data,
  1113. adapter: jsonp
  1114. }).then(res => {
  1115. if (res.data.status == 0) {
  1116. let arr = res.data.data
  1117. arr.map(item => {
  1118. item.value = item.title
  1119. })
  1120. cd(arr)
  1121. }
  1122. }).catch(err => {
  1123. console.log(err)
  1124. })
  1125. },
  1126. //系统消息加载更多
  1127. handleScroll(e) {
  1128. if (this.sysPgae < this.sysPages) {
  1129. this.sysPgae += 1
  1130. this.getSysMsgList(false)
  1131. }
  1132. },
  1133. //获取系统通知列表
  1134. getSysMsgList(type) {
  1135. if (type) {
  1136. this.sysPgae = 1
  1137. }
  1138. this.liftIndex = -1
  1139. this.loading = true
  1140. let data = {
  1141. page: this.sysPgae,
  1142. limit: this.sysLimit,
  1143. // state: 5
  1144. }
  1145. this.$Request.get('/app/message/selectMessageByUserId', {
  1146. params: data
  1147. }).then(res => {
  1148. if (res.code === 0) {
  1149. this.selectIndex = 1
  1150. this.sysPages = res.data.totalPage
  1151. if (this.sysPgae == 1) {
  1152. this.sysMsgList = res.data.list
  1153. } else {
  1154. this.sysMsgList = [...this.sysMsgList, ...res.data.list]
  1155. }
  1156. }
  1157. });
  1158. },
  1159. initScoket() {
  1160. this.webSco = this.$socket.getSocket();
  1161. // 如果 WebSocket 已经连接,直接把状态标记为 true
  1162. if (this.webSco.readyState === WebSocket.OPEN) {
  1163. this.webSocketState = true
  1164. // console.log('✅ WebSocket 已经连接,状态直接标记为 true')
  1165. } else {
  1166. // 还未连接,绑定 onopen
  1167. this.webSco.onopen = this.websocketonopen.bind(this)
  1168. }
  1169. // 绑定其他回调
  1170. this.webSco.onmessage = this.websocketonmessage.bind(this)
  1171. this.webSco.onerror = this.websocketonerror.bind(this)
  1172. this.webSco.onclose = this.websocketclose.bind(this)
  1173. },
  1174. //监听接收到消息的回调
  1175. websocketonmessage(event) {
  1176. this.webSocketState = true
  1177. // console.log(event, '收到消息')
  1178. //收到消息后再获取聊天记录
  1179. this.getCHarList()
  1180. },
  1181. //监听错误的回调
  1182. websocketonerror(event) {
  1183. //连接错误后把连接状态设为false
  1184. this.webSocketState = false
  1185. // console.log(event, '连接错误')
  1186. },
  1187. //监听链接打开的回调
  1188. websocketonopen(event) {
  1189. this.webSocketState = true
  1190. // console.log(event, '连接已打开')
  1191. },
  1192. //监听关闭的回调
  1193. websocketclose(event) {
  1194. // 关闭连接后把状态设为false
  1195. this.webSocketState = false
  1196. // console.log(event, '连接已关闭')
  1197. },
  1198. //开始聊天
  1199. startMsg(item, index) {
  1200. this.ruleClassifyName = item.stationName;//岗位名称
  1201. this.liftIndex = index
  1202. this.czList = [{
  1203. name: '',
  1204. src: '/images/postimg/emij.png',
  1205. srcS: '/images/postimg/emij_s.png',
  1206. },
  1207. {
  1208. name: '',
  1209. src: '/images/postimg/photo.png',
  1210. srcS: '/images/postimg/photo_s.png',
  1211. },
  1212. {
  1213. name: '',
  1214. src: '/images/postimg/cyy.png',
  1215. srcS: '/images/postimg/cyy_s.png',
  1216. },
  1217. {
  1218. name: '发简历',
  1219. src: '/images/postimg/jl.png',
  1220. srcS: '/images/postimg/jl_s.png',
  1221. },
  1222. {
  1223. name: '换电话',
  1224. src: '/images/postimg/phone.png',
  1225. srcS: '/images/postimg/phone_s.png',
  1226. },
  1227. {
  1228. name: '换微信',
  1229. src: '/images/postimg/weichat.png',
  1230. srcS: '/images/postimg/weichat_s.png',
  1231. }
  1232. ]
  1233. this.postPushId = item.postPushId
  1234. this.chatConversationId = item.chatConversationId
  1235. this.getPostPushInfo()
  1236. if (this.userType == 1) { //用户
  1237. this.byUserId = item.focusedUserId
  1238. this.czList[3].name = '发简历'
  1239. // 获取用户是否有面试记录
  1240. this.recordsInter = setInterval(() => {
  1241. this.getInterviewList()
  1242. }, 2500)
  1243. } else { //招聘者
  1244. this.byUserId = item.userId
  1245. this.resumesId = item.resumesId
  1246. this.czList[3].name = '求简历'
  1247. this.czList.push({
  1248. name: '约面试',
  1249. src: '/images/postimg/yms.png',
  1250. srcS: '/images/postimg/yms_.png',
  1251. })
  1252. this.getResumesInfo(this.resumesId)
  1253. }
  1254. //获取聊天记录
  1255. this.getCHarList();
  1256. //获取交换状态
  1257. this.getStatusInfo()
  1258. this.selectIndex = 3
  1259. },
  1260. //关闭弹窗
  1261. closeDialog() {
  1262. this.isShowEmoj = false
  1263. this.isShowCommon = false
  1264. },
  1265. // 获取用户是否有面试记录
  1266. getInterviewList() {
  1267. let data = {
  1268. status: 1,
  1269. postPushId: this.postPushId
  1270. }
  1271. this.$Request.get("/app/interviewRecord/interviewList", {params: data }).then(res => {
  1272. if (res.code == 0) {
  1273. if ((res.data.records).length > 0) {
  1274. this.recordInfo = res.data.records[0]
  1275. this.showBtn = true;
  1276. }else{
  1277. this.recordInfo = {}
  1278. this.showBtn = false;
  1279. }
  1280. }
  1281. })
  1282. },
  1283. // 同意简历请求并发送简历
  1284. sendResumesSave(resumesAttachmentId) {
  1285. let that = this
  1286. let data = {
  1287. to: this.byUserId, //接收人的userId
  1288. postPushId: this.postPushId, //岗位id
  1289. resumesAttachmentId
  1290. }
  1291. this.$Request.post("/app/resumes/sendResumes", data).then(res => {
  1292. if (res.code == 0) {
  1293. ElMessage({
  1294. message: '简历已发送',
  1295. type: 'success',
  1296. duration: 1500,
  1297. offset: this.screenHeight / 2
  1298. })
  1299. this.sendMessage(24)
  1300. this.getCHarList()
  1301. this.getStatusInfo()
  1302. }
  1303. })
  1304. },
  1305. //同意简历请求
  1306. resumesTy() {
  1307. ElMessageBox.confirm(
  1308. '确定发送简历给对方?',
  1309. '提示', {
  1310. confirmButtonText: '确定',
  1311. cancelButtonText: '取消',
  1312. type: 'warning',
  1313. }
  1314. )
  1315. .then(() => {
  1316. this.showDialog = true;
  1317. }).catch(() => {
  1318. })
  1319. },
  1320. //同意交换手机号/微信
  1321. tongyi(messageType, chatContentId) {
  1322. if (messageType == 6 && !this.$store.state.weChatNum) {
  1323. ElMessageBox.confirm(
  1324. '请点击右上角头像的个人信息完善微信号后操作',
  1325. '提示', {
  1326. confirmButtonText: '去完善',
  1327. cancelButtonText: '取消',
  1328. type: 'warning',
  1329. }
  1330. )
  1331. .then(() => {
  1332. }).catch(() => {
  1333. })
  1334. return
  1335. }
  1336. let that = this
  1337. ElMessageBox.confirm(
  1338. messageType == 5 ? '同意后将交换手机号,是否同意?' : '同意后将交换微信号,是否同意?',
  1339. '提示', {
  1340. confirmButtonText: '同意',
  1341. cancelButtonText: '取消',
  1342. type: 'warning',
  1343. }
  1344. )
  1345. .then(() => {
  1346. let data = {
  1347. messageType: messageType,
  1348. chatContentId: chatContentId
  1349. }
  1350. that.$Request.post("/app/chat/sendPhoneOrWx", data).then(res => {
  1351. if (res.code == 0) {
  1352. this.sendMessage(24)
  1353. this.getCHarList()
  1354. that.getStatusInfo()
  1355. }
  1356. })
  1357. }).catch(() => {
  1358. })
  1359. },
  1360. //请求拒绝
  1361. refuseFun(id) {
  1362. ElMessageBox.confirm(
  1363. '确定拒绝吗?',
  1364. '提示', {
  1365. confirmButtonText: '确认',
  1366. cancelButtonText: '取消',
  1367. type: 'warning',
  1368. }
  1369. )
  1370. .then(() => {
  1371. let data = {
  1372. chatContentId: id
  1373. }
  1374. this.$Request.get("/app/chat/refuseReqs", {
  1375. params: data
  1376. }).then(res => {
  1377. if (res.code == 0) {
  1378. ElMessage({
  1379. message: '已拒绝',
  1380. type: 'success',
  1381. duration: 1500,
  1382. offset: this.screenHeight / 2
  1383. })
  1384. this.sendMessage(24)
  1385. this.getCHarList()
  1386. this.getStatusInfo()
  1387. } else {
  1388. ElMessage({
  1389. message: res.msg,
  1390. type: 'error',
  1391. duration: 1500,
  1392. offset: this.screenHeight / 2
  1393. })
  1394. }
  1395. })
  1396. }).catch(() => {
  1397. })
  1398. },
  1399. //发送图片
  1400. handleAvatarSuccess(res) {
  1401. let data = {
  1402. userId: this.byUserId, //id
  1403. content: res.data, //消息内容
  1404. messageType: 2, //消息类型
  1405. chatConversationId: this.chatConversationId //聊天室id
  1406. }
  1407. //把要发送的消息转换为json字符串
  1408. data = JSON.stringify(data);
  1409. //如果scoket是连接状态,那么就直接发送消息
  1410. if (this.webSocketState) {
  1411. // 发送消息
  1412. this.webSco.send(data)
  1413. setTimeout(() => {
  1414. //发送消息后晴空输入框
  1415. this.content = ''
  1416. //获取聊天记录
  1417. this.getCHarList()
  1418. }, 100)
  1419. } else { //如果不是,那么就重新连接
  1420. this.initScoket()
  1421. }
  1422. },
  1423. // 发送消息 type:1:文字 2:图片 3:语音 4:表情
  1424. sendMessage(type, url) {
  1425. let data = {
  1426. userId: this.byUserId, //id
  1427. content: this.content.replace(/\n/g, ''), //消息内容
  1428. messageType: type, //消息类型
  1429. chatConversationId: this.chatConversationId //聊天室id
  1430. }
  1431. if (type == 1 && !data.content) { //文字
  1432. ElMessage({
  1433. message: '请输入聊天内容',
  1434. type: 'error',
  1435. duration: 1500,
  1436. offset: this.screenHeight / 2
  1437. })
  1438. this.content = ''
  1439. return
  1440. }
  1441. if (type == 4) { //发送表情
  1442. data.content = url
  1443. }
  1444. if (type == 5) { //交换手机号请求
  1445. data.content = '手机号请求';
  1446. }
  1447. if (type == 6) { //交换微信号请求
  1448. data.content = '微信号请求';
  1449. }
  1450. if (type == 9) { //简历请求
  1451. data.content = '简历请求';
  1452. }
  1453. if (type == 24) { //刷新
  1454. data.content = '刷新';
  1455. }
  1456. if (type == 96) { //拒绝面试邀约
  1457. data.content = '已拒绝面试邀请';
  1458. data.recordId = url
  1459. }
  1460. if (type == 97) { //同意面试邀约
  1461. data.content = '已接受面试邀请';
  1462. data.recordId = url
  1463. }
  1464. if(type == 99){ //面试邀约
  1465. data.content = '一份面试邀约';
  1466. }
  1467. //把要发送的消息转换为json字符串
  1468. data = JSON.stringify(data);
  1469. //如果scoket是连接状态,那么就直接发送消息
  1470. if (this.webSocketState) {
  1471. // 发送消息
  1472. this.webSco.send(data)
  1473. setTimeout(() => {
  1474. //发送消息后晴空输入框
  1475. this.content = ''
  1476. //获取聊天记录
  1477. this.getCHarList()
  1478. }, 100)
  1479. } else { //如果不是,那么就重新连接
  1480. this.initScoket()
  1481. }
  1482. },
  1483. //发简历
  1484. sendResumes() {
  1485. ElMessageBox.confirm(
  1486. '是否将简历发送给对方?',
  1487. '提示', {
  1488. confirmButtonText: '发送',
  1489. cancelButtonText: '取消',
  1490. type: 'warning',
  1491. }
  1492. )
  1493. .then(() => {
  1494. this.showDialog = true;
  1495. }).catch(() => {
  1496. })
  1497. },
  1498. //交换手机号弹窗
  1499. currentPhone() {
  1500. let that = this
  1501. if (this.isSendPhone == false) {
  1502. ElMessageBox.confirm(
  1503. '确定后,电话交换请求将发送给对方,对方同意后将会看到彼此的手机号',
  1504. '确定与对方交换电话吗?', {
  1505. confirmButtonText: '确定',
  1506. cancelButtonText: '取消',
  1507. type: 'warning',
  1508. }
  1509. )
  1510. .then(() => {
  1511. that.sendMessage(5)
  1512. }).catch(() => {
  1513. })
  1514. } else {
  1515. ElMessage({
  1516. message: '已交换过手机号,请查看聊天记录',
  1517. type: 'error',
  1518. duration: 1500,
  1519. offset: this.screenHeight / 2
  1520. })
  1521. }
  1522. },
  1523. //交换微信号弹窗
  1524. currentWchat() {
  1525. let that = this
  1526. if (!this.$store.state.weChatNum) {
  1527. ElMessageBox.confirm(
  1528. '请点击右上角头像的个人信息完善微信号后操作',
  1529. '提示', {
  1530. confirmButtonText: '去完善',
  1531. cancelButtonText: '取消',
  1532. type: 'warning',
  1533. }
  1534. )
  1535. .then(() => {
  1536. }).catch(() => {
  1537. })
  1538. return
  1539. }
  1540. if (this.isSendWx == false) {
  1541. ElMessageBox.confirm(
  1542. '确定后,微信交换请求将发送给对方,对方同意后将会看到彼此的微信号',
  1543. '确定与对方交换微信吗?', {
  1544. confirmButtonText: '确定',
  1545. cancelButtonText: '取消',
  1546. type: 'warning',
  1547. }
  1548. )
  1549. .then(() => {
  1550. that.sendMessage(6)
  1551. }).catch(() => {
  1552. })
  1553. } else {
  1554. ElMessage({
  1555. message: '已交换过微信号,请查看聊天记录',
  1556. type: 'error',
  1557. duration: 1500,
  1558. offset: this.screenHeight / 2
  1559. })
  1560. }
  1561. },
  1562. //求简历
  1563. giveSendResumes() {
  1564. ElMessageBox.confirm(
  1565. '是否将简历请求发送给对方?',
  1566. '确定获取对方简历吗?', {
  1567. confirmButtonText: '确定',
  1568. cancelButtonText: '取消',
  1569. type: 'warning',
  1570. }
  1571. )
  1572. .then(() => {
  1573. this.sendMessage(9)
  1574. }).catch(() => {
  1575. })
  1576. },
  1577. //操作
  1578. czlist(index) {
  1579. switch (index) {
  1580. case 0: //显示表情
  1581. this.isShowEmoj = true
  1582. break;
  1583. case 2: //显示常用语
  1584. this.isShowCommon = true
  1585. break;
  1586. case 3: //发简历
  1587. if (this.userType == 1) { //发简历
  1588. this.sendResumes()
  1589. } else { //求简历
  1590. this.giveSendResumes()
  1591. }
  1592. break;
  1593. case 4: //换电话
  1594. this.currentPhone()
  1595. break;
  1596. case 5: //换微信
  1597. this.currentWchat()
  1598. break;
  1599. case 6: //约面试
  1600. this.openDialog();
  1601. break;
  1602. default:
  1603. break;
  1604. }
  1605. },
  1606. // 赋值地址和联系人数据
  1607. openDialog() {
  1608. this.miamshi = {
  1609. hrPhone: this.$store.state.phone || '',
  1610. hrName: this.$store.state.nickName || '',
  1611. position: this.jobList[0].ruleClassifyId,
  1612. interviewDateTime: '',
  1613. companyId: localStorage.getItem('companyId') || '',
  1614. remarks: '',
  1615. userId: this.byUserId || '',
  1616. postPushId: this.postPushId || '',
  1617. province: this.jobList[0].province || '',
  1618. city: this.jobList[0].city || '',
  1619. county: this.jobList[0].county || '',
  1620. lng: this.jobList[0].lng || '',
  1621. lat: this.jobList[0].lat || '',
  1622. address: this.jobList[0]?.address.split(' ')[0] || '',
  1623. detailedAddress: this.jobList[0]?.address.split(' ')[1] || '',
  1624. }
  1625. this.dialogms = true;
  1626. },
  1627. //还原图片
  1628. resetImageSrc(index) {
  1629. this.czIndex = -1
  1630. },
  1631. //显示图片
  1632. changeImageSrc(index) {
  1633. this.czIndex = index
  1634. },
  1635. //获取交换状态
  1636. getStatusInfo() {
  1637. let data = {
  1638. chatConversationId: this.chatConversationId
  1639. }
  1640. this.$Request.get("/app/chat/getConversationInfo", {
  1641. params: data
  1642. }).then(res => {
  1643. if (res.code == 0) {
  1644. this.conversationInfo = res.data
  1645. if (res.data.isSendWx) { //是否交换微信
  1646. this.isSendWx = true
  1647. } else {
  1648. this.isSendWx = false
  1649. }
  1650. if (res.data.isSendPhone) { //是否交换电话
  1651. this.isSendPhone = true
  1652. } else {
  1653. this.isSendPhone = false
  1654. }
  1655. }
  1656. })
  1657. },
  1658. //获取聊天记录
  1659. getCHarList() {
  1660. let data = {
  1661. page: this.page,
  1662. limit: this.limit,
  1663. chatConversationId: this.chatConversationId,
  1664. userId: this.userId
  1665. }
  1666. this.$Request.get('/app/chat/selectChatContent', {
  1667. params: data
  1668. }).then(res => {
  1669. if (res.code == 0) {
  1670. res.data.list.map(item => {
  1671. if (item.messageType == 18) {
  1672. item.content = JSON.parse(item.content)
  1673. }
  1674. })
  1675. this.megList = res.data.list
  1676. this.megList.reverse();
  1677. //等数据更新后滚动到最底下
  1678. this.$nextTick(() => {
  1679. this.$refs.messageBox.scrollTop = this.$refs.messageBox.scrollHeight
  1680. })
  1681. }
  1682. })
  1683. },
  1684. //获取简历数据
  1685. getResumesInfo(id) {
  1686. let data = {
  1687. userId: localStorage.getItem('userId'),
  1688. resumesId: id,
  1689. companyId: localStorage.getItem('companyId')
  1690. }
  1691. this.$Request.get("/app/resumes/selectResumesByResumesId", {
  1692. params: data
  1693. }).then(res => {
  1694. if (res.code == 0) {
  1695. res.data.intentionRuleClassifyName = this.ruleClassifyName
  1696. res.data.intentionSalaryRange = ''
  1697. res.data.intentionList.forEach(item => {
  1698. if (item.ruleClassifyName == this.ruleClassifyName) {
  1699. res.data.intentionRuleClassifyName = item.ruleClassifyName
  1700. res.data.intentionSalaryRange = item.salaryRange
  1701. }
  1702. })
  1703. this.resumesInfo = res.data
  1704. }
  1705. })
  1706. },
  1707. //获取岗位数据
  1708. getPostPushInfo() {
  1709. let data = {
  1710. userId: this.userId,
  1711. postPushId: this.postPushId
  1712. }
  1713. this.$Request.get("/app/postPush/selectPostPushDetails", {
  1714. params: data
  1715. }).then(res => {
  1716. if (res.code == 0) {
  1717. this.title = res.data.company.companyName
  1718. this.postPushInfo = res.data
  1719. // this.postPushInfo.positionWelfare = this.postPushInfo?.positionWelfare.split(',');
  1720. // 选择的岗位列表
  1721. this.jobList = [{
  1722. ...res.data
  1723. }];
  1724. }
  1725. })
  1726. },
  1727. getChatList() {
  1728. let data = {
  1729. page: 1,
  1730. limit: 99999
  1731. }
  1732. this.$Request.get("/app/chat/selectChatConversationPage", {
  1733. params: data
  1734. }).then(res => {
  1735. if (res.code == 0) {
  1736. this.leftList = res.data?.list || []
  1737. }
  1738. });
  1739. },
  1740. getweiduMsg() {
  1741. this.$Request.get("/app/chats/userCount").then(res => {
  1742. if (res.code == 0) {
  1743. this.userCount = res.data
  1744. }
  1745. });
  1746. },
  1747. //获取系统消息
  1748. getMsgList() {
  1749. this.$Request.get("/app/message/selectMessageByUserIdLimit1").then(res => {
  1750. if (res.code == 0) {
  1751. this.msgList = res.data.list
  1752. }
  1753. });
  1754. },
  1755. }
  1756. }
  1757. </script>
  1758. <style lang="scss" scoped>
  1759. $margin-60: 120px;
  1760. .message {
  1761. width: 100%;
  1762. // padding-top: 20px;
  1763. }
  1764. .megActive {
  1765. background-color: #F0F0F0;
  1766. }
  1767. :deep(.el-textarea) {
  1768. --el-input-focus-border: none;
  1769. --el-input-focus-border-color: none;
  1770. }
  1771. :deep(.el-textarea__inner) {
  1772. box-shadow: none !important;
  1773. }
  1774. :deep(.el-textarea__inner:hover) {
  1775. box-shadow: none;
  1776. .is-focus {
  1777. box-shadow: none;
  1778. }
  1779. }
  1780. :deep(.el-dialog) {
  1781. border-radius: 14px !important;
  1782. }
  1783. :deep(.el-dialog__body) {
  1784. padding: 0 !important;
  1785. padding-top: 10px !important;
  1786. }
  1787. :deep(.el-dialog__header) {
  1788. background: linear-gradient(45deg, #f2fffa, #FFFFFF);
  1789. border-radius: 14px 14px 0 0;
  1790. }
  1791. .content {
  1792. width: calc(100% - $margin-60 * 2);
  1793. height: 80vh;
  1794. margin-top: 20px;
  1795. }
  1796. .content-l {
  1797. width: 30%;
  1798. height: 80vh;
  1799. background-color: #ffffff;
  1800. border-radius: 14px;
  1801. .tabs {
  1802. padding: 20px;
  1803. padding-bottom: 0;
  1804. }
  1805. .content-l-box {
  1806. width: 100%;
  1807. height: calc(80vh - 40px);
  1808. align-content: flex-start;
  1809. overflow: hidden;
  1810. overflow-y: scroll;
  1811. }
  1812. .content-l-box::-webkit-scrollbar {
  1813. /* Chrome, Safari, Opera */
  1814. width: 0px;
  1815. }
  1816. .content-l-box::-webkit-scrollbar-thumb {
  1817. background-color: #cccccc;
  1818. /* 滚动条颜色 */
  1819. }
  1820. .content-l-box::-webkit-scrollbar-track {
  1821. background-color: #ffffff;
  1822. /* 轨道颜色 */
  1823. }
  1824. .content-l-box-items:hover {
  1825. background-color: #F0F0F0;
  1826. }
  1827. .content-l-box-items {
  1828. width: calc(100% - 20px);
  1829. height: fit-content;
  1830. border-radius: 13px;
  1831. margin-bottom: 10px;
  1832. }
  1833. .content-l-box-item {
  1834. margin: 10px 0;
  1835. cursor: pointer;
  1836. padding: 0 20px;
  1837. }
  1838. .content-l-box-item-l {
  1839. img {
  1840. width: 46px;
  1841. height: 46px;
  1842. border-radius: 50%;
  1843. }
  1844. }
  1845. .content-l-box-item-con {
  1846. margin-left: 10px;
  1847. }
  1848. .content-l-box-item-con-title {
  1849. color: #222222;
  1850. font-size: 15px;
  1851. font-weight: 500;
  1852. span {
  1853. color: #999999;
  1854. font-size: 13px;
  1855. font-weight: 400;
  1856. margin-left: 5px;
  1857. }
  1858. }
  1859. .content-l-box-item-con-cons {
  1860. color: #999999;
  1861. font-size: 13px;
  1862. margin-top: 5px;
  1863. }
  1864. .content-l-box-item-r {
  1865. width: fit-content;
  1866. color: #999999;
  1867. font-size: 13px;
  1868. .content-l-box-item-r-dian {
  1869. width: 20px;
  1870. height: 20px;
  1871. border-radius: 50%;
  1872. background-color: red;
  1873. color: #ffffff;
  1874. }
  1875. }
  1876. }
  1877. .content-r {
  1878. width: calc(70% - 20px);
  1879. height: 80vh;
  1880. background-color: #ffffff;
  1881. border-radius: 14px;
  1882. .content-r-tz {
  1883. width: 90%;
  1884. height: 90%;
  1885. margin: auto;
  1886. margin-top: 3%;
  1887. overflow: hidden;
  1888. overflow-y: scroll;
  1889. }
  1890. .content-r-tz::-webkit-scrollbar {
  1891. /* Chrome, Safari, Opera */
  1892. width: 0px;
  1893. }
  1894. .content-r-tz::-webkit-scrollbar-thumb {
  1895. background-color: #cccccc;
  1896. /* 滚动条颜色 */
  1897. }
  1898. .content-r-tz::-webkit-scrollbar-track {
  1899. background-color: #ffffff;
  1900. /* 轨道颜色 */
  1901. }
  1902. .content-r-tz-item {
  1903. width: 100%;
  1904. padding: 10px 0;
  1905. border-bottom: 1px solid #f8f8f8;
  1906. }
  1907. .content-r-tz-item-title {
  1908. color: #222222;
  1909. font-size: 15px;
  1910. font-weight: 500px;
  1911. }
  1912. .content-r-tz-item-cons {
  1913. font-size: 13px;
  1914. font-weight: 400;
  1915. margin-top: 10px;
  1916. color: #999999;
  1917. }
  1918. .content-r-no {
  1919. width: 100%;
  1920. height: 100%;
  1921. align-content: center;
  1922. img {
  1923. width: 300px;
  1924. height: 200px;
  1925. }
  1926. .content-r-no-txt {
  1927. width: 100%;
  1928. text-align: center;
  1929. margin-top: 20px;
  1930. font-size: 14px;
  1931. }
  1932. }
  1933. .content-r-msg {
  1934. width: 100%;
  1935. height: 100%;
  1936. }
  1937. .content-r-msg-title {
  1938. width: calc(100% - 40px);
  1939. height: 55px;
  1940. padding: 0 20px;
  1941. border-bottom: 1px solid #EBEBEB;
  1942. .content-r-msg-title-s {
  1943. font-size: 16px;
  1944. font-weight: 5000;
  1945. color: #222222;
  1946. }
  1947. .content-r-msg-title-n {
  1948. color: #999999;
  1949. font-size: 14px;
  1950. font-weight: 400;
  1951. }
  1952. .content-r-msg-title-p {
  1953. color: red;
  1954. font-size: 14px;
  1955. font-weight: 400;
  1956. margin-left: 10px;
  1957. }
  1958. .content-r-msg-title-e {
  1959. color: #999999;
  1960. font-size: 14px;
  1961. font-weight: 400;
  1962. margin-left: 10px;
  1963. }
  1964. }
  1965. .content-r-msg-chat {
  1966. width: 100%;
  1967. height: calc(80vh - 255px);
  1968. }
  1969. .content-r-msg-chats {
  1970. width: calc(100% - 40px);
  1971. height: calc(100% - 40px);
  1972. overflow: hidden;
  1973. overflow-y: scroll;
  1974. }
  1975. .content-r-msg-chats::-webkit-scrollbar {
  1976. /* Chrome, Safari, Opera */
  1977. width: 0px;
  1978. }
  1979. .content-r-msg-chats::-webkit-scrollbar-thumb {
  1980. background-color: #cccccc;
  1981. /* 滚动条颜色 */
  1982. }
  1983. .content-r-msg-chats::-webkit-scrollbar-track {
  1984. background-color: #ffffff;
  1985. /* 轨道颜色 */
  1986. }
  1987. .message-box-item {
  1988. width: 100%;
  1989. margin-bottom: 20px;
  1990. }
  1991. .message-boxs {
  1992. width: 100%;
  1993. .message-boxs-avatar {
  1994. width: 40px;
  1995. height: 40px;
  1996. border-radius: 50%;
  1997. }
  1998. }
  1999. .message-box-l {
  2000. img {
  2001. margin-right: 10px;
  2002. }
  2003. .message-box-l-con {
  2004. max-width: 40%;
  2005. padding: 10px;
  2006. border-radius: 13px 13px 13px 0;
  2007. background-color: #F8F8F8;
  2008. color: #333333;
  2009. cursor: pointer;
  2010. }
  2011. .message-box-l-phone {
  2012. background: linear-gradient(to bottom, #D9FEED, #ffffff);
  2013. // background-color: red;
  2014. padding: 10px;
  2015. border-radius: 13px 13px 13px 0;
  2016. }
  2017. .message-box-l-phone-btn {
  2018. justify-content: flex-end;
  2019. margin-top: 10px;
  2020. }
  2021. }
  2022. .message-box-r {
  2023. justify-content: flex-end;
  2024. img {
  2025. margin-left: 10px;
  2026. }
  2027. .message-box-r-con {
  2028. max-width: 40%;
  2029. padding: 10px;
  2030. border-radius: 13px 13px 0 13px;
  2031. background: #00DD9A;
  2032. color: #FFFFFF;
  2033. cursor: pointer;
  2034. }
  2035. .invitation{
  2036. background: linear-gradient(rgb(217, 254, 237), rgb(255, 255, 255));
  2037. border: 0.5px solid rgb(198, 254, 231);
  2038. color: #000;
  2039. }
  2040. }
  2041. .inv-style{
  2042. background: linear-gradient(rgb(217, 254, 237), rgb(255, 255, 255));
  2043. border: 0.5px solid rgb(198, 254, 231);
  2044. color: #000;
  2045. }
  2046. .content-r-msg-btom {
  2047. width: 100%;
  2048. height: 200px;
  2049. border-top: 1px solid #E6E6E6;
  2050. }
  2051. .content-r-msg-btoms {
  2052. width: calc(100% - 40px);
  2053. height: calc(100% - 40px);
  2054. }
  2055. .message-btom-content {
  2056. width: 100%;
  2057. height: 70%;
  2058. }
  2059. .message-btom-btn {
  2060. width: 100%;
  2061. height: 30%;
  2062. }
  2063. .message-btom-btn-l {
  2064. position: relative;
  2065. .message-btom-btn-l-emj {
  2066. width: 490px;
  2067. height: 300px;
  2068. background-color: #ffffff;
  2069. border-radius: 10px 10px 10px 0;
  2070. position: absolute;
  2071. bottom: 30px;
  2072. border: 1px solid #f2f5fa;
  2073. box-shadow: 0 0 14px rgba(0, 0, 0, .11);
  2074. }
  2075. .message-btom-btn-l-emj-box {
  2076. width: calc(100% - 40px);
  2077. height: calc(100% - 40px);
  2078. overflow: hidden;
  2079. overflow-y: scroll;
  2080. img {
  2081. width: 30px;
  2082. height: 30px;
  2083. padding: 5px;
  2084. cursor: pointer;
  2085. }
  2086. }
  2087. .message-btom-btn-l-emj-box::-webkit-scrollbar {
  2088. /* Chrome, Safari, Opera */
  2089. width: 0px;
  2090. }
  2091. .message-btom-btn-l-emj-box::-webkit-scrollbar-thumb {
  2092. background-color: #ffffff;
  2093. /* 滚动条颜色 */
  2094. }
  2095. .message-btom-btn-l-emj-box::-webkit-scrollbar-track {
  2096. background-color: #ffffff;
  2097. /* 轨道颜色 */
  2098. }
  2099. .message-btom-btn-l-emjs {
  2100. position: absolute;
  2101. bottom: 22px;
  2102. width: 0;
  2103. height: 0;
  2104. border-left: 10px solid transparent;
  2105. /* 根据需要设置边框宽度 */
  2106. border-right: 10px solid transparent;
  2107. /* 根据需要设置边框宽度 */
  2108. border-top: 10px solid #ffffff;
  2109. /* 根据需要设置边框颜色 */
  2110. }
  2111. .message-btom-btn-l-item {
  2112. margin-right: 15px;
  2113. cursor: pointer;
  2114. color: #666666;
  2115. font-size: 14px;
  2116. img {
  2117. width: 20px;
  2118. height: 20px;
  2119. margin-right: 2px;
  2120. }
  2121. }
  2122. .message-btom-btn-l-item:hover {
  2123. color: #00DD9A;
  2124. }
  2125. .message-btom-btn-l-item:nth-of-type(1):hover {
  2126. img {
  2127. src: '/images/postimg/emij_s.png'
  2128. }
  2129. }
  2130. }
  2131. }
  2132. .sentence-panel{
  2133. margin: 0 !important;
  2134. padding: 0 !important;
  2135. }
  2136. .message-text{
  2137. height: 34px;
  2138. line-height: 34px;
  2139. border-radius: 4px;
  2140. z-index: 1;
  2141. overflow: hidden;
  2142. cursor: pointer;
  2143. white-space: nowrap;
  2144. text-overflow: ellipsis;
  2145. padding: 0 12px 0 24px;
  2146. font-size: 13px;
  2147. font-weight: 400;
  2148. color: #333;
  2149. border: none;
  2150. position: relative;
  2151. }
  2152. .message-text:hover{
  2153. background-color: #f8f8f8;
  2154. }
  2155. .message-text:before{
  2156. content: "";
  2157. position: absolute;
  2158. top: 14px;
  2159. left: 10px;
  2160. width: 6px;
  2161. height: 6px;
  2162. border-radius: 50%;
  2163. background: #d9d9d9;
  2164. }
  2165. .resume-box{
  2166. margin-bottom: 20px;
  2167. background-color: #F0F0F0;
  2168. border-radius: 8px;
  2169. padding: 15px;
  2170. cursor: pointer;
  2171. .resume-avatar{
  2172. width: 46px;
  2173. height: 46px;
  2174. border-radius: 50%;
  2175. margin-right: 10px;
  2176. }
  2177. .text-color{
  2178. color: #016BF6;
  2179. font-size: 14px;
  2180. margin-left: 5px;
  2181. }
  2182. .resume-label{
  2183. color: #9ca4ab;
  2184. font-size: 14px;
  2185. gap: 10px;
  2186. }
  2187. .information{
  2188. margin: 10px 0;
  2189. }
  2190. .resume-tag{
  2191. gap:6px;
  2192. }
  2193. .resume-content{
  2194. color: #616e7c;
  2195. font-size: 14px;
  2196. }
  2197. .resume-time{
  2198. border-top: 1px solid #e9e3e3;
  2199. padding-top: 5px;
  2200. }
  2201. .position-title{
  2202. font-size: 20px;
  2203. font-weight: 500;
  2204. }
  2205. .position-num{
  2206. color: #016bf6;
  2207. font-size: 16px;
  2208. margin-left: 10px;
  2209. }
  2210. .company-text{
  2211. color: #9ca4ab;
  2212. margin-top: 5px;
  2213. }
  2214. .position-content{
  2215. color: #999999;
  2216. font-size: 14px;
  2217. white-space: pre-wrap;
  2218. }
  2219. .position-content-itemAll{
  2220. display: -webkit-box;
  2221. -webkit-line-clamp: 4;
  2222. -webkit-box-orient: vertical;
  2223. overflow: hidden;
  2224. text-overflow: ellipsis;
  2225. }
  2226. .expand-more{
  2227. color: #007AFF;
  2228. font-size: 14px;
  2229. cursor: pointer;
  2230. margin-top: 10px;
  2231. }
  2232. .personnel{
  2233. margin: 10px 0;
  2234. font-size: 14px;
  2235. color: #1A1A1A;
  2236. }
  2237. }
  2238. .delete-btn{
  2239. display: none;
  2240. }
  2241. .content-l-box-item:hover .delete-btn {
  2242. display: flex;
  2243. }
  2244. .contentCount{
  2245. height: 18px;
  2246. border-radius: 10px;
  2247. background-color: #f56c6c;
  2248. color: #FFF;
  2249. text-align: center;
  2250. position: absolute;
  2251. top: 0;
  2252. right: -5px;
  2253. font-size: 12px;
  2254. display: inline-flex;
  2255. justify-content: center;
  2256. padding: 0 6px;
  2257. }
  2258. .avatar-img{
  2259. width: 50px;
  2260. height: 50px;
  2261. border-radius: 50%;
  2262. }
  2263. .avatorm-box-item{
  2264. line-height: 30px;
  2265. }
  2266. </style>