postInfo.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765
  1. <template>
  2. <div @click.stop="closeShow()" class="postInfos" style="padding-bottom: 20px;">
  3. <!-- 岗位详情 -->
  4. <div class="postInfo flex align-center justify-center">
  5. <div class="postInfo-box">
  6. <!-- 岗位名称/薪资 -->
  7. <div class="postInfo-box-top flex align-center justify-between">
  8. <div class="postInfo-box-top-l">
  9. {{ info.ruleClassifyName }}
  10. <span>{{ info.salaryRange }}</span>
  11. </div>
  12. <!-- <div class="postInfo-box-top-r flex align-center">
  13. <div @click.stop="getShare()" class="postInfo-box-top-r-qr flex align-center">
  14. <img src="/images/postimg/share.png" alt="" />
  15. 分享岗位
  16. <div v-if="isShowQr" class="postInfo-box-top-r-qrs flex align-center justify-center">
  17. <img :src="qr" alt="" />
  18. </div>
  19. </div>
  20. <div @click.stop="openShow()" class="flex align-center">
  21. <img src="/images/postimg/jubao.png" alt="" />
  22. 举报
  23. </div>
  24. </div> -->
  25. </div>
  26. <div class="postInfo-box-status flex align-center">
  27. {{ info.province ? info.province : '' }}{{ info.city ? info.city : '' }}{{ info.county ? info.county
  28. : '' }}{{ info.address ? info.address : '' }}
  29. </div>
  30. <!-- 地址、要求 -->
  31. <div class="postInfo-box-ins">
  32. {{info.city}} {{info.county}}<el-divider direction="vertical" />{{info.experience}}<el-divider
  33. direction="vertical" />{{info.education}}
  34. </div>
  35. <!-- 标签/操作 -->
  36. <div class="postInfo-box-labels flex justify-between">
  37. <div class="postInfo-box-labels-l flex align-center flex-wrap">
  38. <div class="postInfo-box-labels-l-i" v-for="(item,index) in info.positionWelfare" :key="index">
  39. {{item}}
  40. </div>
  41. </div>
  42. <div class="postInfo-box-labels-r flex align-center">
  43. <div @click.stop="setCollection()"
  44. class="postInfo-box-labels-r-s flex align-center justify-center">
  45. <el-icon v-if="info.isCollection==0" :size="20" style="margin-right: 6px;">
  46. <Star />
  47. </el-icon>
  48. <el-icon v-else :size="20" style="margin-right: 6px;">
  49. <StarFilled />
  50. </el-icon>
  51. {{info.isCollection==0?'收藏':'已收藏'}}
  52. </div>
  53. <div @click.stop="openMeg()" class="postInfo-box-labels-r-l flex align-center justify-center">
  54. 立即沟通
  55. </div>
  56. </div>
  57. </div>
  58. </div>
  59. </div>
  60. <!-- 岗位介绍 -->
  61. <div class="postJs flex align-center justify-center">
  62. <div class="postJs-box">
  63. <div class="postJs-box-title">
  64. 岗位介绍
  65. </div>
  66. <div class="postJs-box-tag flex align-center flex-wrap">
  67. <div class="postJs-box-tag-item" v-for="(item,index) in info.tag" :key="index">
  68. {{item}}
  69. </div>
  70. </div>
  71. <div class="postJs-box-content" v-html="info.positionDetails"></div>
  72. </div>
  73. </div>
  74. <!-- 岗位福利 -->
  75. <div class="postJs flex align-center justify-center">
  76. <div class="postJs-box">
  77. <div class="postJs-box-title">
  78. 岗位福利
  79. </div>
  80. <div class="postJs-box-tag flex align-center flex-wrap" v-if="info.welfareTag">
  81. <div class="postJs-box-tag-item" v-for="(item, index) in info.welfareTag ? info.welfareTag.split(';') : []" :key="index">
  82. {{ item }}
  83. </div>
  84. </div>
  85. </div>
  86. </div>
  87. <!-- 公司简介 -->
  88. <div class="postGs flex align-center justify-center">
  89. <div class="postGs-box">
  90. <div class="postGs-box-title">
  91. 公司基本信息
  92. </div>
  93. <div class="postGs-box-info flex align-center">
  94. <img :src="info.company && info.company.companyLogo?info.company.companyLogo:'/default.jpg'" alt="" />
  95. <div class="postGs-box-info-r">
  96. <div class="postGs-box-info-r-name">
  97. {{ info.company?.companyName || info.company?.companyAllName || '匿名公司' }}
  98. </div>
  99. <div class="postGs-box-info-r-bottom">
  100. {{info.company?info.company.companyScope:''}}
  101. <span>
  102. {{info.company?info.company.companyPeople:''}}
  103. </span>
  104. </div>
  105. </div>
  106. </div>
  107. <el-divider />
  108. <div id="container" class="postMap">
  109. </div>
  110. <div class="postGs-box-address flex align-center">
  111. <el-icon size="18" color="#00DD9A" style="margin-right: 10px;">
  112. <Location />
  113. </el-icon>
  114. {{info.company?info.company.companyAddress:''}}
  115. </div>
  116. </div>
  117. </div>
  118. <!-- 消息组件 -->
  119. <messageCom v-if="showMeg" :byUserId="byUserId" :postPushId="postPushId"
  120. :chatConversationId="chatConversationId" :showMeg="showMeg" :userType="1" @closeMeg="closeMeg" />
  121. <!-- 举报弹窗 -->
  122. <el-dialog v-model="show" @close="closeJb" :draggable="true" destroy-on-close align-center center>
  123. <template #header>
  124. <div class="my-header flex align-center">
  125. <div class="my-header-title" style="font-weight: bold;">
  126. 举报
  127. </div>
  128. </div>
  129. </template>
  130. <div class="jb" v-loading="loading">
  131. <div class="jb-title">
  132. 问题和意见
  133. </div>
  134. <div class="jb-text">
  135. <el-input resize="none" :input-style="inputStyles" v-model="sendDate.content"
  136. :autosize="{ minRows: 6, maxRows: 8 }" type="textarea" placeholder="请详细描述你的问题和意见..." />
  137. </div>
  138. <div class="jb-title" style="margin-top: 20px;">
  139. 电话/微信
  140. </div>
  141. <div class="jb-text jb-texts">
  142. <el-input :input-style="inputStyles" style="width: 100%;" v-model="sendDate.contact"
  143. placeholder="方便我们联系您" />
  144. </div>
  145. <div class="jb-title" style="margin-top: 20px;">
  146. 上传图片
  147. </div>
  148. <div class="jb-text jb-texts" style="background-color: #ffffff;">
  149. <el-upload v-model:file-list="imgs" :action="action" :on-preview="handlePictureCardPreview"
  150. :on-remove="handleRemove" list-type="picture-card">
  151. <el-icon>
  152. <Plus />
  153. </el-icon>
  154. </el-upload>
  155. <el-dialog v-model="dialogVisible">
  156. <img w-full :src="dialogImageUrl" style="width: 100%;height: auto;" alt="Preview Image" />
  157. </el-dialog>
  158. </div>
  159. <div class="jb-btn flex align-center">
  160. <el-button @click.stop="show = false">取消</el-button>
  161. <el-button type="primary" @click.stop="reportSave">提交</el-button>
  162. </div>
  163. </div>
  164. </el-dialog>
  165. </div>
  166. </template>
  167. <script>
  168. import {
  169. ROOTPATH,
  170. ROOTPATH4
  171. } from '../../../comment/httpUrl.js'
  172. import axios from 'axios'
  173. import messageCom from '../../components/messageCom/messageCom.vue'
  174. import {
  175. ElMessageBox,
  176. ElMessage,
  177. } from 'element-plus'
  178. export default {
  179. components: {
  180. messageCom
  181. },
  182. data() {
  183. return {
  184. dialogImageUrl: '',
  185. dialogVisible: false,
  186. action: ROOTPATH4 + 'sqx_fast/alioss/upload',
  187. byUserId: '',
  188. chatConversationId: '',
  189. showMeg: false, //是否打开聊天组件
  190. sendDate: {
  191. content: '',
  192. contact: ''
  193. },
  194. inputStyles: {
  195. border: 'none',
  196. background: '#F7F7F7',
  197. borderRadius: '8px',
  198. boxShadow: 'none',
  199. },
  200. show: false,
  201. postPushId: '', //岗位id
  202. info: {}, //岗位详情
  203. qr: '', //分享二维码
  204. isShowQr: false, //是否显示分享二维码
  205. screenHeight: 0, //屏幕高度
  206. loading: false,
  207. imgs: [], //上传图片
  208. }
  209. },
  210. mounted() {
  211. this.screenHeight = window.innerHeight
  212. this.postPushId = this.$route.query.postPushId
  213. let inviterCode = this.$route.query.inviterCode
  214. if (inviterCode) {
  215. localStorage.setItem('inviterCode', inviterCode)
  216. }
  217. if (this.postPushId) {
  218. // this.qr = ROOTPATH + '/app/invite/mpPageCreateQr?page=pages/index/game/order&postPushId=' + this.postPushId
  219. this.getJobInfo()
  220. }
  221. },
  222. methods: {
  223. //移除图片
  224. handleRemove(e) {
  225. let imgs = []
  226. this.imgs.map(item => {
  227. imgs.push(item.response.data)
  228. })
  229. this.sendDate.imgs = imgs.join(',')
  230. },
  231. //放大查看
  232. handlePictureCardPreview(e) {
  233. this.dialogImageUrl = e.url
  234. this.dialogVisible = true
  235. },
  236. closeJb() {
  237. this.imgs = []
  238. this.sendDate = {
  239. content: '',
  240. contact: ''
  241. }
  242. },
  243. //去登录
  244. goLogo() {
  245. this.$router.push({
  246. name: 'login'
  247. })
  248. },
  249. //关闭子弹窗组件的回调
  250. closeMeg(data) {
  251. //关闭聊天组件
  252. this.showMeg = data
  253. },
  254. //立即联系
  255. openMeg() {
  256. if (!localStorage.getItem('token')) {
  257. this.goLogo()
  258. return
  259. }
  260. this.$Request.post('/app/chat/insertChatConversation', {
  261. userId: localStorage.getItem('userId'), //用户userid
  262. focusedUserId: this.info.user.userId, //企业userid
  263. type: 1,
  264. postPushId: this.info.postPushId,
  265. resumesId: localStorage.getItem('resumeId')
  266. }, {
  267. type: 'json'
  268. }).then(res => {
  269. if (res.code == 0) {
  270. this.byUserId = this.info.user.userId
  271. this.chatConversationId = res.data.chatConversationId
  272. this.showMeg = true
  273. }
  274. })
  275. },
  276. //初始化地图
  277. initMap() {
  278. var center = new TMap.LatLng(this.info.lat, this.info.lng); //设置中心点坐标
  279. //初始化地图
  280. var map = new TMap.Map(container, {
  281. center: center
  282. });
  283. //创建并初始化MultiMarker
  284. var markerLayer = new TMap.MultiMarker({
  285. map: map, //指定地图容器
  286. //样式定义
  287. styles: {
  288. //创建一个styleId为"myStyle"的样式(styles的子属性名即为styleId)
  289. "myStyle": new TMap.MarkerStyle({
  290. "width": 30, // 点标记样式宽度(像素)
  291. "height": 30, // 点标记样式高度(像素)
  292. "src": '/images/postimg/mapMarker.png', //图片路径
  293. //焦点在图片中的像素位置,一般大头针类似形式的图片以针尖位置做为焦点,圆形点以圆心位置为焦点
  294. "anchor": {
  295. x: 16,
  296. y: 32
  297. }
  298. })
  299. },
  300. //点标记数据数组
  301. geometries: [{
  302. "id": "1", //点标记唯一标识,后续如果有删除、修改位置等操作,都需要此id
  303. "styleId": 'myStyle', //指定样式id
  304. "position": new TMap.LatLng(this.info.lat, this.info.lng) //点标记坐标位置
  305. }]
  306. });
  307. },
  308. //举报
  309. reportSave() {
  310. if (!this.sendDate.content) {
  311. ElMessageBox.alert('请输入举报内容', '提示', {
  312. confirmButtonText: '确认',
  313. })
  314. return
  315. }
  316. if (!this.sendDate.contact) {
  317. ElMessageBox.alert('请输入联系方式', '提示', {
  318. confirmButtonText: '确认',
  319. })
  320. return
  321. }
  322. if (this.imgs.length > 0) {
  323. let imgs = []
  324. this.imgs.map(item => {
  325. imgs.push(item.response.data)
  326. })
  327. this.sendDate.imgs = imgs.join(',')
  328. }
  329. this.loading = true
  330. let data = {
  331. title: this.sendDate.contact,
  332. content: JSON.stringify(this.sendDate),
  333. state: 3,
  334. byUserId: this.postPushId
  335. }
  336. this.$Request.post('/app/message/insertMessage', data, {
  337. type: 'json'
  338. }).then(res => {
  339. if (res.code == 0) {
  340. ElMessage({
  341. message: '已提交',
  342. type: 'success',
  343. duration: 1500,
  344. offset: this.screenHeight / 2
  345. })
  346. this.loading = false
  347. this.show = false
  348. } else {
  349. this.loading = false
  350. ElMessageBox.alert(res.msg, '提示', {
  351. confirmButtonText: '确认'
  352. })
  353. }
  354. })
  355. },
  356. //打开举报弹框
  357. openShow() {
  358. if (!localStorage.getItem('token')) {
  359. this.goLogo()
  360. return
  361. }
  362. this.sendDate = {
  363. content: '',
  364. contact: ''
  365. }
  366. this.show = true
  367. },
  368. /**
  369. * 收藏岗位
  370. */
  371. setCollection() {
  372. if (!localStorage.getItem('token')) {
  373. this.goLogo()
  374. return
  375. }
  376. this.$Request.post("/app/myCollection/saveCollection", {
  377. postPushId: this.postPushId,
  378. type: 1
  379. }).then(res => {
  380. if (res.code == 0) {
  381. if (res.msg == '收藏成功'){
  382. this.info.isCollection = 1
  383. }else{
  384. this.info.isCollection = 0
  385. }
  386. }
  387. })
  388. },
  389. closeShow() {
  390. this.isShowQr = false
  391. },
  392. //显示二维码
  393. getShare() {
  394. // this.isShowQr = !this.isShowQr
  395. if (!localStorage.getItem('token')) {
  396. this.goLogo()
  397. return
  398. }
  399. let url = ROOTPATH4 + '' + this.$route.name + '?postPushId=' + this.$route.query.postPushId +
  400. '&inviterCode=' + this.$store.state.invitationCode
  401. ElMessageBox.confirm(
  402. url,
  403. '分享岗位', {
  404. confirmButtonText: '一键复制',
  405. cancelButtonText: '取消',
  406. type: 'warning',
  407. }
  408. ).then(() => {
  409. navigator.clipboard.writeText(url)
  410. .then(() => {
  411. ElMessage({
  412. type: 'success',
  413. message: '复制成功',
  414. duration: 1500,
  415. offset: this.screenHeight / 2
  416. })
  417. })
  418. .catch(() => {
  419. ElMessage({
  420. type: 'info',
  421. message: '复制失败',
  422. duration: 1500,
  423. offset: this.screenHeight / 2
  424. })
  425. })
  426. }).catch(() => {
  427. })
  428. },
  429. //获取岗位详情
  430. getJobInfo() {
  431. let data = {
  432. userId: localStorage.getItem('userId'),
  433. postPushId: this.postPushId
  434. }
  435. this.$Request.get('/app/postPush/selectPostPushDetails', {
  436. params: data
  437. }).then(res => {
  438. this.info = res.data
  439. //处理标签
  440. if (this.info.positionWelfare) {
  441. this.info.positionWelfare = this.info.positionWelfare.split(',')
  442. } else {
  443. this.info.positionWelfare = []
  444. }
  445. // 处理tag
  446. if (this.info.tag) {
  447. this.info.tag = this.info.tag.split(',')
  448. } else {
  449. this.info.tag = []
  450. }
  451. this.initMap()
  452. })
  453. },
  454. }
  455. }
  456. </script>
  457. <style lang="scss" scoped>
  458. $marginTop-60: 120px;
  459. :deep(.el-input__wrapper) {
  460. background-color: #F7F7F7 !important;
  461. box-shadow: none !important;
  462. }
  463. :deep(.el-input) {
  464. --el-input-focus-border: none;
  465. --el-input-focus-border-color: none;
  466. }
  467. :deep(.is-focus) {
  468. box-shadow: none;
  469. }
  470. :deep(.el-textarea__inner) {
  471. box-shadow: none;
  472. }
  473. :deep(.el-input__wrapper:hover) {
  474. box-shadow: none;
  475. }
  476. :deep(.el-dialog) {
  477. border-radius: 14px !important;
  478. padding: 0 !important;
  479. }
  480. :deep(.el-dialog__body) {
  481. padding-top: 10px !important;
  482. }
  483. :deep(.el-dialog__header) {
  484. background: linear-gradient(45deg, #f2fffa, #FFFFFF);
  485. padding: 10px;
  486. border-radius: 14px 14px 0 0;
  487. }
  488. .jb {
  489. width: calc(100% - 20px);
  490. padding: 0 10px 10px 10px;
  491. .jb-title {
  492. color: #333333;
  493. font-size: 14px;
  494. font-weight: 500;
  495. }
  496. .jb-text {
  497. width: 100%;
  498. margin-top: 10px;
  499. background-color: #F7F7F7;
  500. border-radius: 8px;
  501. }
  502. .jb-btn {
  503. margin-top: 40px;
  504. justify-content: flex-end;
  505. }
  506. }
  507. .postInfo {
  508. width: 100%;
  509. height: auto;
  510. margin-top: 20px;
  511. .postInfo-box {
  512. width: calc(100% - $marginTop-60 * 2);
  513. height: 100%;
  514. background-color: #ffffff;
  515. border-radius: 16px;
  516. padding: 30px 30px 10px 30px;
  517. }
  518. .postInfo-box-top-l {
  519. font-size: 20px;
  520. font-weight: 500;
  521. span {
  522. margin-left: 30px;
  523. font-size: 18px;
  524. color: #00DD9A;
  525. font-weight: 500;
  526. }
  527. }
  528. .postInfo-box-top-r {
  529. img {
  530. width: 20px;
  531. height: 20px;
  532. margin-right: 10px;
  533. }
  534. font-size: 14px;
  535. div {
  536. color: #999999;
  537. margin-left: 30px;
  538. cursor: pointer;
  539. }
  540. }
  541. .postInfo-box-top-r-qr {
  542. position: relative;
  543. .postInfo-box-top-r-qrs {
  544. position: absolute;
  545. bottom: -160px;
  546. left: 15%;
  547. transform: translate(-50%, 0);
  548. z-index: 999;
  549. width: 150px;
  550. height: 150px;
  551. background-color: #ffffff;
  552. border-radius: 10px;
  553. border: 1px solid #f5f5f5;
  554. img {
  555. width: 120px;
  556. height: 120px;
  557. margin-right: 0;
  558. }
  559. }
  560. }
  561. .postInfo-box-status {
  562. margin-top: 20px;
  563. color: #9ca4ab;
  564. font-size: 14px;
  565. img {
  566. width: 20px;
  567. height: 20px;
  568. margin-right: 10px;
  569. }
  570. }
  571. .postInfo-box-ins {
  572. margin-top: 20px;
  573. font-size: 16px;
  574. color: #666666;
  575. }
  576. .postInfo-box-labels {
  577. margin-top: 30px;
  578. width: 100%;
  579. align-items: flex-end;
  580. }
  581. .postInfo-box-labels-l {
  582. width: 70%;
  583. // background-color: aqua;
  584. .postInfo-box-labels-l-i {
  585. padding: 6px 16px;
  586. border-radius: 4px;
  587. background-color: #F5F5F5;
  588. color: #666666;
  589. font-size: 15px;
  590. margin-right: 20px;
  591. margin-bottom: 20px;
  592. cursor: pointer;
  593. }
  594. }
  595. .postInfo-box-labels-r {
  596. width: 30%;
  597. justify-content: flex-end;
  598. margin-bottom: 20px;
  599. .postInfo-box-labels-r-s {
  600. width: 120px;
  601. height: 40px;
  602. border: 1px solid #00DD9A;
  603. border-radius: 8px;
  604. color: #00DD9A;
  605. font-size: 18px;
  606. cursor: pointer;
  607. }
  608. .postInfo-box-labels-r-l {
  609. width: 210px;
  610. height: 40px;
  611. background: #00DD9A;
  612. border-radius: 8px;
  613. font-size: 18px;
  614. color: #ffffff;
  615. margin-left: 20px;
  616. cursor: pointer;
  617. }
  618. }
  619. }
  620. .postJs {
  621. width: 100%;
  622. height: auto;
  623. margin-top: 20px;
  624. .postJs-box {
  625. width: calc(100% - $marginTop-60 * 2);
  626. height: 100%;
  627. border-radius: 16px;
  628. padding: 30px;
  629. background-color: #ffffff;
  630. }
  631. .postJs-box-title {
  632. font-weight: 500;
  633. font-size: 18px;
  634. }
  635. .postJs-box-tag {
  636. margin-top: 20px;
  637. .postJs-box-tag-item {
  638. margin-right: 20px;
  639. margin-bottom: 20px;
  640. padding: 6px 16px;
  641. border-radius: 4px;
  642. background-color: #F5F5F5;
  643. color: #333333;
  644. font-size: 15px;
  645. cursor: pointer;
  646. }
  647. }
  648. .postJs-box-content {
  649. font-size: 16px;
  650. color: #666666;
  651. }
  652. }
  653. .postGs {
  654. width: 100%;
  655. height: auto;
  656. margin-top: 20px;
  657. .postGs-box {
  658. width: calc(100% - $marginTop-60 * 2);
  659. height: 100%;
  660. border-radius: 16px;
  661. padding: 30px;
  662. background-color: #ffffff;
  663. }
  664. .postGs-box-title {
  665. font-weight: 500;
  666. font-size: 18px;
  667. }
  668. .postGs-box-info {
  669. margin-top: 30px;
  670. img {
  671. width: 64px;
  672. height: 64px;
  673. margin-right: 10px;
  674. border-radius: 50%;
  675. }
  676. .postGs-box-info-r-name {
  677. color: #666666;
  678. font-size: 16px;
  679. }
  680. .postGs-box-info-r-bottom {
  681. margin-top: 10px;
  682. color: #666666;
  683. font-size: 14px;
  684. span {
  685. margin-left: 10px;
  686. }
  687. }
  688. }
  689. .postMap {
  690. width: 100%;
  691. height: 200px;
  692. border-radius: 10px;
  693. }
  694. .postGs-box-address {
  695. font-size: 14px;
  696. color: #666666;
  697. margin-top: 20px;
  698. }
  699. }
  700. </style>