index.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826
  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">
  149. <uni-tag :text="isSendResume ? '简历已投递' : '发送简历'" :disabled="isSendResume" type="success" @tap="handleFindResume"/>
  150. </view>
  151. <textarea
  152. v-model="inputValue"
  153. confirm-type="send"
  154. auto-height
  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. function handleToCenter () {
  322. uni.navigateTo({
  323. url: '/pagesA/interview/index'
  324. })
  325. }
  326. // 预览简历
  327. function handlePreview (payload) {
  328. if (!payload?.content?.query?.src) {
  329. uni.showToast({ title: '简历地址不存在', icon: 'none' })
  330. return
  331. }
  332. preview(payload.content.query.src)
  333. }
  334. // 获取简历
  335. async function handleFindResume () {
  336. if (isSendResume.value) {
  337. return
  338. }
  339. uni.showLoading({
  340. title: '真正查找简历'
  341. })
  342. try {
  343. // 获取简历列表
  344. const { data } = await getPersonResumeCv()
  345. if (data.length === 0) {
  346. uni.showToast({
  347. title: '您还未上传过简历,请先上传简历后再投递',
  348. icon: 'none',
  349. mask: true,
  350. })
  351. return
  352. }
  353. resumeList.value = data
  354. resumeCheck.value = data[0]
  355. popup.value.open('center')
  356. } finally {
  357. uni.hideLoading()
  358. }
  359. }
  360. // 关闭简历窗口
  361. function handleClose () {
  362. popup.value.close()
  363. }
  364. // 发送简历
  365. async function handleSendResume () {
  366. if (!Object.keys(resumeCheck.value).length) {
  367. uni.showToast({ title: '请选择要投递的简历', icon: 'none' })
  368. return
  369. }
  370. const text = {
  371. remark: '发送简历',
  372. query: {
  373. src: resumeCheck.value.url,
  374. title: resumeCheck.value.title,
  375. id: resumeCheck.value.id,
  376. },
  377. type: 1
  378. }
  379. send (JSON.stringify(text), channelItem.value, 105)
  380. // console.log(isEmployment.value, positionInfo.value)
  381. try {
  382. if (isEmployment.value !== '-1') {
  383. await jobCvRelHireSend({
  384. jobId: positionInfo.value.id,
  385. url: resumeCheck.value.url,
  386. recommendUserId: isEmployment.value
  387. })
  388. } else {
  389. await jobCvRelSend({
  390. jobId: positionInfo.value.id,
  391. title: resumeCheck.value.title,
  392. url: resumeCheck.value.url,
  393. type: positionInfo.value.hire ? 1 : 0
  394. })
  395. }
  396. isSendResume.value = true
  397. popup.value.close()
  398. } catch (error) {
  399. }
  400. }
  401. // 拒绝邀请
  402. function handleRefuse (val) {
  403. isAgree.value = false
  404. chooseInvite.value = val
  405. confirm.value.open()
  406. }
  407. // 接受邀请
  408. function handleAgree (val) {
  409. isAgree.value = true
  410. chooseInvite.value = val
  411. confirm.value.open()
  412. }
  413. // 确认
  414. async function handleConfirm () {
  415. // 拒绝
  416. if (!isAgree.value) {
  417. await userInterviewInviteReject(chooseInvite.value.id)
  418. } else {
  419. await userInterviewInviteReject(chooseInvite.value.id)
  420. }
  421. uni.showToast({ title: '操作成功', icon: 'none' })
  422. send(JSON.stringify({ id: chooseInvite.value.id }), channelItem.value, isAgree.value ? 104 : 103)
  423. }
  424. // 关闭
  425. function handleCloseConfirm () {
  426. confirm.value.close()
  427. }
  428. // 查看更多
  429. async function handleMore () {
  430. try {
  431. uni.showLoading({
  432. title: '加载中...'
  433. })
  434. pageSize.value++
  435. const { list, more } = await getMoreMessages(pageSize.value, channelItem.value)
  436. items.value.unshift(...list.value)
  437. hasMore.value = more
  438. } finally {
  439. uni.hideLoading()
  440. }
  441. }
  442. // 上传简历
  443. function handleUploadResume () {
  444. wx.chooseMessageFile({
  445. count: 1,
  446. type: 'file',
  447. success (res) {
  448. const title = res.tempFiles[0].name
  449. const path = res.tempFiles[0].path
  450. const test = /\.(pdf|docx|doc)$/.test(title)
  451. if (!test) {
  452. uni.showToast({
  453. icon: 'none',
  454. title: '请上传pdf、word类型的文件',
  455. duration: 2000
  456. })
  457. return
  458. }
  459. //效验是否为支持的文件格式
  460. uploadFile(path).then(async (res) => {
  461. if (!res.data) {
  462. uni.showToast({
  463. title: '上传失败',
  464. icon: 'none'
  465. })
  466. return
  467. }
  468. await saveResume({ title, url: res.data })
  469. uni.showToast({
  470. title: '上传成功',
  471. icon: 'success'
  472. })
  473. handleFindResume()
  474. })
  475. }
  476. })
  477. }
  478. // 获取职位信息
  479. async function getMessageTypeSync () {
  480. try {
  481. const { data } = await getMessageType({
  482. fromUid: IM.uid,
  483. channelId: channelItem.value.channelID,
  484. type: 102,
  485. page: {
  486. current: 1,
  487. size: 1,
  488. orders: [
  489. { column: 'message_seq', asc: false }
  490. ]
  491. }
  492. })
  493. if (!data.records || !data.records.length) {
  494. return
  495. }
  496. const _item = data.records.pop()
  497. const _itemJSON = JSON.parse(_item.payload)
  498. const _content = JSON.parse(_itemJSON.content)
  499. positionInfo.value = _content.positionInfo
  500. const { data: check } = await jobCvRelCheckSend({ jobId: _content.positionInfo.id })
  501. isSendResume.value = check
  502. } catch (error) {
  503. console.log(345, error)
  504. }
  505. }
  506. onLoad(async (options) => {
  507. info.value = Object.keys(options).reduce((r, k) => {
  508. r[k] = decodeURIComponent(options[k])
  509. return r
  510. }, {})
  511. isEmployment.value = info.value.isEmployment
  512. await init(info.value.id, info.value.enterpriseId)
  513. // 获取最新的职位信息
  514. await getMessageTypeSync(info.value.id)
  515. await getStatusList()
  516. getInterviewInviteList()
  517. // 清除未读消息
  518. resetUnread(channelItem.value)
  519. // 更新未读消息
  520. updateUnreadCount()
  521. })
  522. </script>
  523. <style lang="scss" scoped>
  524. .white {
  525. color: #FFF !important;
  526. }
  527. .text-left {
  528. text-align: left !important;
  529. }
  530. .text-right {
  531. text-align: right !important;
  532. }
  533. .box {
  534. width: 100%;
  535. height: 100vh;
  536. display: flex;
  537. flex-direction: column;
  538. &-top {
  539. &-title {
  540. padding: 0 60rpx;
  541. box-sizing: border-box;
  542. width: 100%;
  543. height: 80rpx;
  544. line-height: 80rpx;
  545. // text-align: center;
  546. border-bottom: 2rpx solid #EEE;
  547. overflow: hidden;
  548. white-space: nowrap;
  549. text-overflow: ellipsis;
  550. .subText {
  551. font-size: .85em;
  552. color: #999;
  553. .gun {
  554. padding: 0 10rpx;
  555. }
  556. }
  557. }
  558. &-content {
  559. padding: 20rpx 50rpx;
  560. padding-bottom: 20rpx;
  561. border-bottom: 2rpx solid #eee;
  562. .color-666 {
  563. color: #666;
  564. }
  565. .font-weight-bold {
  566. font-weight: bold;
  567. }
  568. .color-primary {
  569. color: #009688;
  570. }
  571. .ml-3 {
  572. margin-left: 40rpx;
  573. }
  574. .mt-1 {
  575. margin-top: 12rpx;
  576. }
  577. .font-size-14 {
  578. font-size: 24rpx;
  579. }
  580. .py-1 {
  581. padding: 4rpx 0;
  582. }
  583. .tipsText {
  584. font-size: .75em;
  585. color: #999;
  586. }
  587. &-t {
  588. display: flex;
  589. justify-content: space-between;
  590. }
  591. .btnBox {
  592. display: flex;
  593. padding: 20rpx 60rpx;
  594. justify-content: space-around;
  595. }
  596. }
  597. }
  598. &-main {
  599. flex: 1;
  600. height: 0;
  601. padding: 40rpx;
  602. // overflow-y: auto;
  603. box-sizing: border-box;
  604. &-more {
  605. display: flex;
  606. justify-content: center;
  607. align-items: center;
  608. color: #24bc3e;
  609. font-size: .9em;
  610. padding: 20rpx 0;
  611. }
  612. &-time {
  613. user-select: none;
  614. position: relative;
  615. top: 16rpx;
  616. margin: 40rpx 0;
  617. text-align: center;
  618. max-height: 40rpx;
  619. text-align: center;
  620. font-weight: 400;
  621. font-size: .85em;
  622. color: #999;
  623. }
  624. .jobCard {
  625. padding: 30rpx;
  626. background: #E2F2F0;
  627. color: #009688 ;
  628. margin-top: 20rpx;
  629. max-width: unset;
  630. margin-right: 0;
  631. &-title {
  632. font-size: 1.2em;
  633. }
  634. &-subtitle {
  635. padding: 10rpx 0;
  636. // font-size: .5em;
  637. }
  638. &-divider {
  639. width: 100%;
  640. height: 2rpx;
  641. margin: 20rpx 0;
  642. background: #ddd;
  643. }
  644. &-tag {
  645. display: flex;
  646. flex-wrap: wrap;
  647. }
  648. }
  649. .message-view_item {
  650. display: flex;
  651. flex-direction: row;
  652. align-items: flex-start;
  653. margin: 16rpx 0;
  654. position: relative;
  655. .image {
  656. width: 60rpx;
  657. height: 60rpx;
  658. border-radius: 180rpx;
  659. // flex-grow: 1;
  660. // flex-shrink: 0;
  661. overflow: hidden;
  662. .header {
  663. width: 60rpx;
  664. height: 60rpx;
  665. }
  666. }
  667. .text-end {
  668. text-align: right !important;
  669. width: 400rpx;
  670. margin-right: 20rpx;
  671. }
  672. .message-text {
  673. overflow-wrap: break-word;
  674. background-color: #f0f2f5;
  675. border-radius: 12rpx;
  676. max-width: 75%;
  677. padding: 20rpx;
  678. &.active {
  679. background: #d5e6e8;
  680. }
  681. &.card {
  682. background: #E2F2F0;
  683. color: #009688 ;
  684. margin-top: 20rpx;
  685. max-width: unset;
  686. margin-right: 0;
  687. .btn-actions {
  688. margin: 40rpx auto 20rpx auto ;
  689. text-align: center;
  690. .btn {
  691. padding: 10rpx 30rpx;
  692. background: #C8E7D8;
  693. color: #43AC57;
  694. font-size: .75em;
  695. border-radius: 10rpx;
  696. }
  697. }
  698. }
  699. &.none {
  700. padding: 10rpx 0;
  701. background-color: unset;
  702. }
  703. &.active {
  704. background: #d5e6e8;
  705. }
  706. }
  707. }
  708. .is-self {
  709. flex-direction: row-reverse;
  710. display: flex;
  711. .message-text {
  712. margin-right: 20rpx;
  713. }
  714. }
  715. .is-other {
  716. .message-text {
  717. margin-left: 20rpx;
  718. }
  719. }
  720. }
  721. &-bottom {
  722. max-height: 300rpx;
  723. border-top: 2rpx solid #EEE;
  724. background: rgba(230, 230, 230, 0.5);
  725. padding: 20rpx 40rpx;
  726. box-sizing: border-box;
  727. &-tool {
  728. margin-bottom: 40rpx;
  729. }
  730. textarea {
  731. border-radius: 10rpx;
  732. width: 100%;
  733. min-height: 80rpx;
  734. max-height: 180rpx;
  735. padding: 20rpx;
  736. box-sizing: border-box;
  737. background: #FFF;
  738. }
  739. }
  740. .popup-title {
  741. padding: 30rpx 20rpx;
  742. display: flex;
  743. justify-content: space-between;
  744. border-bottom: 2rpx solid #DDD;
  745. }
  746. .popup-content {
  747. padding: 20rpx 40rpx;
  748. color: #999;
  749. display: flex;
  750. align-content: center;
  751. justify-items: center;
  752. .iconBox {
  753. width: 40rpx;
  754. }
  755. .text {
  756. margin-left: 20rpx;
  757. &.active {
  758. color: #00897b;
  759. }
  760. }
  761. }
  762. .popup-upload {
  763. display: flex;
  764. align-items: center;
  765. justify-content: center;
  766. flex-direction: column;
  767. width: 400rpx;
  768. font-size: .75em;
  769. color: #999;
  770. padding-bottom: 40rpx;
  771. &-box {
  772. margin-top: 20rpx;
  773. width: 200rpx;
  774. height: 200rpx;
  775. text-align: center;
  776. line-height: 200rpx;
  777. border: 4rpx solid #ddd;
  778. border-radius: 8rpx;
  779. }
  780. }
  781. .popup-actions {
  782. padding: 60rpx;
  783. .default {
  784. background: #00897b;
  785. color: #DDD;
  786. font-size: .9em;
  787. }
  788. }
  789. }
  790. </style>