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