index.vue 23 KB

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