index.vue 23 KB

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