details.vue 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. <template>
  2. <div>
  3. <div class="banner px-6">
  4. <div class="banner-title">
  5. <h1 class="ellipsis">{{ info.name }}</h1>
  6. <span class="salary">{{ info.payFrom }}-{{ info.payTo }}/{{ info.payName }}</span>
  7. <span class="refresh-time">{{ timesTampChange(info.updateTime) }} {{ $t('common.refresh') }} <v-icon color="warning" size="20">mdi-alert-outline</v-icon></span>
  8. </div>
  9. <div class="banner-tags mt-4">
  10. <span v-for="k in desc" :key="k.mdi" class="mr-10">
  11. <v-icon color="#666" size="20">{{ k.mdi }}</v-icon>
  12. <span class="ml-1">{{ info[k.value] }}</span>
  13. </span>
  14. </div>
  15. <div class="banner-tools my-4">
  16. <v-chip size="small" label v-for="(k, i) in info.tagList" :key="i" class="mr-1" color="primary">{{ k }}</v-chip>
  17. </div>
  18. <div class="d-flex justify-end mb-5">
  19. <div class="banner-tools-btns">
  20. <v-btn class="button-item radius" color="primary" variant="outlined" @click="handleEdit">{{ $t('common.edit') }}</v-btn>
  21. </div>
  22. </div>
  23. <v-divider></v-divider>
  24. <div class="d-flex">
  25. <div class="content-left">
  26. <div v-if="Object.keys(info).length">
  27. <div>{{ $t('position.jobResponsibilities') }}:</div>
  28. <div class="requirement" v-html="info.content.replace(/\n/g, '</br>')"></div>
  29. <div class="mt-3">{{ $t('position.jobRequirements') }}:</div>
  30. <div class="requirement" v-html="info.requirement.replace(/\n/g, '</br>')"></div>
  31. </div>
  32. <v-divider class="my-3"></v-divider>
  33. <div class="contact" v-if="Object.keys(info).length">
  34. <div class="float-left d-flex align-center">
  35. <v-img :src="info.contact.avatar || 'https://minio.citupro.com/dev/menduner/7.png'" :width="45" style="height: 45px;"></v-img>
  36. <div class="ml-2">
  37. <div class="contact-name">{{ info.contact.name }}</div>
  38. <div class="contact-info">{{ info.enterprise.name }} · {{ info.contact.postNameCn }}</div>
  39. </div>
  40. </div>
  41. <div class="float-right">
  42. <v-chip color="primary" label>{{ $t('position.currentOnline') }}</v-chip>
  43. </div>
  44. </div>
  45. <v-divider class="my-3"></v-divider>
  46. <div>
  47. <h4>{{ $t('position.address') }}</h4>
  48. <div class="mt-2">
  49. <v-icon size="25" color="primary">mdi-map-marker</v-icon>
  50. <span style="color: #666;font-size: 15px;">{{ info.address }}</span>
  51. </div>
  52. </div>
  53. <v-divider class="my-3"></v-divider>
  54. <div v-if="enterprise && Object.keys(enterprise).length">
  55. <h4>企业信息</h4>
  56. <div class="mt-3">
  57. <v-img class="float-left mr-5" :src="enterprise.logoUrl || 'https://minio.citupro.com/dev/menduner/company-avatar.png'" :width="60" height="60"></v-img>
  58. <div>
  59. <div class="contact-name">{{ enterprise.name }}</div>
  60. <div class="contact-info">{{ enterprise.financingName }} | {{ enterprise.industryName }} | {{ enterprise.scaleName }}</div>
  61. </div>
  62. </div>
  63. <div class="mt-5">
  64. <v-chip v-for="(k, i) in enterprise.welfareList" :key="i" label color="primary" class="mr-2" size="small">{{ k }}</v-chip>
  65. </div>
  66. </div>
  67. </div>
  68. </div>
  69. </div>
  70. </div>
  71. </template>
  72. <script setup>
  73. defineOptions({ name: 'position-details' })
  74. import { ref } from 'vue'
  75. import { useRouter } from 'vue-router'
  76. import { timesTampChange } from '@/utils/date'
  77. import { getJobDetails } from '@/api/position'
  78. import { dealDictObjData } from '@/views/recruit/position/components/dict'
  79. const router = useRouter()
  80. const { id } = router.currentRoute.value.params
  81. // 职位详情
  82. const info = ref({})
  83. const enterprise = ref({})
  84. const getPositionDetail = async () => {
  85. const data = await getJobDetails({ id })
  86. if (!data || !Object.keys(data).length) return
  87. enterprise.value = { ...dealDictObjData({}, data.enterprise), ...data.enterprise }
  88. info.value = { ...data, ...dealDictObjData({}, data) }
  89. }
  90. 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. { mdi: 'mdi-file-tree-outline', value: 'positionName' }
  96. ]
  97. const handleEdit = () => {
  98. if (!enterprise.value.id) return
  99. window.open(`/enterprise/position/edit?id=${enterprise.value.id}`)
  100. }
  101. </script>
  102. <style lang="scss" scoped>
  103. .banner {
  104. background-color: #fff;
  105. padding: 18px 0 20px;
  106. }
  107. .banner-title {
  108. line-height: 40px;
  109. font-size: 28px;
  110. font-weight: 600;
  111. }
  112. .banner-title h1 {
  113. display: inline-block;
  114. color: #37576c;
  115. font-size: 28px;
  116. margin-right: 30px;
  117. margin-top: 1px;
  118. max-width: 360px;
  119. vertical-align: middle;
  120. }
  121. .button-item {
  122. min-width: 110px;
  123. height: 36px
  124. }
  125. .salary {
  126. color: var(--v-error-base);
  127. line-height: 41px;
  128. font-weight: 600;
  129. height: auto;
  130. display: inline-block;
  131. vertical-align: sub;
  132. }
  133. .refresh-time {
  134. float: right;
  135. color: #666;
  136. font-size: 14px;
  137. line-height: 66px;
  138. vertical-align: sub;
  139. }
  140. .banner-tags span {
  141. font-weight: 600;
  142. }
  143. .radius {
  144. border-radius: 8px;
  145. }
  146. .content-left {
  147. width: 100%;
  148. padding: 20px 20px;
  149. }
  150. .content-right {
  151. flex: 1;
  152. padding: 20px 20px 20px 0;
  153. }
  154. .label-text {
  155. color: #7f7a7a;
  156. font-weight: 600;
  157. }
  158. .value-text {
  159. color: #000;
  160. font-weight: 400;
  161. }
  162. .requirement {
  163. white-space: pre-wrap;
  164. word-break: break-all;
  165. line-height: 28px;
  166. color: #333;
  167. font-size: 15px;
  168. text-align: justify;
  169. letter-spacing: 0;
  170. }
  171. .contact {
  172. height: 60px;
  173. line-height: 60px;
  174. }
  175. .contact-name {
  176. font-size: 20px;
  177. font-weight: 500;
  178. color: #222;
  179. line-height: 28px;
  180. }
  181. .contact-info {
  182. font-size: 15px;
  183. color: #666;
  184. line-height: 21px;
  185. margin-top: 8px;
  186. }
  187. </style>