item.vue 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. <!-- 搜索页面的职位详情-长条 -->
  2. <template>
  3. <v-card class="positionItem" v-for="(item, index) in list" :key="index" @mouseenter="item.active = true" @mouseleave="item.active = false">
  4. <div class="position-and-company">
  5. <!-- 职位 -->
  6. <div class="position" @mouseenter="item.positionActive = true" @mouseleave="item.positionActive = false" @click="handlePosition(item)">
  7. <div class="d-flex">
  8. <p :class="['title1', {'default-active': item.positionActive }]">{{ item.job.name }}{{ item.job.pos ? ' [' + item.job.pos + '] ' : '' }}</p>
  9. <p class="salary ml-1">{{ item.job.payFrom }}-{{ item.job.payTo }}/{{ item.job.payName }}</p>
  10. </div>
  11. <div class="mt-2">
  12. <v-chip size="x-small" label v-for="(j, i) in desc" :key="i" class="mr-1" color="#666" :prepend-icon="j.mdi">{{ item.job[j.value] }}</v-chip>
  13. </div>
  14. </div>
  15. <!-- 公司 -->
  16. <div class="company" @click="handleEnterprise(item)">
  17. <div class="float-left">
  18. <v-img :src="item.enterprise.logoUrl" :alt="item.enterprise.anotherName" :width="40" style="height: 40px;border-radius: 4px;"/>
  19. </div>
  20. <div class="company-info">
  21. <v-hover>
  22. <template v-slot:default="{ isHovering, props }">
  23. <h3 v-bind="props" :class="{'default-active': isHovering }" class="title1">{{ item.enterprise.anotherName }}</h3>
  24. </template>
  25. </v-hover>
  26. <p class="mt-2">{{ item.enterprise.financingName }}<span class="mx-2">|</span>{{ item.enterprise.scaleName }}<span class="mx-2">|</span>{{ item.enterprise.industryName }}</p>
  27. </div>
  28. </div>
  29. </div>
  30. <!-- 底部 -->
  31. <div class="footer">
  32. <div class="footer-left">
  33. <template v-for="(jobTag, jobTagsIndex) in item.job.tagList" :key="jobTagsIndex">
  34. <span class="textColor666 mx-1" v-if="jobTagsIndex">|</span>
  35. <span class="textColor666 dis">{{ jobTag }}</span>
  36. </template>
  37. </div>
  38. <div class="footer-right">
  39. <v-avatar size="x-small" :image="item.contact.avatar"></v-avatar>
  40. <span class="mx-2 textColor666">{{ item.contact.name }} | {{ item.contact.postNameCn }}</span>
  41. <v-chip color="primary" label size="x-small">当前在线</v-chip>
  42. </div>
  43. </div>
  44. </v-card>
  45. </template>
  46. <script setup>
  47. defineOptions({ name: 'long-strip-position-card-item' })
  48. import { ref, watch } from 'vue'
  49. const props = defineProps({
  50. items: {
  51. type: Object,
  52. default: () => ({ data: [], total: 0 })
  53. }
  54. })
  55. const list = ref([])
  56. watch(
  57. () => props.items,
  58. (newVal) => {
  59. list.value = newVal
  60. },
  61. { immediate: true },
  62. { deep: true }
  63. )
  64. const desc = [
  65. { mdi: 'mdi-map-marker-outline', value: 'areaName' },
  66. { mdi: 'mdi-school-outline', value: 'eduName' },
  67. { mdi: 'mdi-clock-time-ten-outline', value: 'expName' }
  68. ]
  69. const handlePosition = (item) => {
  70. window.open(`/recruit/position/details/${item.job.positionId}`)
  71. }
  72. const handleEnterprise = (item) => {
  73. window.open(`/enterprise/details/${item.enterprise.enterpriseId}?key=briefIntroduction`)
  74. }
  75. </script>
  76. <style lang="scss" scoped>
  77. .title1 {
  78. position: relative;
  79. max-width: 200px;
  80. margin-right: 8px;
  81. overflow: hidden;
  82. text-overflow: ellipsis;
  83. white-space: nowrap;
  84. font-size: 16px;
  85. font-weight: 600;
  86. &:hover {
  87. color: var(--v-primary-base);
  88. }
  89. }
  90. .company {
  91. flex: 1;
  92. display: flex;
  93. justify-content: end;
  94. }
  95. .company-info {
  96. float: left;
  97. margin-left: 16px;
  98. // width: 282px;
  99. }
  100. .company-info p {
  101. height: 18px;
  102. font-size: 13px;
  103. font-weight: 400;
  104. color: #999;
  105. }
  106. .textColor666 { color: #666; }
  107. .positionItem {
  108. width: 884px;
  109. margin-bottom: 12px;
  110. border-radius: 12px;
  111. padding: 0;
  112. overflow: hidden;
  113. cursor: pointer;
  114. transition: all .2s linear;
  115. background-color: #fff;
  116. &:hover {
  117. box-shadow: 0 16px 40px 0 rgba(153, 153, 153, .3);
  118. }
  119. .position-and-company {
  120. display: flex;
  121. padding: 16px 20px;
  122. width: 100%;
  123. .position {
  124. width: 484px;
  125. padding-right: 12px;
  126. }
  127. }
  128. .footer {
  129. height: 48px;
  130. line-height: 48px;
  131. padding: 0px 20px;
  132. font-size: 14px;
  133. background: linear-gradient(90deg, #f5fcfc 0, #fcfbfa 100%);
  134. display: flex;
  135. .footer-left {
  136. width: 440px;
  137. padding-right: 12px;
  138. }
  139. .footer-right {
  140. flex: 1;
  141. text-align: right;
  142. }
  143. div {
  144. overflow: hidden;
  145. text-overflow: ellipsis;
  146. white-space: nowrap;
  147. }
  148. }
  149. .ellipsisStyle {
  150. overflow: hidden;
  151. text-overflow: ellipsis;
  152. white-space: nowrap;
  153. }
  154. }
  155. .salary {
  156. font-size: 16px;
  157. font-weight: 700;
  158. color: #fe574a;
  159. line-height: 22px;
  160. flex: none;
  161. }
  162. </style>