hotPromoted.vue 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. <template>
  2. <div class="hot-box">
  3. <div class="sub-li" v-for="(item, index) in list" :key="index">
  4. <div v-if="item">
  5. <!-- 公司信息 -->
  6. <div class="company-info-top align-center" @click="handleClickEnterprise(item)">
  7. <div class="float-left">
  8. <v-img :src="item?.enterprise.logoUrl || 'https://minio.citupro.com/dev/menduner/company-avatar.png'" alt="" width="77" height="77" style="border-radius: 4px;"/>
  9. </div>
  10. <div class="company-info cursor-pointer">
  11. <h3>{{ item.enterprise.anotherName }}</h3>
  12. <p>
  13. {{ item?.enterprise.financingName }}
  14. <span class="septal-line" v-if="item.enterprise.financingName && item.enterprise.scaleName"></span>
  15. {{ item?.enterprise.scaleName }}
  16. <span class="septal-line" v-if="item.enterprise.industryName"></span>
  17. {{ item?.enterprise.industryName }}
  18. </p>
  19. </div>
  20. </div>
  21. <div v-if="item.enterprise?.welfareList && item.enterprise.welfareList.length" class="px-5 py-1 ellipsis" style="border-bottom: 1px solid #EBEBEB;">
  22. <span class="welfareTag mr-5" v-for="(k, i) in item.enterprise.welfareList" :key="i">{{ k }}</span>
  23. </div>
  24. <!-- 职位列表 -->
  25. <ul class="company-job-list">
  26. <li class="company-job-item" v-for="(k, i) in item.jobList" :key="i" :class="{'company-job-item-hover': k.active}" @mouseenter="k.active = true" @mouseleave="k.active = false" @click="handleClickPosition(k)">
  27. <div class="job-info" @mouseenter="k.active = true" @mouseleave="k.active = false" @click="handleClickPosition(k)">
  28. <div class="mb-2 d-flex">
  29. <p :class="['name', 'cursor-pointer', {'default-active': k.active }]">{{ k.name }}</p>
  30. <span class="salary">{{ k.payFrom }}-{{ k.payTo }}/{{ k.payName }}</span>
  31. </div>
  32. <div style="height: 24px; overflow: hidden; color: #808080;">
  33. <span v-for="(j, index) in desc" :key="index">
  34. <span v-if="k[j.value]" class="mr-1 font-size-13">{{ k[j.value] }}</span>
  35. <span v-if="k[j.value] && index !== desc.length - 1" class="septal-line ml-1"></span>
  36. </span>
  37. <span class="font-size-13 float-right">{{ timesTampChange(k.updateTime, 'Y-M-D') }}</span>
  38. </div>
  39. </div>
  40. </li>
  41. </ul>
  42. <div class="moreBtn d-flex align-center justify-center" @click="handleMoreEnterprise(item)" @mouseenter="item.active = true" @mouseleave="item.active = false">
  43. <span :style="{'text-decoration': item.active ? 'underline' : 'none'}">{{ $t('position.moreBtn') }}</span>
  44. <v-icon>mdi-menu-right</v-icon>
  45. </div>
  46. </div>
  47. </div>
  48. </div>
  49. </template>
  50. <script setup name="hotPromoted">
  51. import { ref, watch } from 'vue'
  52. import { timesTampChange } from '@/utils/date'
  53. const props = defineProps({
  54. items: {
  55. type: Array,
  56. default: () => []
  57. }
  58. })
  59. const list = ref([])
  60. watch(
  61. () => props.items,
  62. (newVal) => {
  63. list.value = newVal
  64. },
  65. { immediate: true },
  66. { deep: true }
  67. )
  68. const desc = [
  69. { value: 'areaName' },
  70. { value: 'eduName' },
  71. { value: 'expName' }
  72. ]
  73. // 职位详情
  74. const handleClickPosition = (k) => {
  75. window.open(`/recruit/personal/position/details/${k.id}`)
  76. }
  77. // 企业详情
  78. const handleClickEnterprise = (item) => {
  79. window.open(`/recruit/personal/company/details/${item.enterprise.id}?key=briefIntroduction`)
  80. }
  81. // 查看更多职位
  82. const handleMoreEnterprise = (item) => {
  83. if (!item.enterprise.id) return
  84. window.open(`/recruit/personal/company/details/${item.enterprise.id}?key=recruitmentPositions`)
  85. }
  86. </script>
  87. <style lang="scss" scoped>
  88. .hot-box {
  89. display: flex;
  90. flex-wrap: wrap;
  91. }
  92. .sub-li {
  93. position: relative;
  94. width: calc((100% - 24px) / 3);
  95. min-width: calc((100% - 24px) / 3);
  96. max-width: calc((100% - 24px) / 3);
  97. margin: 0 12px 12px 0;
  98. height: 450px;
  99. border-radius: 12px;
  100. padding: 0;
  101. overflow: hidden;
  102. transition: all .2s linear;
  103. background-color: #fff;
  104. box-shadow: 0 2px 20px 0 rgba(37, 39, 48, .2);
  105. &:nth-child(3n) {
  106. margin-right: 0;
  107. }
  108. }
  109. .company-info {
  110. float: left;
  111. margin-left: 16px;
  112. width: 282px;
  113. }
  114. .company-info-top {
  115. display: flex;
  116. height: 110px;
  117. padding: 16px 20px;
  118. overflow: hidden;
  119. border-bottom: 1px solid #EBEBEB;
  120. }
  121. .welfareTag {
  122. color: #CEC149;
  123. font-size: 13px;
  124. }
  125. .company-info h3 {
  126. height: 22px;
  127. font-size: 18px;
  128. font-weight: 700;
  129. color: #404040;
  130. line-height: 22px;
  131. margin: 0 0 4px 0;
  132. padding: 0;
  133. max-width: 100%;
  134. overflow: hidden;
  135. white-space: nowrap;
  136. text-overflow: ellipsis;
  137. &:hover {
  138. color: var(--v-primary-base);
  139. }
  140. }
  141. .company-info p {
  142. height: 18px;
  143. font-size: 13px;
  144. font-weight: 400;
  145. color: var(--color-999);
  146. line-height: 18px;
  147. }
  148. .company-job-list {
  149. padding: 4px 20px 12px;
  150. }
  151. ul li {
  152. list-style: none
  153. }
  154. .company-job-item {
  155. display: block;
  156. height: auto;
  157. padding: 12px 0;
  158. margin: 0;
  159. &-hover {
  160. background-color: #f8f8f8;
  161. }
  162. }
  163. .salary {
  164. font-size: 16px;
  165. float: right;
  166. font-weight: 700;
  167. color: #CEC149;
  168. line-height: 22px;
  169. max-width: none;
  170. text-align: right;
  171. flex: 1;
  172. }
  173. .name {
  174. position: relative;
  175. max-width: 200px;
  176. line-height: 22px;
  177. font-weight: 700;
  178. color: #404040;
  179. margin-right: 8px;
  180. overflow: hidden;
  181. text-overflow: ellipsis;
  182. white-space: nowrap;
  183. transition: all linear .2s;
  184. }
  185. .moreBtn {
  186. position: absolute;
  187. width: 100%;
  188. bottom: 0;
  189. height: 47px;
  190. color: #fff;
  191. cursor: pointer;
  192. font-size: 14px;
  193. background: linear-gradient(to right, #12ebb0, #427daa);
  194. }
  195. </style>