index.vue 25 KB

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