poster.vue 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. <!-- 分享职位 -->
  2. <template>
  3. <div style="background-color: #f0f0f0;" :style="{'padding': '10px'}">
  4. <v-card
  5. class="py-3 px-5"
  6. style="min-height: calc(100vh - 20px); box-sizing: border-box; margin: 0 auto;width: 900px;"
  7. >
  8. <div v-if="!Object.keys(info).length">加载失败</div>
  9. <div v-else>
  10. <div class="d-flex justify-space-between">
  11. <h2 class="JobName ellipsis">{{ info.name }}</h2>
  12. <span class="salary">{{ info.payFrom }}-{{ info.payTo }}/{{ positionInfo.payName }}</span>
  13. </div>
  14. <div class="d-flex justify-space-between mt-4">
  15. <div class="banner-tags">
  16. <div v-for="k in desc" :key="k.mdi" class="mr-3">
  17. <v-icon color="var(--color-666)" size="20">{{ k.mdi }}</v-icon>
  18. <span class="f-w-600 ml-1">{{ positionInfo[k.value] }}</span>
  19. </div>
  20. </div>
  21. </div>
  22. <div class="mt-4" v-if="info?.tagList">
  23. <v-chip size="small" class="mr-1 mb-1" color="primary" label v-for="(k, i) in info.tagList" :key="i">{{ k }}</v-chip>
  24. </div>
  25. <div class="text-end d-flex align-center justify-space-between mt-3">
  26. <svg-icon v-if="info.hire" name="pin" size="50"></svg-icon>
  27. </div>
  28. <div v-if="info.hire" class="mt-3">
  29. <v-chip v-if="info.hirePrice" label color="primary">赏金:{{ commissionCalculation(info.hirePrice, 1) }}元</v-chip>
  30. <v-chip v-if="info.hirePoint" label color="primary">积分:{{ commissionCalculation(info.hirePoint, 1) }}点</v-chip>
  31. </div>
  32. <v-divider class="mt-3"></v-divider>
  33. <div class="mt-3 mb-1 f-w-600">{{ $t('position.jobResponsibilities') }}</div>
  34. <div v-if="info.content" class="requirement" v-html="info.content?.replace(/\n/g, '</br>')"></div>
  35. <div v-else>暂无</div>
  36. <div class="mt-3 mb-1 f-w-600">{{ $t('position.jobRequirements') }}</div>
  37. <div v-if="info.requirement" class="requirement" v-html="info.requirement?.replace(/\n/g, '</br>')"></div>
  38. <div v-else>暂无</div>
  39. <v-divider class="my-3"></v-divider>
  40. <div class="contact">
  41. <h4>公司信息</h4>
  42. <div class="mt-5">
  43. <!-- <v-img :src="info.contact?.avatar || 'https://minio.citupro.com/dev/menduner/7.png'" :width="45" style="height: 45px;"></v-img> -->
  44. <div class="contact-name">{{ info.enterprise?.name }}</div>
  45. <div v-if="info?.enterprise?.tagList" class="mt-3">
  46. <v-chip size="small" class="mr-1 mb-1" color="primary" label v-for="(k, i) in info.enterprise?.tagList" :key="i">{{ k }}</v-chip>
  47. </div>
  48. <div class="contact-info">招聘者:{{ info.contact?.name }} · {{ info.contact?.postNameCn }}</div>
  49. </div>
  50. </div>
  51. <v-divider class="my-3"></v-divider>
  52. <div>
  53. <h4>{{ $t('position.address') }}</h4>
  54. <div class="mt-1">
  55. <v-icon size="25" color="primary">mdi-map-marker</v-icon>
  56. <span style="color: var(--color-666);font-size: 15px;">{{ info.address }}</span>
  57. </div>
  58. </div>
  59. <div class="pa-3" style="position: absolute; right: 30px; bottom: 30px; background-color: #fff;">
  60. <QrCode style="margin: 0 auto;" :text="shareUrlTxt" :width="170" />
  61. <div style="color: #666;">了解更多信息长按识别二维码</div>
  62. </div>
  63. </div>
  64. </v-card>
  65. </div>
  66. </template>
  67. <script setup>
  68. import { commissionCalculation } from '@/utils/position'
  69. defineOptions({name: 'recruit-personal-shareJob-index'})
  70. import { ref } from 'vue';
  71. import { getPositionDetails } from '@/api/position'
  72. import { dealDictObjData } from '@/utils/position'
  73. // 职位详情
  74. const props = defineProps({
  75. jobId: String,
  76. })
  77. import { useRouter } from 'vue-router'; const router = useRouter()
  78. const userInfo = localStorage.getItem('userInfo') ? JSON.parse(localStorage.getItem('userInfo')) : {}
  79. const shareUrlTxt = import.meta.env.VITE_ACCESS_BASE_URL + '/shareJob?' + new URLSearchParams({
  80. jobId: router.currentRoute.value.params?.id,
  81. sharedById: userInfo?.id,
  82. }).toString()
  83. const info = ref({})
  84. const positionInfo = ref({})
  85. const getPositionDetail = async () => {
  86. const data = await getPositionDetails({ id: props.jobId })
  87. info.value = data
  88. positionInfo.value = { ...dealDictObjData({}, info.value), ...info.value }
  89. }
  90. if (props.jobId) getPositionDetail()
  91. const desc = [
  92. { mdi: 'mdi-map-marker-outline', value: 'areaName' },
  93. { mdi: 'mdi-school-outline', value: 'eduName' },
  94. { mdi: 'mdi-clock-time-ten-outline', value: 'expName' }
  95. ]
  96. </script>
  97. <style lang="scss" scoped>
  98. .f-w-600 { font-weight: 600; }
  99. .radius { border-radius: 8px; }
  100. .salary {
  101. color: var(--v-error-base);
  102. line-height: 41px;
  103. font-weight: 600;
  104. height: auto;
  105. display: inline-block;
  106. vertical-align: sub;
  107. }
  108. .JobName {
  109. color: #37576c;
  110. font-size: 28px;
  111. margin-right: 30px;
  112. margin-top: 1px;
  113. vertical-align: middle;
  114. flex: 1;
  115. }
  116. .banner-tags { display: flex; flex-wrap: wrap; }
  117. .requirement {
  118. white-space: pre-wrap;
  119. word-break: break-all;
  120. line-height: 28px;
  121. color: var(--color-333);
  122. font-size: 15px;
  123. text-align: justify;
  124. letter-spacing: 0;
  125. }
  126. .contact-name {
  127. font-size: 20px;
  128. font-weight: 500;
  129. color: var(--color-222);
  130. line-height: 28px;
  131. }
  132. .contact-info {
  133. font-size: 15px;
  134. color: var(--color-666);
  135. line-height: 21px;
  136. margin-top: 8px;
  137. }
  138. .button-item {
  139. min-width: 110px;
  140. height: 36px
  141. }
  142. </style>