item.vue 5.3 KB

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