hotPromoted.vue 4.5 KB

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