item.vue 4.8 KB

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