index.vue 25 KB

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