index.vue 26 KB

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