hotPromoted.vue 5.8 KB

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