hotPromoted.vue 4.4 KB

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