index.vue 24 KB

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