index.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820
  1. <template>
  2. <view class="box">
  3. <view class="box-top">
  4. <view class="box-top-title">
  5. {{ info.name }}
  6. <text class="subText">
  7. {{ info.postName }}
  8. <text v-if="info.postName && info.enterpriseName" class="gun">|</text>
  9. {{ info.enterpriseName }}
  10. </text>
  11. </view>
  12. <view class="box-top-content" v-if="interview.length">
  13. <view v-for="val in interview" :key="val.id" class="color-666">
  14. <view class="box-top-content-t">
  15. <view class="font-weight-bold color-primary">
  16. <text>{{ val.job.name }}</text>
  17. <text v-if="!val.job.payFrom && !val.job.payTo" class="ml-3">面议</text>
  18. <text v-else class="ml-3">{{ val.job.payFrom ? val.job.payFrom + '-' : '' }}{{ val.job.payTo }}</text>
  19. </view>
  20. <view :style="`color: ${val.statusColor};`" >
  21. {{ val.statusText }}
  22. </view>
  23. </view>
  24. <view class="mt-1 font-size-14 ellipsis" style="max-width: 100%;">
  25. <view class="py-1">面试时间:{{ timesTampChange(val.time, 'Y-M-D h:m') }}</view>
  26. <view class="py-1">面试地点:{{ val.address }}</view>
  27. <view class="py-1">联系电话:{{ val.invitePhone }}</view>
  28. </view>
  29. <view class="bottom">
  30. <view class="tipsText" @click="handleToCenter">在“个人中心-面试”中管理我的面试</view>
  31. <view v-if="val.status === '0'" class="btnBox">
  32. <button size="mini" type="warn" @click="handleRefuse(val)">拒绝邀请</button>
  33. <button size="mini" type="primary" @click="handleAgree(val)">接受邀请</button>
  34. </view>
  35. </view>
  36. </view>
  37. </view>
  38. </view>
  39. <!-- <view class="box-main" ref="chatRef"> -->
  40. <scroll-view class="box-main" ref="chatRef" scroll-y="true" :scroll-top="scrollInto" >
  41. <view class="box-main-more" v-if="hasMore">
  42. <text @click="handleMore">查看更多</text>
  43. </view>
  44. <view v-for="val in items" :key="val.id" :id="'s'+val.id+index">
  45. <view class="box-main-time">{{ timesTampChange(+(val.timestamp.padEnd(13, '0'))) }}</view>
  46. <template v-if="val.payload?.type === 102">
  47. <view class="jobCard">
  48. <view class="jobCard-title"> {{ val.payload?.content?.positionInfo?.name }}</view>
  49. <view
  50. v-if="!val.payload?.content?.positionInfo?.payFrom && !val.payload?.content?.positionInfo?.payTo"
  51. class="jobCard-subtitle">
  52. 薪酬待遇: 面议
  53. </view>
  54. <view
  55. v-else
  56. class="jobCard-subtitle"
  57. >
  58. 薪酬待遇:
  59. {{ val.payload?.content?.positionInfo?.payFrom ? val.payload?.content?.positionInfo?.payFrom + ' - ' : '' }}
  60. {{ val.payload?.content?.positionInfo?.payTo }}
  61. </view>
  62. <view class="jobCard-tag">
  63. <view
  64. v-for="(v, i) in (val.payload?.content?.positionInfo?.enterprise?.welfareList || [])"
  65. :key="val.message_id + v + i"
  66. style="margin: 10rpx"
  67. >
  68. <uni-tag
  69. :text="v"
  70. type="success"
  71. />
  72. </view>
  73. </view>
  74. <view class="jobCard-divider"></view>
  75. <view class="jobCard-subtitle text-right">
  76. <v-avatar size="24">
  77. <v-img :src="val.payload?.content?.positionInfo?.contact?.avatar"></v-img>
  78. </v-avatar>
  79. {{ val.payload?.content?.positionInfo?.contact?.name }}
  80. {{ val.payload?.content?.positionInfo?.contact?.postNameCn }}
  81. {{ val.payload?.content?.positionInfo?.enterprise?.name }}
  82. </view>
  83. <div class="jobCard-subtitle text-right">
  84. 地址:{{ val.payload?.content?.positionInfo?.address }}
  85. </div>
  86. </view>
  87. </template>
  88. <view :class="['message-view_item', val.from_uid === IM.uid ? 'is-self' : 'is-other']">
  89. <view class="image">
  90. <image
  91. :data-target="getUserAvatar(info.avatar, info.sex)"
  92. class="header"
  93. :src="(
  94. val.from_uid === IM.uid ?
  95. getUserAvatar(useUserStore.baseInfo?.avatar, useUserStore.baseInfo?.sex) :
  96. getUserAvatar(info.avatar, info.sex)
  97. )"
  98. ></image>
  99. </view>
  100. <!-- 显示沟通职位 -->
  101. <template v-if="val.payload?.type === 102">
  102. <view class="message-text" :class="val.from_uid === IM.uid ? 'active' : ''">
  103. {{ val.payload?.content.text }}
  104. </view>
  105. </template>
  106. <!-- 发起面试邀请 -->
  107. <view class="message-text none" v-else-if="val.payload?.type === 101">
  108. <uni-tag text="发起了面试邀请" type="primary" />
  109. </view>
  110. <view class="message-text none" v-else-if="val.payload?.type === 103">
  111. <uni-tag text="拒绝了面试邀请" type="error" />
  112. </view>
  113. <view class="message-text none" v-else-if="val.payload?.type === 104">
  114. <uni-tag text="接受了面试邀请" type="success" />
  115. </view>
  116. <view v-else-if="val.payload.type === 105" class="text-end">
  117. <uni-tag
  118. v-if="val.from_uid === IM.uid"
  119. :text="val.payload.content?.type === 1 ? '附件简历已发送' : '简历请求已发送'"
  120. type="success"
  121. />
  122. <view
  123. v-if="val.payload.content?.type !== 2 || val.from_uid !== IM.uid"
  124. class="message-text card"
  125. >
  126. <view class="text-left">
  127. <text v-if="val.payload.content?.type === 1">{{
  128. val.payload.content?.query?.title || '附件简历' }}
  129. </text>
  130. <text v-if="val.payload.content?.type === 2">
  131. 我想要一份您的简历,您是否同意
  132. </text>
  133. </view>
  134. <view class="btn-actions">
  135. <text class="btn" v-if="val.payload.content?.type === 1" @tap="handlePreview(val.payload)">点击预览附件简历</text>
  136. <text class="btn" v-if="val.payload.content?.type === 2" @tap="handleFindResume">点击发送附件简历</text>
  137. </view>
  138. </view>
  139. </view>
  140. <view v-else class="message-text" :class="{ active: val.from_uid === IM.uid}">
  141. {{ val.payload?.content }}
  142. </view>
  143. </view>
  144. </view>
  145. </scroll-view>
  146. <!-- </view> -->
  147. <view class="box-bottom">
  148. <view class="box-bottom-tool">
  149. <uni-tag :text="isSendResume ? '简历已投递' : '发送简历'" :disabled="isSendResume" type="success" @tap="handleFindResume"/>
  150. </view>
  151. <textarea
  152. v-model="inputValue"
  153. auto-height
  154. confirm-type="send"
  155. @confirm="handleSend"
  156. />
  157. </view>
  158. <uni-popup ref="popup" background-color="#fff">
  159. <view class="popup-title">
  160. <text>请选择简历</text>
  161. <uni-icons type="closeempty" size="20" @tap="handleClose"></uni-icons>
  162. </view>
  163. <view v-for="resume in resumeList" :key="resume.id" class="popup-content" @tap="resumeCheck = resume">
  164. <view class="iconBox">
  165. <uni-icons
  166. v-show="resumeCheck.id === resume.id"
  167. type="checkmarkempty"
  168. size="20"
  169. :color="resumeCheck.id === resume.id ? '#43AC57' : '#999'"></uni-icons>
  170. </view>
  171. <text class="text" :class="resumeCheck.id === resume.id ? 'active' : ''">{{ resume.title }}</text>
  172. </view>
  173. <view v-if="!resumeList.length" class="popup-upload" @click="handleUploadResume">
  174. <view class="popup-upload-box">
  175. <uni-icons type="plusempty" size="50" color="#f1f1f1"></uni-icons>
  176. </view>
  177. <text>请先上传简历</text>
  178. </view>
  179. <view v-if="resumeList.length" class="popup-actions">
  180. <button class="default" type="default" @click="handleSendResume">发送简历</button>
  181. </view>
  182. </uni-popup>
  183. <uni-popup ref="confirm" type="dialog">
  184. <uni-popup-dialog
  185. :type="isAgree ? 'success' : 'warn'"
  186. cancelText="取消"
  187. confirmText="确认"
  188. title="系统提示"
  189. :content="isAgree ? '确认接受面试吗?' : '确认拒绝面试吗?'"
  190. @confirm="handleConfirm"
  191. @close="handleCloseConfirm"
  192. ></uni-popup-dialog>
  193. </uni-popup>
  194. </view>
  195. </template>
  196. <script setup>
  197. import { ref, nextTick, watch, computed } from 'vue'
  198. import { onLoad } from '@dcloudio/uni-app'
  199. import { useIMStore } from '@/store/im'
  200. import { userStore } from '@/store/user'
  201. import { initConnect, send, initChart, getMoreMessages } from '@/hooks/useIM'
  202. import { getDict } from '@/hooks/useDictionaries'
  203. import { timesTampChange } from '@/utils/date'
  204. import { getUserAvatar } from '@/utils/avatar'
  205. import { preview } from '@/utils/preview'
  206. import { getPersonResumeCv, saveResume } from '@/api/user'
  207. import { getInterviewInviteListByInviteUserId, getMessageType } from '@/api/common'
  208. import { userInterviewInviteReject, userInterviewInviteConsent } from '@/api/personalCenter'
  209. import {
  210. jobCvRelSend,
  211. jobCvRelCheckSend,
  212. jobCvRelHireSend
  213. } from '@/api/position'
  214. const useUserStore = userStore()
  215. const IM = useIMStore()
  216. const info = ref({})
  217. const chatRef = ref()
  218. const items = ref([])
  219. const channelItem = ref(null)
  220. const hasMore = ref(false)
  221. const popup = ref()
  222. const resumeCheck = ref({})
  223. const resumeList = ref([]) // 简历列表
  224. const pageSize = ref(1)
  225. // 求职者面试列表
  226. const interview = ref([])
  227. // 求职端-获取求职者与当前邀请人的面试记录
  228. const statusList = ref([])
  229. const inputValue = ref('')
  230. const isAgree = ref(false)
  231. const confirm = ref()
  232. const chooseInvite = ref(null)
  233. const scrollInto = ref(0)
  234. const isSendResume = ref(false)
  235. const positionInfo = ref({})
  236. const isEmployment = ref('-1')
  237. const {
  238. conversationList,
  239. // updateConversation,
  240. updateUnreadCount,
  241. // deleteConversations,
  242. resetUnread
  243. } = initConnect(async (successful) => {
  244. if (!successful) {
  245. uni.showToast({
  246. title: '发送失败',
  247. icon: 'none',
  248. mask: true,
  249. })
  250. return
  251. }
  252. inputValue.value = ''
  253. // chatRef.value.reset()
  254. // // 发送成功
  255. const { list } = await getMoreMessages(1, channelItem.value)
  256. // updateConversation()
  257. items.value = list.value
  258. // chatRef.value.scrollBottom()
  259. })
  260. watch(
  261. () => conversationList.value,
  262. async (val) => {
  263. if (!channelItem.value) {
  264. return
  265. }
  266. const { list } = await getMoreMessages(1, channelItem.value)
  267. if (list.value.length) {
  268. const item = list.value[list.value.length - 1]
  269. const arr = [101, 103, 104]
  270. if (arr.includes(item.payload?.type)) {
  271. getInterviewInviteList()
  272. }
  273. }
  274. items.value = list.value
  275. setScrollBottom()
  276. // 清除未读消息
  277. resetUnread(channelItem.value)
  278. },
  279. {
  280. deep: true,
  281. immediate: true
  282. }
  283. )
  284. async function init(userId, enterpriseId) {
  285. const { channel, list, more } = await initChart(userId, enterpriseId)
  286. hasMore.value = more
  287. channelItem.value = channel.value
  288. items.value = list.value
  289. setScrollBottom()
  290. }
  291. // 滑动到底部
  292. function setScrollBottom () {
  293. // scrollInto.value = 200
  294. }
  295. async function getInterviewInviteList () {
  296. if (!info.value.id) return
  297. const { data } = await getInterviewInviteListByInviteUserId(info.value.id)
  298. interview.value = data.slice(0, 1).map(e => {
  299. const statusItem = statusList.value.find(_e => _e.value === e.status)
  300. const statusText = statusItem?.label || ''
  301. const statusColor = ['5', '98', '99'].includes(e.status)
  302. return {
  303. ...e,
  304. statusColor: statusColor ? '#FE574A' : '#0E8E80',
  305. statusText
  306. }
  307. })
  308. }
  309. const getStatusList = async () => {
  310. try {
  311. const { data } = await getDict('menduner_interview_invite_status')
  312. if (data.data.length) {
  313. statusList.value = data.data
  314. }
  315. } catch (error) {
  316. }
  317. }
  318. function handleSend () {
  319. send(inputValue.value, channelItem.value)
  320. }
  321. // 预览简历
  322. function handlePreview (payload) {
  323. if (!payload?.content?.query?.src) {
  324. uni.showToast({ title: '简历地址不存在', icon: 'none' })
  325. return
  326. }
  327. preview(payload.content.query.src)
  328. }
  329. // 获取简历
  330. async function handleFindResume () {
  331. if (isSendResume.value) {
  332. return
  333. }
  334. uni.showLoading({
  335. title: '真正查找简历'
  336. })
  337. try {
  338. // 获取简历列表
  339. const { data } = await getPersonResumeCv()
  340. if (data.length === 0) {
  341. uni.showToast({
  342. title: '您还未上传过简历,请先上传简历后再投递',
  343. icon: 'none',
  344. mask: true,
  345. })
  346. return
  347. }
  348. resumeList.value = data
  349. resumeCheck.value = data[0]
  350. popup.value.open('center')
  351. } finally {
  352. uni.hideLoading()
  353. }
  354. }
  355. // 关闭简历窗口
  356. function handleClose () {
  357. popup.value.close()
  358. }
  359. // 发送简历
  360. async function handleSendResume () {
  361. if (!Object.keys(resumeCheck.value).length) {
  362. uni.showToast({ title: '请选择要投递的简历', icon: 'none' })
  363. return
  364. }
  365. const text = {
  366. remark: '发送简历',
  367. query: {
  368. src: resumeCheck.value.url,
  369. title: resumeCheck.value.title,
  370. id: resumeCheck.value.id,
  371. },
  372. type: 1
  373. }
  374. send (JSON.stringify(text), channelItem.value, 105)
  375. console.log(isEmployment.value, positionInfo.value)
  376. try {
  377. if (isEmployment.value !== '-1') {
  378. await jobCvRelHireSend({
  379. jobId: positionInfo.value.id,
  380. url: resumeCheck.value.url,
  381. recommendUserId: isEmployment.value
  382. })
  383. } else {
  384. await jobCvRelSend({
  385. jobId: positionInfo.value.id,
  386. title: resumeCheck.value.title,
  387. url: resumeCheck.value.url,
  388. type: positionInfo.value.hire ? 1 : 0
  389. })
  390. }
  391. isSendResume.value = true
  392. popup.value.close()
  393. } catch (error) {
  394. }
  395. }
  396. // 拒绝邀请
  397. function handleRefuse (val) {
  398. isAgree.value = false
  399. chooseInvite.value = val
  400. confirm.value.open()
  401. }
  402. // 接受邀请
  403. function handleAgree (val) {
  404. isAgree.value = true
  405. chooseInvite.value = val
  406. confirm.value.open()
  407. }
  408. // 确认
  409. async function handleConfirm () {
  410. // 拒绝
  411. if (!isAgree.value) {
  412. await userInterviewInviteReject(chooseInvite.value.id)
  413. } else {
  414. await userInterviewInviteReject(chooseInvite.value.id)
  415. }
  416. uni.showToast({ title: '操作成功', icon: 'none' })
  417. send(JSON.stringify({ id: chooseInvite.value.id }), channelItem.value, isAgree.value ? 104 : 103)
  418. }
  419. // 关闭
  420. function handleCloseConfirm () {
  421. confirm.value.close()
  422. }
  423. // 查看更多
  424. async function handleMore () {
  425. try {
  426. uni.showLoading({
  427. title: '加载中...'
  428. })
  429. pageSize.value++
  430. const { list, more } = await getMoreMessages(pageSize.value, channelItem.value)
  431. items.value.unshift(...list.value)
  432. hasMore.value = more
  433. } finally {
  434. uni.hideLoading()
  435. }
  436. }
  437. // 上传简历
  438. function handleUploadResume () {
  439. wx.chooseMessageFile({
  440. count: 1,
  441. type: 'file',
  442. success (res) {
  443. const title = res.tempFiles[0].name
  444. const path = res.tempFiles[0].path
  445. const test = /\.(pdf|docx|doc)$/.test(title)
  446. if (!test) {
  447. uni.showToast({
  448. icon: 'none',
  449. title: '请上传pdf、word类型的文件',
  450. duration: 2000
  451. })
  452. return
  453. }
  454. //效验是否为支持的文件格式
  455. uploadFile(path).then(async (res) => {
  456. if (!res.data) {
  457. uni.showToast({
  458. title: '上传失败',
  459. icon: 'none'
  460. })
  461. return
  462. }
  463. await saveResume({ title, url: res.data })
  464. uni.showToast({
  465. title: '上传成功',
  466. icon: 'success'
  467. })
  468. handleFindResume()
  469. })
  470. }
  471. })
  472. }
  473. // 获取职位信息
  474. async function getMessageTypeSync () {
  475. try {
  476. const { data } = await getMessageType({
  477. fromUid: IM.uid,
  478. channelId: channelItem.value.channelID,
  479. type: 102,
  480. page: {
  481. current: 1,
  482. size: 1,
  483. orders: [
  484. { column: 'message_seq', asc: false }
  485. ]
  486. }
  487. })
  488. if (!data.records || !data.records.length) {
  489. return
  490. }
  491. const _item = data.records.pop()
  492. const _itemJSON = JSON.parse(_item.payload)
  493. const _content = JSON.parse(_itemJSON.content)
  494. positionInfo.value = _content.positionInfo
  495. const { data: check } = await jobCvRelCheckSend({ jobId: _content.positionInfo.id })
  496. isSendResume.value = check
  497. } catch (error) {
  498. console.log(345, error)
  499. }
  500. }
  501. onLoad(async (options) => {
  502. info.value = Object.keys(options).reduce((r, k) => {
  503. r[k] = decodeURIComponent(options[k])
  504. return r
  505. }, {})
  506. isEmployment.value = info.value.isEmployment
  507. await init(info.value.id, info.value.enterpriseId)
  508. // 获取最新的职位信息
  509. await getMessageTypeSync(info.value.id)
  510. await getStatusList()
  511. getInterviewInviteList()
  512. // 清除未读消息
  513. resetUnread(channelItem.value)
  514. // 更新未读消息
  515. updateUnreadCount()
  516. })
  517. </script>
  518. <style lang="scss" scoped>
  519. .white {
  520. color: #FFF !important;
  521. }
  522. .text-left {
  523. text-align: left !important;
  524. }
  525. .text-right {
  526. text-align: right !important;
  527. }
  528. .box {
  529. width: 100%;
  530. height: 100vh;
  531. display: flex;
  532. flex-direction: column;
  533. &-top {
  534. &-title {
  535. padding: 0 60rpx;
  536. box-sizing: border-box;
  537. width: 100%;
  538. height: 80rpx;
  539. line-height: 80rpx;
  540. // text-align: center;
  541. border-bottom: 2rpx solid #EEE;
  542. overflow: hidden;
  543. white-space: nowrap;
  544. text-overflow: ellipsis;
  545. .subText {
  546. font-size: .85em;
  547. color: #999;
  548. .gun {
  549. padding: 0 10rpx;
  550. }
  551. }
  552. }
  553. &-content {
  554. padding: 20rpx 50rpx;
  555. padding-bottom: 20rpx;
  556. border-bottom: 2rpx solid #eee;
  557. .color-666 {
  558. color: #666;
  559. }
  560. .font-weight-bold {
  561. font-weight: bold;
  562. }
  563. .color-primary {
  564. color: #009688;
  565. }
  566. .ml-3 {
  567. margin-left: 40rpx;
  568. }
  569. .mt-1 {
  570. margin-top: 12rpx;
  571. }
  572. .font-size-14 {
  573. font-size: 24rpx;
  574. }
  575. .py-1 {
  576. padding: 4rpx 0;
  577. }
  578. .tipsText {
  579. font-size: .75em;
  580. color: #999;
  581. }
  582. &-t {
  583. display: flex;
  584. justify-content: space-between;
  585. }
  586. .btnBox {
  587. display: flex;
  588. padding: 20rpx 60rpx;
  589. justify-content: space-around;
  590. }
  591. }
  592. }
  593. &-main {
  594. flex: 1;
  595. height: 0;
  596. padding: 40rpx;
  597. // overflow-y: auto;
  598. box-sizing: border-box;
  599. &-more {
  600. display: flex;
  601. justify-content: center;
  602. align-items: center;
  603. color: #24bc3e;
  604. font-size: .9em;
  605. padding: 20rpx 0;
  606. }
  607. &-time {
  608. user-select: none;
  609. position: relative;
  610. top: 16rpx;
  611. margin: 40rpx 0;
  612. text-align: center;
  613. max-height: 40rpx;
  614. text-align: center;
  615. font-weight: 400;
  616. font-size: .85em;
  617. color: #999;
  618. }
  619. .jobCard {
  620. padding: 30rpx;
  621. background: #E2F2F0;
  622. color: #009688 ;
  623. margin-top: 20rpx;
  624. max-width: unset;
  625. margin-right: 0;
  626. &-title {
  627. font-size: 1.2em;
  628. }
  629. &-subtitle {
  630. padding: 10rpx 0;
  631. // font-size: .5em;
  632. }
  633. &-divider {
  634. width: 100%;
  635. height: 2rpx;
  636. margin: 20rpx 0;
  637. background: #ddd;
  638. }
  639. &-tag {
  640. display: flex;
  641. flex-wrap: wrap;
  642. }
  643. }
  644. .message-view_item {
  645. display: flex;
  646. flex-direction: row;
  647. align-items: flex-start;
  648. margin: 16rpx 0;
  649. position: relative;
  650. .image {
  651. width: 60rpx;
  652. height: 60rpx;
  653. border-radius: 180rpx;
  654. // flex-grow: 1;
  655. // flex-shrink: 0;
  656. overflow: hidden;
  657. .header {
  658. width: 60rpx;
  659. height: 60rpx;
  660. }
  661. }
  662. .text-end {
  663. text-align: right !important;
  664. width: 400rpx;
  665. margin-right: 20rpx;
  666. }
  667. .message-text {
  668. overflow-wrap: break-word;
  669. background-color: #f0f2f5;
  670. border-radius: 12rpx;
  671. max-width: 75%;
  672. padding: 20rpx;
  673. &.active {
  674. background: #d5e6e8;
  675. }
  676. &.card {
  677. background: #E2F2F0;
  678. color: #009688 ;
  679. margin-top: 20rpx;
  680. max-width: unset;
  681. margin-right: 0;
  682. .btn-actions {
  683. margin: 40rpx auto 20rpx auto ;
  684. text-align: center;
  685. .btn {
  686. padding: 10rpx 30rpx;
  687. background: #C8E7D8;
  688. color: #43AC57;
  689. font-size: .75em;
  690. border-radius: 10rpx;
  691. }
  692. }
  693. }
  694. &.none {
  695. padding: 10rpx 0;
  696. background-color: unset;
  697. }
  698. &.active {
  699. background: #d5e6e8;
  700. }
  701. }
  702. }
  703. .is-self {
  704. flex-direction: row-reverse;
  705. display: flex;
  706. .message-text {
  707. margin-right: 20rpx;
  708. }
  709. }
  710. .is-other {
  711. .message-text {
  712. margin-left: 20rpx;
  713. }
  714. }
  715. }
  716. &-bottom {
  717. max-height: 300rpx;
  718. border-top: 2rpx solid #EEE;
  719. background: rgba(230, 230, 230, 0.5);
  720. padding: 20rpx 40rpx;
  721. box-sizing: border-box;
  722. &-tool {
  723. margin-bottom: 40rpx;
  724. }
  725. textarea {
  726. border-radius: 10rpx;
  727. width: 100%;
  728. min-height: 80rpx;
  729. max-height: 180rpx;
  730. padding: 20rpx;
  731. box-sizing: border-box;
  732. background: #FFF;
  733. }
  734. }
  735. .popup-title {
  736. padding: 30rpx 20rpx;
  737. display: flex;
  738. justify-content: space-between;
  739. border-bottom: 2rpx solid #DDD;
  740. }
  741. .popup-content {
  742. padding: 20rpx 40rpx;
  743. color: #999;
  744. display: flex;
  745. align-content: center;
  746. justify-items: center;
  747. .iconBox {
  748. width: 40rpx;
  749. }
  750. .text {
  751. margin-left: 20rpx;
  752. &.active {
  753. color: #00897b;
  754. }
  755. }
  756. }
  757. .popup-upload {
  758. display: flex;
  759. align-items: center;
  760. justify-content: center;
  761. flex-direction: column;
  762. width: 400rpx;
  763. font-size: .75em;
  764. color: #999;
  765. padding-bottom: 40rpx;
  766. &-box {
  767. margin-top: 20rpx;
  768. width: 200rpx;
  769. height: 200rpx;
  770. text-align: center;
  771. line-height: 200rpx;
  772. border: 4rpx solid #ddd;
  773. border-radius: 8rpx;
  774. }
  775. }
  776. .popup-actions {
  777. padding: 60rpx;
  778. .default {
  779. background: #00897b;
  780. color: #DDD;
  781. font-size: .9em;
  782. }
  783. }
  784. }
  785. </style>