messageCom.vue 42 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485
  1. <template>
  2. <div class="messageCom" @click.stop="closeDialog()">
  3. <el-dialog :close-on-press-escape="false" :close-on-click-modal="false" width="70%" v-model="show"
  4. @close="closeShow" :draggable="true" destroy-on-close align-center center>
  5. <template #header>
  6. <div class="my-header flex align-center" v-if="userType==1">
  7. <div class="my-header-title" style="font-weight: bold;">
  8. {{title}}
  9. </div>
  10. <el-divider direction="vertical" />
  11. <div class="my-header-name">
  12. {{postPushInfo.stationName}}
  13. </div>
  14. <div class="my-header-price">
  15. {{postPushInfo.salaryRange}}
  16. </div>
  17. <div class="my-header-yq">
  18. {{postPushInfo.education}}
  19. </div>
  20. </div>
  21. <div class="my-header flex align-center" v-else>
  22. <div class="my-header-title" style="font-weight: bold;">
  23. {{resumesInfo.userName}}
  24. </div>
  25. <el-divider direction="vertical" />
  26. <div class="my-header-name">
  27. {{resumesInfo.intentionRuleClassifyName}}
  28. </div>
  29. <div class="my-header-price">
  30. {{resumesInfo.intentionSalaryRange}}
  31. </div>
  32. <div class="my-header-yq">
  33. {{ resumesInfo.resumesWorkExperience || '0' }}年
  34. </div>
  35. </div>
  36. </template>
  37. <div class="message">
  38. <div ref="messageBox" class="message-box">
  39. <div class="message-box-item" v-for="(item,index) in megList" :key="index">
  40. <!-- 对方的消息 -->
  41. <div class="message-boxs message-box-l flex flex-wrap" v-if="item.userId != userId">
  42. <img class="message-boxs-avatar" :src="item.avatar?item.avatar:'/default.jpg'" alt="" />
  43. <div class="message-box-l-con" v-if="item.messageType==1 || item.messageType==10">
  44. {{item.content}}
  45. </div>
  46. <div class="message-box-l-con flex align-center" v-if="item.messageType==20">
  47. 视频通话
  48. <img src="/public/images/message/historyVideo_black.png"
  49. style="width: 25px;height: 25px;margin-left: 10px;" mode=""></img>
  50. </div>
  51. <div class="message-box-l-con flex align-center" v-if="item.messageType==21">
  52. 语音通话
  53. <img src="/public/images/message/historyAudio_black.png"
  54. style="width: 25px;height: 25px;margin-left: 10px;" mode=""></img>
  55. </div>
  56. <div class="message-box-l-con flex algin-center" style="cursor: pointer;"
  57. @click="jumpToTencentMap(item.content.latitude,item.content.longitude,item.content.address)"
  58. v-if="item.messageType==18">
  59. {{item.content.address}}
  60. <el-icon style="margin-left: 10px;" :size="20" color="#00DD9A">
  61. <MapLocation />
  62. </el-icon>
  63. </div>
  64. <!-- 图片 -->
  65. <div class="message-box-l-con" style="background-color: #ffffff;"
  66. v-if="item.messageType==2">
  67. <el-image style="width: 100px;height: 100px;border-radius: 4px;" :src="item.content"
  68. fit="cover" :zoom-rate="1.2" :max-scale="7" :min-scale="0.2"
  69. :preview-src-list="[item.content]" :initial-index="4" />
  70. </div>
  71. <!-- 语音消息 -->
  72. <div class="message-box-l-con" v-if="item.messageType==3">
  73. 语音消息,请前往APP或小程序查看
  74. </div>
  75. <!-- 表情 -->
  76. <div class="message-box-l-con" style="background-color: #ffffff;"
  77. v-if="item.messageType==4">
  78. <img :src="emjSrc+item.content" alt="" />
  79. </div>
  80. <!-- 交换手机号请求 -->
  81. <div class="message-box-l-phone" v-if="item.messageType==5 && item.content=='手机号请求'">
  82. 我想跟你交换手机号,是否同意?
  83. <div class="message-box-l-phone-btn flex align-center">
  84. <el-button plain size="small"
  85. @click.stop="refuseFun(item.chatContentId)">拒绝</el-button>
  86. <el-button type="primary" size="small"
  87. @click.stop="tongyi(item.messageType,item.chatContentId)">同意</el-button>
  88. </div>
  89. </div>
  90. <!-- 交换手机号请求同意 -->
  91. <div class="message-box-l-con" v-if="item.messageType === 5 && item.content!='手机号请求'">
  92. 已同意交换手机号
  93. </div>
  94. <!-- 交换微信号请求 -->
  95. <div class="message-box-l-phone" v-if="item.messageType==6 && item.content=='微信号请求'">
  96. 我想跟你交换微信号,是否同意?
  97. <div class="message-box-l-phone-btn flex align-center">
  98. <el-button plain size="small"
  99. @click.stop="refuseFun(item.chatContentId)">拒绝</el-button>
  100. <el-button type="primary" size="small"
  101. @click.stop="tongyi(item.messageType,item.chatContentId)">同意</el-button>
  102. </div>
  103. </div>
  104. <!-- 交换微信号请求同意 -->
  105. <div class="message-box-l-con" v-if="item.messageType === 6 && item.content!='微信号请求'">
  106. 已同意交换微信号
  107. </div>
  108. <div class="message-box-l-con" v-if="item.messageType==7">
  109. <div class="" v-if="item.userType==1">
  110. 我的手机号为:{{JSON.parse(item.content).userPhone}}
  111. </div>
  112. <div v-else>
  113. 我的手机号为:{{JSON.parse(item.content).companyPhone}}
  114. </div>
  115. </div>
  116. <div class="message-box-l-con" v-if="item.messageType==8">
  117. <div class="" v-if="item.userType==1">
  118. 我的微信号为:{{JSON.parse(item.content).userWx}}
  119. </div>
  120. <div v-else>
  121. 我的微信号为:{{JSON.parse(item.content).companyWx}}
  122. </div>
  123. </div>
  124. <!-- 交换手机号请求拒绝 -->
  125. <div class="message-box-l-con" v-if="item.messageType==12">
  126. {{item.content}}已拒绝
  127. </div>
  128. <!-- 简历请求 -->
  129. <div class="message-box-l-phone" v-if="item.messageType==9 && item.content=='简历请求'">
  130. 我想要你的一份简历,是否同意?
  131. <div class="message-box-l-phone-btn flex align-center">
  132. <el-button plain size="small"
  133. @click.stop="refuseFun(item.chatContentId)">拒绝</el-button>
  134. <el-button type="primary" size="small" @click.stop="resumesTy()">同意</el-button>
  135. </div>
  136. </div>
  137. <!-- 简历请求已同意 -->
  138. <div class="message-box-l-con"
  139. v-if="item.content && item.messageType === 9 && item.content!='简历请求'">
  140. {{item.content}}
  141. </div>
  142. <!-- 面试邀约消息 -->
  143. <div class="message-box-l-con inv-style" v-if="item.content && item.messageType === 99">
  144. 您收到了{{ item.content }}</div>
  145. <!-- 面试拒绝或同意 -->
  146. <div class="message-box-l-con inv-style"
  147. v-if="item.content && (item.messageType === 96 || item.messageType === 97)">{{item.content }}</div>
  148. <div style="width: 100%;color: #999999;font-size: 12px;padding-left: 50px;margin-top: 4px;">
  149. {{item.createTime}}
  150. </div>
  151. </div>
  152. <!-- 我发的消息 -->
  153. <div class="message-boxs message-box-r flex flex-wrap" v-else>
  154. <!-- 文字消息 -->
  155. <div class="message-box-r-con" v-if="item.messageType==1 || item.messageType==10">
  156. {{item.content}}
  157. </div>
  158. <div class="message-box-r-con flex align-center" v-if="item.messageType==20">
  159. 视频通话
  160. <img src="/public/images/message/historyVideo_white.png"
  161. style="width: 25px;height: 25px;margin-left: 10px;" mode=""></img>
  162. </div>
  163. <div class="message-box-r-con flex align-center" v-if="item.messageType==21">
  164. 语音通话
  165. <img src="/public/images/message/historyAudio_white.png"
  166. style="width: 25px;height: 25px;margin-left: 10px;" mode=""></img>
  167. </div>
  168. <div class="message-box-r-con flex algin-center" style="cursor: pointer;"
  169. @click="jumpToTencentMap(item.content.latitude,item.content.longitude,item.content.address)"
  170. v-if="item.messageType==18">
  171. {{item.content.address}}
  172. <el-icon style="margin-left: 10px;" :size="20" color="#ffffff">
  173. <MapLocation />
  174. </el-icon>
  175. </div>
  176. <!-- 简历请求 -->
  177. <div class="message-box-r-con" v-if="item.messageType==9">
  178. 简历请求已发送,等待对方同意
  179. </div>
  180. <!-- 图片 -->
  181. <div class="message-box-r-con" style="background-color: #ffffff;"
  182. v-if="item.messageType==2">
  183. <el-image style="width: 100px;height: 100px;border-radius: 4px;" :src="item.content"
  184. fit="cover" :zoom-rate="1.2" :max-scale="7" :min-scale="0.2"
  185. :preview-src-list="[item.content]" :initial-index="4" />
  186. </div>
  187. <!-- 语音消息 -->
  188. <div class="message-box-r-con" v-if="item.messageType==3">
  189. 语音消息,请前往APP或小程序查看
  190. </div>
  191. <!-- 表情消息 -->
  192. <div class="message-box-r-con" style="background-color: #ffffff;"
  193. v-if="item.messageType==4">
  194. <img :src="emjSrc+item.content" alt="" />
  195. </div>
  196. <!-- 交换手机号请求 -->
  197. <div class="message-box-r-con" v-if="item.messageType==5">
  198. 交换手机号请求已发送,等待对方同意
  199. </div>
  200. <div class="message-box-r-con" v-if="item.messageType==7">
  201. <div class="" v-if="item.userType==1">
  202. 我的手机号为:{{JSON.parse(item.content).userPhone}}
  203. </div>
  204. <div v-else>
  205. 我的手机号为:{{JSON.parse(item.content).companyPhone}}
  206. </div>
  207. </div>
  208. <!-- 交换微信号请求 -->
  209. <div class="message-box-r-con" v-if="item.messageType==6">
  210. 交换微信号请求已发送,等待对方同意
  211. </div>
  212. <div class="message-box-r-con" v-if="item.messageType==8">
  213. <div class="" v-if="item.userType==1">
  214. 我的微信号为:{{JSON.parse(item.content).userWx}}
  215. </div>
  216. <div v-else>
  217. 我的微信号为:{{JSON.parse(item.content).userWx}}
  218. </div>
  219. </div>
  220. <!-- 交换手机号请求拒绝 -->
  221. <div class="message-box-r-con" v-if="item.messageType==12">
  222. {{item.content}}已拒绝
  223. </div>
  224. <!-- 面试邀约消息 -->
  225. <div class="message-box-r-con invitation" v-if="item.content && item.messageType === 99">
  226. 您发送了{{ item.content }}</div>
  227. <!-- 面试拒绝或同意 -->
  228. <div class="message-box-r-con invitation"
  229. v-if="item.content && (item.messageType === 96 || item.messageType === 97)">{{
  230. item.content }}</div>
  231. <img class="message-boxs-avatar" :src="avatar?avatar:'/default.jpg'" alt="" />
  232. <div
  233. style="width: 100%;color: #999999;font-size: 12px;padding-right: 50px;margin-top: 4px;text-align: right;">
  234. {{item.createTime}}
  235. </div>
  236. </div>
  237. </div>
  238. </div>
  239. <div class="message-btom flex align-center justify-center">
  240. <div class="messageCon">
  241. <div class="message-btom-content">
  242. <el-input @keyup.enter.prevent="sendMessage(1)" style="margin-top: 10px;" resize="none"
  243. :input-style="inputStyles" v-model="content" :autosize="{ minRows: 4, maxRows: 4 }"
  244. type="textarea" placeholder="请输入内容" />
  245. </div>
  246. <div class="message-btom-btn flex align-center justify-between">
  247. <div class="message-btom-btn-l flex align-center">
  248. <div @click.stop="czlist(index)" @mouseover="changeImageSrc(index)"
  249. @mouseout="resetImageSrc(index)" class="message-btom-btn-l-item flex align-center"
  250. v-for="(item,index) in czList" :key="index">
  251. <div v-if="index == 1" class="flex align-center">
  252. <el-upload class="flex align-center" :action="action" :show-file-list="false"
  253. :on-success="handleAvatarSuccess">
  254. <img :src="czIndex==index?item.srcS:item.src" alt="" srcset="" />
  255. </el-upload>
  256. </div>
  257. <div v-else class="flex align-center">
  258. <img :src="czIndex==index?item.srcS:item.src" alt="" srcset="" />
  259. {{item.name}}
  260. </div>
  261. </div>
  262. <div v-if="isShowEmoj" class="message-btom-btn-l-emj flex align-center justify-center">
  263. <div class="message-btom-btn-l-emj-box">
  264. <img @click="sendMessage(4,item.url)" v-for="(item,index) in emojList"
  265. :key="index" :src="emjSrc+item.url" :alt="item.alt" srcset="" />
  266. </div>
  267. </div>
  268. <div v-if="isShowEmoj" class="message-btom-btn-l-emjs"></div>
  269. <!-- 常用语 -->
  270. <div v-if="isShowCommon"
  271. class="message-btom-btn-l-emj flex align-center justify-center">
  272. <ul class="message-btom-btn-l-emj-box sentence-panel">
  273. <li class="message-text" v-for="item in changYongList" :key="item.id"
  274. @click="selConfirm(item.label)">{{ item.label }}</li>
  275. </ul>
  276. </div>
  277. </div>
  278. <el-button type="primary" @click="sendMessage(1)">发送</el-button>
  279. </div>
  280. </div>
  281. </div>
  282. </div>
  283. <el-dialog v-model="dialogms" title="面试邀请" @close="closeMs" width="30%" :destroy-on-close="true">
  284. <div style="padding: 20px;">
  285. <el-form label-position="right" ref="formms" :model="miamshi" class="">
  286. <el-form-item prop="position"
  287. :rules="[{ required: true, message: '请选择面试岗位', trigger: 'blur', },]" label="面试岗位">
  288. <el-select v-model="miamshi.position" placeholder="请选择面试岗位" filterable clearable>
  289. <el-option v-for="item in jobList" :key="item.id" :label="item.ruleClassifyName"
  290. :value="item.ruleClassifyId" />
  291. </el-select>
  292. </el-form-item>
  293. <el-form-item prop="interviewDateTime"
  294. :rules="[{ required: true, message: '请选择面试时间', trigger: 'blur', },]" label="面试时间">
  295. <el-date-picker style="width: 100%;" v-model="miamshi.interviewDateTime" type="datetime"
  296. placeholder="请选择面试时间" format="YYYY-MM-DD HH:mm" date-format="MMM DD, YYYY"
  297. time-format="HH:mm" />
  298. </el-form-item>
  299. <el-form-item prop="address" :rules="[{ required: true, message: '请选择面试地点', trigger: 'blur', },]"
  300. label="面试地点">
  301. <el-autocomplete style="width: 100%;" v-model="miamshi.address"
  302. :fetch-suggestions="querySearchAsync" placeholder="请输入面试地点" @select="handleSelect" />
  303. </el-form-item>
  304. <el-form-item prop="detailedAddress"
  305. :rules="[{ required: true, message: '请输入详细地址', trigger: 'blur', },]" label="详细地址">
  306. <el-input v-model="miamshi.detailedAddress" placeholder="请输入详细地址" clearable />
  307. </el-form-item>
  308. <el-form-item prop="hrName"
  309. :rules="[{ required: true, message: '请输入联系人名称', trigger: 'blur', },]" label="联系姓名">
  310. <el-input v-model="miamshi.hrName" placeholder="请输入联系人" clearable />
  311. </el-form-item>
  312. <el-form-item prop="hrPhone" :rules="[{ required: true, message: '请输入手机号', trigger: 'blur', },]"
  313. label="手机号码">
  314. <el-input v-model="miamshi.hrPhone" placeholder="请输入手机号" clearable />
  315. </el-form-item>
  316. <el-form-item prop="remarks" :rules="[{ required: true, message: '请输入备注', trigger: 'blur', },]"
  317. label="面试备注">
  318. <el-input v-model="miamshi.remarks" placeholder="请输入备注" clearable />
  319. </el-form-item>
  320. </el-form>
  321. </div>
  322. <template #footer>
  323. <span class="dialog-footer flex align-center justify-end" style="padding-right: 20px;padding-bottom: 20px;">
  324. <el-button @click="dialogms = false">取消</el-button>
  325. <el-button type="primary" @click="submitMs()">
  326. 确认
  327. </el-button>
  328. </span>
  329. </template>
  330. </el-dialog>
  331. </el-dialog>
  332. <!-- 附件列表 -->
  333. <AttachmentSelectDialog @closePostPush="closePostPush" @select="selectItem" v-if="showDialog" :showDialog="showDialog" />
  334. </div>
  335. </template>
  336. <script>
  337. import {
  338. ROOTPATH,
  339. ROOTPATH2,
  340. ROOTPATH3
  341. } from '../../../comment/httpUrl.js'
  342. //引入表情的json
  343. import emoj from './emoj.json'
  344. import {
  345. ElMessageBox,
  346. ElMessage,
  347. } from 'element-plus'
  348. import axios from 'axios';
  349. import jsonp from 'axios-jsonp'
  350. import AttachmentSelectDialog from '../AttachmentSelectDialog/AttachmentSelectDialog.vue'
  351. export default {
  352. components: { AttachmentSelectDialog },
  353. props: {
  354. // 显示弹窗
  355. showMeg: {
  356. type: Boolean,
  357. default: false
  358. },
  359. byUserId: {
  360. type: Number,
  361. default: -1
  362. },
  363. //聊天室id
  364. chatConversationId: {
  365. type: Number,
  366. default: -1
  367. },
  368. //岗位id
  369. postPushId: {
  370. type: Number,
  371. default: -1
  372. },
  373. //简历id
  374. resumesId: {
  375. type: Number,
  376. default: -1
  377. },
  378. //聊天类型:1用户 2企业
  379. userType: {
  380. type: Number,
  381. default: 1
  382. }
  383. },
  384. data() {
  385. return {
  386. showDialog: false,
  387. miamshi: {
  388. hrPhone: '', //手机号
  389. hrName: '', //联系人
  390. position: '', //面试岗位
  391. interviewDateTime: '', //面试时间
  392. companyId: '', //公司id
  393. remarks: '', //面试备注
  394. userId: '', //面试者id
  395. postPushId: '', //岗位id
  396. province: '', //省
  397. city: '', //市
  398. county: '', //区
  399. lng: '', //经度
  400. lat: '', //纬度
  401. address: '', //地址
  402. detailedAddress: '', //详细地址
  403. },
  404. dialogms: false, //面试邀请弹窗
  405. isSendWx: false, //是否交换微信
  406. isSendPhone: false, //是否交换电话
  407. action: ROOTPATH + '/alioss/upload', //上传图片地址
  408. screenHeight: 0, //屏幕高度
  409. emjSrc: ROOTPATH3,
  410. isShowEmoj: false, //是否显示表情弹窗
  411. show: false,
  412. webSco: null,
  413. webSocketState: false, //scoket是否连接状态
  414. userId: '',
  415. page: 1,
  416. limit: 100,
  417. title: '',
  418. postPushInfo: {}, //岗位信息
  419. resumesInfo: {}, //简历信息
  420. megList: [], //聊天消息
  421. content: '', //消息内容
  422. emojList: emoj.emojList, //表情
  423. czIndex: -1,
  424. czList: [{
  425. name: '',
  426. src: '/images/postimg/emij.png',
  427. srcS: '/images/postimg/emij_s.png',
  428. },
  429. {
  430. name: '',
  431. src: '/images/postimg/photo.png',
  432. srcS: '/images/postimg/photo_s.png',
  433. },
  434. {
  435. name: '',
  436. src: '/images/postimg/cyy.png',
  437. srcS: '/images/postimg/cyy_s.png',
  438. },
  439. {
  440. name: '发简历',
  441. src: '/images/postimg/jl.png',
  442. srcS: '/images/postimg/jl_s.png',
  443. },
  444. {
  445. name: '换电话',
  446. src: '/images/postimg/phone.png',
  447. srcS: '/images/postimg/phone_s.png',
  448. },
  449. {
  450. name: '换微信',
  451. src: '/images/postimg/weichat.png',
  452. srcS: '/images/postimg/weichat_s.png',
  453. }
  454. ], //操作图片
  455. jobList: [],
  456. isShowCommon: false, //是否显示常用语
  457. changYongList: []
  458. }
  459. },
  460. computed: {
  461. //获取我的头像
  462. avatar() {
  463. return this.$store.state.avatar;
  464. },
  465. },
  466. mounted() {
  467. this.screenHeight = window.innerHeight
  468. this.userId = localStorage.getItem('userId')
  469. this.show = this.showMeg
  470. if (this.chatConversationId) {
  471. //获取聊天记录
  472. this.getCHarList();
  473. }
  474. if (this.userType == 1) {
  475. this.czList[3].name = '发简历'
  476. //获取岗位信息
  477. this.getPostPushInfo(this.postPushId)
  478. } else {
  479. this.czList[3].name = '求简历'
  480. this.czList.push({
  481. name: '约面试',
  482. src: '/images/postimg/yms.png',
  483. srcS: '/images/postimg/yms_.png',
  484. })
  485. this.getPostPushInfo(this.postPushId)
  486. }
  487. //建立webscoket连接
  488. this.initScoket()
  489. this.getStatusInfo();
  490. setTimeout(() => {
  491. this.getChangYong();
  492. }, 1000);
  493. },
  494. methods: {
  495. getChangYong() {
  496. let state = 0
  497. if (this.userType == 1) {
  498. state = 70
  499. } else {
  500. state = 80
  501. }
  502. this.$Request.get(`/app/message/selectMessageByType?page=1&limit=100&state=${state}`)
  503. .then(res => {
  504. if (res.code == 0) {
  505. this.changYongList = [{ label: '你好啊,可以聊一聊~', id: 0 }];
  506. res.data.list.forEach(d => {
  507. let data = {
  508. label: d.content,
  509. id: d.id
  510. }
  511. this.changYongList.push(data);
  512. });
  513. }
  514. });
  515. },
  516. selConfirm(val) {
  517. this.content = val;
  518. this.isShowCommon = false;
  519. },
  520. closePostPush() {
  521. this.showDialog = false
  522. },
  523. // 选择附件简历的数据
  524. selectItem(item) {
  525. if (item.resumesAttachmentId) {
  526. this.sendResumesSave(item.resumesAttachmentId);
  527. }
  528. },
  529. //关闭面试邀请回掉
  530. closeMs() {
  531. //清楚输入的值
  532. this.miamshi.detailedAddress = '';
  533. this.miamshi.interviewDateTime = '';
  534. this.miamshi.address = '';
  535. this.miamshi.remarks = '';
  536. this.miamshi.userId = '';
  537. this.miamshi.hrPhone = ''; //手机号
  538. this.miamshi.hrName = ''; //联系人
  539. this.miamshi.position = ''; //面试岗位
  540. },
  541. jumpToTencentMap(latitude, longitude, name) {
  542. var url = 'https://apis.map.qq.com/uri/v1/search?keyword=' + name + '&center=' + latitude + ',' +
  543. longitude + '&radius=100&referer=OB4BZ-D4W3U-B7VVO-4PJWW-6TKDJ-WPB77';
  544. window.open(url)
  545. },
  546. formatDate(dates, type) {
  547. let date = new Date(dates)
  548. let year = date.getFullYear()
  549. let month = ("0" + (date.getMonth() + 1)).slice(-2)
  550. let day = ("0" + date.getDate()).slice(-2)
  551. let hour = date.getHours()
  552. let minute = ("0" + date.getMinutes()).slice(-2)
  553. // 处理 12小时制
  554. let ampm = hour >= 12 ? 'PM' : 'AM'
  555. hour = hour % 12
  556. hour = hour ? hour : 12 // 0点转成12
  557. hour = ("0" + hour).slice(-2)
  558. if (type == 1) {
  559. // 返回完整日期 + 固定时间
  560. return `${year}-${month}-${day} 00:00:00`
  561. } else {
  562. // 返回 12小时制时间 + AM/PM
  563. return `${hour}:${minute} ${ampm}`
  564. }
  565. },
  566. submitMs() {
  567. let obj = JSON.parse(JSON.stringify(this.miamshi))
  568. let Time = this.formatDate(obj.interviewDateTime, 1);
  569. obj.detailTime = this.formatDate(obj.interviewDateTime, 2);
  570. let formms = this.$refs.formms
  571. formms.validate((valid) => {
  572. if (valid) {
  573. if (!obj.lng || !obj.lat) {
  574. ElMessage({
  575. message: '请选择搜索出来的地址',
  576. type: 'info',
  577. duration: 1500,
  578. offset: this.screenHeight / 2
  579. })
  580. return
  581. }
  582. let dataInfo = {
  583. address: obj.address,
  584. companyId: obj.companyId,
  585. detailTime: obj.detailTime,
  586. detailedAddress: obj.detailedAddress,
  587. hrName: obj.hrName,
  588. hrPhone: obj.hrPhone,
  589. interviewDateTime: Time,
  590. interviewerId: obj.userId,
  591. lat: obj.lat,
  592. lng: obj.lng,
  593. onlineMsg: '',
  594. onlineType: '',
  595. postPushId: obj.postPushId,
  596. recordId: '',//发送的这份面试的id,为空,代表添加,如果有值的话代表修改
  597. remarks: obj.remarks,
  598. resumesId: this.resumesId,
  599. type: 0
  600. }
  601. this.$Request.post("/app/interviewRecord/saveInterview", dataInfo, {
  602. type: 'json'
  603. }).then(res => {
  604. if (res.code == 0) {
  605. ElMessage({
  606. message: '面试邀请已发送',
  607. type: 'success',
  608. duration: 1500,
  609. offset: this.screenHeight / 2
  610. })
  611. this.sendMessage(99)
  612. this.dialogms = false
  613. }
  614. // else {
  615. // ElMessage({
  616. // message: res.msg,
  617. // type: 'error',
  618. // duration: 1500,
  619. // offset: this.screenHeight / 2
  620. // })
  621. // }
  622. })
  623. }
  624. })
  625. },
  626. //选择地址
  627. handleSelect(item) {
  628. this.miamshi.companyId = localStorage.getItem('companyId')
  629. this.miamshi.userId = this.byUserId
  630. this.miamshi.postPushId = this.postPushId
  631. this.miamshi.province = item.province
  632. this.miamshi.city = item.city
  633. this.miamshi.county = item.district
  634. this.miamshi.lng = item.location.lng
  635. this.miamshi.lat = item.location.lat
  636. },
  637. //地址搜索
  638. querySearchAsync(queryString, cd) {
  639. if (!queryString) {
  640. cd([])
  641. return
  642. }
  643. let data = {
  644. key: "ZBABZ-ZWECU-UQTVV-4LYDR-COK3F-5SF75", //申请的密钥
  645. keyword: queryString, //搜索内容
  646. output: 'jsonp',
  647. };
  648. let url =
  649. "https://apis.map.qq.com/ws/place/v1/suggestion"
  650. axios.get(url, {
  651. params: data,
  652. adapter: jsonp
  653. }).then(res => {
  654. if (res.data.status == 0) {
  655. let arr = res.data.data
  656. arr.map(item => {
  657. item.value = item.title
  658. })
  659. cd(arr)
  660. }
  661. }).catch(err => {
  662. console.log(err)
  663. })
  664. },
  665. //获取简历数据
  666. getResumesInfo(id) {
  667. let data = {
  668. userId: localStorage.getItem('userId'),
  669. resumesId: id,
  670. companyId: localStorage.getItem('companyId')
  671. }
  672. this.$Request.get("/app/resumes/selectResumesByResumesId", {
  673. params: data
  674. }).then(res => {
  675. if (res.code == 0) {
  676. res.data.intentionRuleClassifyName = this.postPushInfo.ruleClassifyName
  677. res.data.intentionSalaryRange = this.postPushInfo.salaryRange
  678. // res.data.intentionExprence = []
  679. res.data.intentionList.forEach(item=>{
  680. if (item.ruleClassifyName == this.postPushInfo.ruleClassifyName) {
  681. res.data.intentionRuleClassifyName = item.ruleClassifyName
  682. res.data.intentionSalaryRange = item.salaryRange
  683. // res.data.intentionExprence = item.industry && item.industry.split('/') || []
  684. }
  685. })
  686. this.resumesInfo = res.data
  687. }
  688. })
  689. },
  690. // 同意简历请求并发送简历
  691. sendResumesSave(resumesAttachmentId) {
  692. let that = this
  693. let data = {
  694. to: this.byUserId, //接收人的userId
  695. postPushId: this.postPushId, //岗位id
  696. resumesAttachmentId
  697. }
  698. this.$Request.post("/app/resumes/sendResumes", data).then(res => {
  699. if (res.code == 0) {
  700. ElMessage({
  701. message: '简历已发送',
  702. type: 'success',
  703. duration: 1500,
  704. offset: this.screenHeight / 2
  705. })
  706. this.sendMessage(24)
  707. this.getCHarList()
  708. this.getStatusInfo()
  709. }
  710. })
  711. },
  712. //同意简历请求
  713. resumesTy() {
  714. ElMessageBox.confirm(
  715. '确定发送简历给对方?',
  716. '提示', {
  717. confirmButtonText: '确定',
  718. cancelButtonText: '取消',
  719. type: 'warning',
  720. }
  721. )
  722. .then(() => {
  723. this.showDialog = true;
  724. }).catch(() => {
  725. })
  726. },
  727. //同意交换手机号/微信
  728. tongyi(messageType, chatContentId) {
  729. if (messageType == 6 && !this.$store.state.weChatNum) {
  730. ElMessageBox.confirm(
  731. '请点击右上角头像的个人信息完善微信号后操作',
  732. '提示', {
  733. confirmButtonText: '去完善',
  734. cancelButtonText: '取消',
  735. type: 'warning',
  736. }
  737. )
  738. .then(() => {
  739. }).catch(() => {
  740. })
  741. return
  742. }
  743. let that = this
  744. ElMessageBox.confirm(
  745. messageType == 5 ? '同意后将交换手机号,是否同意?' : '同意后将交换微信号,是否同意?',
  746. '提示', {
  747. confirmButtonText: '同意',
  748. cancelButtonText: '取消',
  749. type: 'warning',
  750. }
  751. )
  752. .then(() => {
  753. let data = {
  754. messageType: messageType,
  755. chatContentId: chatContentId
  756. }
  757. that.$Request.post("/app/chat/sendPhoneOrWx", data).then(res => {
  758. if (res.code == 0) {
  759. this.sendMessage(24)
  760. this.getCHarList()
  761. that.getStatusInfo()
  762. }
  763. })
  764. }).catch(() => {
  765. })
  766. },
  767. //请求拒绝
  768. refuseFun(id) {
  769. ElMessageBox.confirm(
  770. '确定拒绝吗?',
  771. '提示', {
  772. confirmButtonText: '确认',
  773. cancelButtonText: '取消',
  774. type: 'warning',
  775. }
  776. )
  777. .then(() => {
  778. let data = {
  779. chatContentId: id
  780. }
  781. this.$Request.get("/app/chat/refuseReqs", {
  782. params: data
  783. }).then(res => {
  784. if (res.code == 0) {
  785. ElMessage({
  786. message: '已拒绝',
  787. type: 'success',
  788. duration: 1500,
  789. offset: this.screenHeight / 2
  790. })
  791. this.sendMessage(24)
  792. this.getCHarList()
  793. this.getStatusInfo()
  794. } else {
  795. ElMessage({
  796. message: res.msg,
  797. type: 'error',
  798. duration: 1500,
  799. offset: this.screenHeight / 2
  800. })
  801. }
  802. })
  803. }).catch(() => {
  804. })
  805. },
  806. //发送图片
  807. handleAvatarSuccess(res) {
  808. let data = {
  809. userId: this.byUserId, //id
  810. content: res.data, //消息内容
  811. messageType: 2, //消息类型
  812. chatConversationId: this.chatConversationId //聊天室id
  813. }
  814. //把要发送的消息转换为json字符串
  815. data = JSON.stringify(data);
  816. //如果scoket是连接状态,那么就直接发送消息
  817. if (this.webSocketState) {
  818. // 发送消息
  819. this.webSco.send(data)
  820. setTimeout(() => {
  821. //发送消息后晴空输入框
  822. this.content = ''
  823. //获取聊天记录
  824. this.getCHarList()
  825. }, 50)
  826. } else { //如果不是,那么就重新连接
  827. this.initScoket()
  828. }
  829. },
  830. // 发送消息 type:1:文字 2:图片 3:语音 4:表情
  831. sendMessage(type, url) {
  832. let data = {
  833. userId: this.byUserId, //id
  834. content: this.content.replace(/\n/g, ''), //消息内容
  835. messageType: type, //消息类型
  836. chatConversationId: this.chatConversationId //聊天室id
  837. }
  838. if (type == 1 && !data.content) { //文字
  839. ElMessage({
  840. message: '请输入聊天内容',
  841. type: 'error',
  842. duration: 1500,
  843. offset: this.screenHeight / 2
  844. })
  845. this.content = ''
  846. return
  847. }
  848. if (type == 4) { //发送表情
  849. data.content = url
  850. }
  851. if (type == 5) { //交换手机号请求
  852. data.content = '手机号请求';
  853. }
  854. if (type == 6) { //交换微信号请求
  855. data.content = '微信号请求';
  856. }
  857. if (type == 9) { //简历请求
  858. data.content = '简历请求';
  859. }
  860. if (type == 24) { //刷新
  861. data.content = '刷新';
  862. }
  863. if (type == 99) { //面试邀约
  864. data.content = '一份面试邀约';
  865. }
  866. //把要发送的消息转换为json字符串
  867. data = JSON.stringify(data);
  868. //如果scoket是连接状态,那么就直接发送消息
  869. if (this.webSocketState) {
  870. // 发送消息
  871. this.webSco.send(data)
  872. setTimeout(() => {
  873. //发送消息后晴空输入框
  874. this.content = ''
  875. //获取聊天记录
  876. this.getCHarList()
  877. }, 50)
  878. } else { //如果不是,那么就重新连接
  879. this.initScoket()
  880. }
  881. },
  882. //发简历
  883. sendResumes() {
  884. let that = this
  885. ElMessageBox.confirm(
  886. '是否将简历发送给对方?',
  887. '提示', {
  888. confirmButtonText: '发送',
  889. cancelButtonText: '取消',
  890. type: 'warning',
  891. }
  892. )
  893. .then(() => {
  894. this.showDialog = true;
  895. }).catch(() => {
  896. })
  897. },
  898. //交换手机号弹窗
  899. currentPhone() {
  900. let that = this
  901. if (this.isSendPhone == false) {
  902. ElMessageBox.confirm(
  903. '确定后,电话交换请求将发送给对方,对方同意后将会看到彼此的手机号',
  904. '确定与对方交换电话吗?', {
  905. confirmButtonText: '确定',
  906. cancelButtonText: '取消',
  907. type: 'warning',
  908. }
  909. )
  910. .then(() => {
  911. that.sendMessage(5)
  912. }).catch(() => {
  913. })
  914. } else {
  915. ElMessage({
  916. message: '已交换过手机号,请查看聊天记录',
  917. type: 'error',
  918. duration: 1500,
  919. offset: this.screenHeight / 2
  920. })
  921. }
  922. },
  923. //交换微信号弹窗
  924. currentWchat() {
  925. let that = this
  926. if (!this.$store.state.weChatNum) {
  927. ElMessageBox.confirm(
  928. '请点击右上角头像的个人信息完善微信号后操作',
  929. '提示', {
  930. confirmButtonText: '去完善',
  931. cancelButtonText: '取消',
  932. type: 'warning',
  933. }
  934. )
  935. .then(() => {
  936. }).catch(() => {
  937. })
  938. return
  939. }
  940. if (this.isSendWx == false) {
  941. ElMessageBox.confirm(
  942. '确定后,微信交换请求将发送给对方,对方同意后将会看到彼此的微信号',
  943. '确定与对方交换微信吗?', {
  944. confirmButtonText: '确定',
  945. cancelButtonText: '取消',
  946. type: 'warning',
  947. }
  948. )
  949. .then(() => {
  950. that.sendMessage(6)
  951. }).catch(() => {
  952. })
  953. } else {
  954. ElMessage({
  955. message: '已交换过微信号,请查看聊天记录',
  956. type: 'error',
  957. duration: 1500,
  958. offset: this.screenHeight / 2
  959. })
  960. }
  961. },
  962. //求简历
  963. giveSendResumes() {
  964. ElMessageBox.confirm(
  965. '是否将简历请求发送给对方?',
  966. '确定获取对方简历吗?', {
  967. confirmButtonText: '确定',
  968. cancelButtonText: '取消',
  969. type: 'warning',
  970. }
  971. )
  972. .then(() => {
  973. this.sendMessage(9)
  974. }).catch(() => {
  975. })
  976. },
  977. //操作
  978. czlist(index) {
  979. switch (index) {
  980. case 0: //显示表情
  981. this.isShowEmoj = true
  982. break;
  983. case 2: //显示常用语
  984. this.isShowCommon = true
  985. break;
  986. case 3:
  987. if (this.userType == 1) { //发简历
  988. this.sendResumes()
  989. } else { //求简历
  990. this.giveSendResumes()
  991. }
  992. break;
  993. case 4: //换电话
  994. this.currentPhone()
  995. break;
  996. case 5: //换微信
  997. this.currentWchat()
  998. break;
  999. case 6: //约面试
  1000. this.openDialog();
  1001. break;
  1002. default:
  1003. break;
  1004. }
  1005. },
  1006. // 赋值地址和联系人数据
  1007. openDialog() {
  1008. const addressInfo = localStorage.getItem('companyAddressInfo')
  1009. ? JSON.parse(localStorage.getItem('companyAddressInfo'))
  1010. : {};
  1011. this.miamshi = {
  1012. hrPhone: this.$store.state.phone || '',
  1013. hrName: this.$store.state.nickName || '',
  1014. position: '',
  1015. interviewDateTime: '',
  1016. companyId: localStorage.getItem('companyId') || '',
  1017. remarks: '',
  1018. userId: this.byUserId || '',
  1019. postPushId: this.postPushId || '',
  1020. province: addressInfo.province || '',
  1021. city: addressInfo.city || '',
  1022. county: addressInfo.county || '',
  1023. lng: addressInfo.lng || '',
  1024. lat: addressInfo.lat || '',
  1025. address: addressInfo.address || '',
  1026. detailedAddress: addressInfo.detailedAddress || '',
  1027. }
  1028. this.dialogms = true;
  1029. },
  1030. //获取交换状态
  1031. getStatusInfo() {
  1032. let data = {
  1033. chatConversationId: this.chatConversationId
  1034. }
  1035. this.$Request.get("/app/chat/getConversationInfo", {
  1036. params: data
  1037. }).then(res => {
  1038. if (res.code == 0) {
  1039. if (res.data.isSendWx) { //是否交换微信
  1040. this.isSendWx = true
  1041. } else {
  1042. this.isSendWx = false
  1043. }
  1044. if (res.data.isSendPhone) { //是否交换电话
  1045. this.isSendPhone = true
  1046. } else {
  1047. this.isSendPhone = false
  1048. }
  1049. }
  1050. })
  1051. },
  1052. //关闭弹窗
  1053. closeDialog() {
  1054. this.isShowEmoj = false
  1055. this.isShowCommon = false
  1056. },
  1057. //还原图片
  1058. resetImageSrc(index) {
  1059. this.czIndex = -1
  1060. },
  1061. //显示图片
  1062. changeImageSrc(index) {
  1063. this.czIndex = index
  1064. },
  1065. //获取岗位数据
  1066. getPostPushInfo(id) {
  1067. let data = {
  1068. userId: this.userId,
  1069. postPushId: id
  1070. }
  1071. this.$Request.get("/app/postPush/selectPostPushDetails", {
  1072. params: data
  1073. }).then(res => {
  1074. if (res.code == 0) {
  1075. // 选择的岗位列表
  1076. this.jobList = [{
  1077. ...res.data
  1078. }];
  1079. this.title = res.data.company.companyName
  1080. this.postPushInfo = res.data
  1081. // this.postPushInfo.positionWelfare = this.postPushInfo.positionWelfare && this.postPushInfo.positionWelfare.split(',') || []
  1082. if(this.userType != 1){
  1083. //获取简历信息
  1084. this.getResumesInfo(this.resumesId)
  1085. }
  1086. }
  1087. })
  1088. },
  1089. //获取聊天记录
  1090. getCHarList() {
  1091. let data = {
  1092. page: this.page,
  1093. limit: this.limit,
  1094. chatConversationId: this.chatConversationId,
  1095. userId: this.userId
  1096. }
  1097. this.$Request.get('/app/chat/selectChatContent', {
  1098. params: data
  1099. }).then(res => {
  1100. if (res.code == 0) {
  1101. res.data.list.map(item => {
  1102. if (item.messageType == 18) {
  1103. item.content = JSON.parse(item.content)
  1104. }
  1105. })
  1106. this.megList = res.data.list
  1107. this.megList.reverse();
  1108. //等数据更新后滚动到最底下
  1109. this.$nextTick(() => {
  1110. this.$refs.messageBox.scrollTop = this.$refs.messageBox.scrollHeight
  1111. })
  1112. }
  1113. })
  1114. },
  1115. //初始化并链接webscoket
  1116. initScoket() {
  1117. this.webSco = this.$socket.getSocket();
  1118. // 如果 WebSocket 已经连接,直接把状态标记为 true
  1119. if (this.webSco.readyState === WebSocket.OPEN) {
  1120. this.webSocketState = true
  1121. // console.log('✅ WebSocket 已经连接,状态直接标记为 true')
  1122. } else {
  1123. // 还未连接,绑定 onopen
  1124. this.webSco.onopen = this.websocketonopen.bind(this)
  1125. }
  1126. // 绑定其他回调
  1127. this.webSco.onmessage = this.websocketonmessage.bind(this)
  1128. this.webSco.onerror = this.websocketonerror.bind(this)
  1129. this.webSco.onclose = this.websocketclose.bind(this)
  1130. },
  1131. //监听接收到消息的回调
  1132. websocketonmessage(event) {
  1133. this.webSocketState = true
  1134. // console.log(event, '收到消息')
  1135. //收到消息后再获取聊天记录
  1136. this.getCHarList()
  1137. },
  1138. //监听错误的回调
  1139. websocketonerror(event) {
  1140. //连接错误后把连接状态设为false
  1141. this.webSocketState = false
  1142. // console.log(event, '连接错误')
  1143. },
  1144. //监听链接打开的回调
  1145. websocketonopen(event) {
  1146. this.webSocketState = true
  1147. // console.log(event, '连接已打开')
  1148. },
  1149. //监听关闭的回调
  1150. websocketclose(event) {
  1151. // 关闭连接后把状态设为false
  1152. this.webSocketState = false
  1153. // console.log(event, '连接已关闭')
  1154. },
  1155. //关闭弹窗的回调
  1156. closeShow() {
  1157. // if (this.webSco) {
  1158. // this.webSco.close()
  1159. // }
  1160. //给父组件传递值关闭该组件
  1161. this.show = false
  1162. this.$emit('closeMeg', this.show)
  1163. },
  1164. }
  1165. }
  1166. </script>
  1167. <style lang="scss" scoped>
  1168. :deep(.el-dialog) {
  1169. border-radius: 14px !important;
  1170. }
  1171. :deep(.el-dialog__body) {
  1172. padding: 0 !important;
  1173. padding-top: 10px !important;
  1174. }
  1175. :deep(.el-dialog__header) {
  1176. background: linear-gradient(45deg, #f2fffa, #FFFFFF);
  1177. border-radius: 14px 14px 0 0;
  1178. }
  1179. .messageCom {
  1180. .el-textarea {
  1181. --el-input-focus-border: none;
  1182. --el-input-focus-border-color: none;
  1183. }
  1184. .el-textarea__inner {
  1185. box-shadow: none;
  1186. }
  1187. .el-textarea__inner:hover {
  1188. box-shadow: none;
  1189. .is-focus {
  1190. box-shadow: none;
  1191. }
  1192. }
  1193. }
  1194. .my-header-name {
  1195. font-weight: bold;
  1196. font-size: 14px;
  1197. }
  1198. .my-header-price {
  1199. margin: 0 10px;
  1200. color: red;
  1201. font-size: 14px;
  1202. font-weight: bold;
  1203. }
  1204. .my-header-yq {
  1205. color: #999999;
  1206. font-size: 14px;
  1207. // font-weight: bold;
  1208. }
  1209. .message {
  1210. width: 100%;
  1211. height: 600px;
  1212. .message-box {
  1213. width: calc(100% - 40px);
  1214. height: 70%;
  1215. overflow: hidden;
  1216. overflow-y: scroll;
  1217. padding: 0 20px;
  1218. }
  1219. .message-box::-webkit-scrollbar {
  1220. /* Chrome, Safari, Opera */
  1221. width: 0px;
  1222. }
  1223. .message-box::-webkit-scrollbar-thumb {
  1224. background-color: #ffffff;
  1225. /* 滚动条颜色 */
  1226. }
  1227. .message-box::-webkit-scrollbar-track {
  1228. background-color: #ffffff;
  1229. /* 轨道颜色 */
  1230. }
  1231. .message-box-item {
  1232. width: 100%;
  1233. margin-bottom: 20px;
  1234. }
  1235. .message-boxs {
  1236. width: 100%;
  1237. .message-boxs-avatar {
  1238. width: 40px;
  1239. height: 40px;
  1240. border-radius: 50%;
  1241. }
  1242. }
  1243. .message-box-l {
  1244. img {
  1245. margin-right: 10px;
  1246. }
  1247. .message-box-l-con {
  1248. max-width: 40%;
  1249. padding: 10px;
  1250. border-radius: 13px 13px 13px 0;
  1251. background-color: #F8F8F8;
  1252. color: #333333;
  1253. }
  1254. .message-box-l-phone {
  1255. background: linear-gradient(to bottom, #D9FEED, #ffffff);
  1256. // background-color: red;
  1257. padding: 10px;
  1258. border-radius: 13px 13px 13px 0;
  1259. }
  1260. .message-box-l-phone-btn {
  1261. justify-content: flex-end;
  1262. margin-top: 10px;
  1263. }
  1264. }
  1265. .message-box-r {
  1266. justify-content: flex-end;
  1267. img {
  1268. margin-left: 10px;
  1269. }
  1270. .message-box-r-con {
  1271. max-width: 40%;
  1272. padding: 10px;
  1273. border-radius: 13px 13px 0 13px;
  1274. background-color: #00DD9A;
  1275. color: #FFFFFF;
  1276. }
  1277. .invitation {
  1278. background: linear-gradient(rgb(217, 254, 237), rgb(255, 255, 255));
  1279. border: 0.5px solid rgb(198, 254, 231);
  1280. color: #000;
  1281. }
  1282. }
  1283. .inv-style {
  1284. background: linear-gradient(rgb(217, 254, 237), rgb(255, 255, 255));
  1285. border: 0.5px solid rgb(198, 254, 231);
  1286. color: #000;
  1287. }
  1288. .message-btom {
  1289. width: 100%;
  1290. height: 30%;
  1291. border-top: 1px solid #E6E6E6;
  1292. .messageCon {
  1293. width: calc(100% - 40px);
  1294. height: calc(100% - 40px);
  1295. }
  1296. .message-btom-content {
  1297. width: 100%;
  1298. height: 70%;
  1299. }
  1300. .message-btom-btn {
  1301. width: 100%;
  1302. height: 30%;
  1303. }
  1304. .message-btom-btn-l {
  1305. position: relative;
  1306. .message-btom-btn-l-emj {
  1307. width: 490px;
  1308. height: 300px;
  1309. background-color: #ffffff;
  1310. border-radius: 10px 10px 10px 0;
  1311. position: absolute;
  1312. bottom: 30px;
  1313. border: 1px solid #f2f5fa;
  1314. box-shadow: 0 0 14px rgba(0, 0, 0, .11);
  1315. }
  1316. .message-btom-btn-l-emj-box {
  1317. width: calc(100% - 40px);
  1318. height: calc(100% - 40px);
  1319. overflow: hidden;
  1320. overflow-y: scroll;
  1321. img {
  1322. width: 30px;
  1323. height: 30px;
  1324. padding: 5px;
  1325. cursor: pointer;
  1326. }
  1327. }
  1328. .message-btom-btn-l-emj-box::-webkit-scrollbar {
  1329. /* Chrome, Safari, Opera */
  1330. width: 0px;
  1331. }
  1332. .message-btom-btn-l-emj-box::-webkit-scrollbar-thumb {
  1333. background-color: #ffffff;
  1334. /* 滚动条颜色 */
  1335. }
  1336. .message-btom-btn-l-emj-box::-webkit-scrollbar-track {
  1337. background-color: #ffffff;
  1338. /* 轨道颜色 */
  1339. }
  1340. .message-btom-btn-l-emjs {
  1341. position: absolute;
  1342. bottom: 22px;
  1343. width: 0;
  1344. height: 0;
  1345. border-left: 10px solid transparent;
  1346. /* 根据需要设置边框宽度 */
  1347. border-right: 10px solid transparent;
  1348. /* 根据需要设置边框宽度 */
  1349. border-top: 10px solid #ffffff;
  1350. /* 根据需要设置边框颜色 */
  1351. }
  1352. .message-btom-btn-l-item {
  1353. margin-right: 15px;
  1354. cursor: pointer;
  1355. color: #666666;
  1356. font-size: 14px;
  1357. img {
  1358. width: 20px;
  1359. height: 20px;
  1360. margin-right: 2px;
  1361. }
  1362. }
  1363. .message-btom-btn-l-item:hover {
  1364. color: #00DD9A;
  1365. }
  1366. .message-btom-btn-l-item:nth-of-type(1):hover {
  1367. img {
  1368. src: '/images/postimg/emij_s.png'
  1369. }
  1370. }
  1371. }
  1372. }
  1373. }
  1374. .sentence-panel {
  1375. margin: 0 !important;
  1376. padding: 0 !important;
  1377. }
  1378. .message-text {
  1379. height: 34px;
  1380. line-height: 34px;
  1381. border-radius: 4px;
  1382. z-index: 1;
  1383. overflow: hidden;
  1384. cursor: pointer;
  1385. white-space: nowrap;
  1386. text-overflow: ellipsis;
  1387. padding: 0 12px 0 24px;
  1388. font-size: 13px;
  1389. font-weight: 400;
  1390. color: #333;
  1391. border: none;
  1392. position: relative;
  1393. }
  1394. .message-text:hover {
  1395. background-color: #f8f8f8;
  1396. }
  1397. .message-text:before {
  1398. content: "";
  1399. position: absolute;
  1400. top: 14px;
  1401. left: 10px;
  1402. width: 6px;
  1403. height: 6px;
  1404. border-radius: 50%;
  1405. background: #d9d9d9;
  1406. }
  1407. </style>