companyItem.vue 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <template>
  2. <div class="company-box">
  3. <div class="sub-li" v-for="item in list" :key="item.enterprise.id">
  4. <div
  5. class="company-info-top ma-3 rounded-lg px-3 cursor-pointer" :class="item.active ? 'elevation-5' : ''"
  6. @click.stop="jumpToEnterpriseDetail(item.enterprise.id, true)" @mouseenter="item.active = true" @mouseleave="item.active = false">
  7. <div class="float-left">
  8. <v-img :src="item.enterprise.logoUrl || 'https://minio.citupro.com/dev/menduner/company-avatar.png'" contain rounded :alt="item.enterprise.anotherName" :width="50" :height="50" />
  9. </div>
  10. <div class="company-info">
  11. <h3 v-ellipse-tooltip :class="{'default-active': item.active }">{{ formatName(item.enterprise.anotherName || item.enterprise.name) }}</h3>
  12. <p>{{ item.enterprise.industryName }}</p>
  13. </div>
  14. </div>
  15. <v-divider class="mx-4"></v-divider>
  16. <v-hover v-slot="{ isHovering, props }">
  17. <div class="company-info-bottom mx-3 mt-2 rounded-lg pa-3 cursor-pointer" v-bind="props" :class="isHovering && (item?.job && Object.keys(item.job).length) ? 'elevation-5' : ''">
  18. <div v-if="item?.job && Object.keys(item.job).length" @click.stop="handleClickPosition(item.job)">
  19. <div class="mb-1 d-flex">
  20. <p
  21. v-ellipse-tooltip
  22. class="mr-3 cursor-pointer name"
  23. :style="{'max-width': !item.job.payFrom && !item.job.payTo ? '270px' : '180px', 'color': isHovering ? 'var(--v-primary-base)' : '#0E100F'}"
  24. >{{ formatName(item.job.name) }}</p>
  25. <span v-if="!item.job.payFrom && !item.job.payTo" class="salary">面议</span>
  26. <span v-else class="salary">{{ item.job.payFrom ? item.job.payFrom + '-' : '' }}{{ item.job.payTo }}{{ item.job.payName ? '/' + item.job.payName : '' }}</span>
  27. </div>
  28. <div style="height: 24px; overflow: hidden; color: #808080;">
  29. <span v-for="(j, index) in desc" :key="index">
  30. <span v-if="item.job[j] || j === 'areaName'" class="mr-1 font-size-13">
  31. {{ j === 'areaName' ? !item.job.areaId ? '全国' : item.job.area.str : item.job[j] }}
  32. </span>
  33. <span v-if="index !== desc.length - 1 && (item.job[desc[index + 1]] || j === 'areaName')" class="septal-line ml-1"></span>
  34. </span>
  35. </div>
  36. </div>
  37. </div>
  38. </v-hover>
  39. </div>
  40. </div>
  41. </template>
  42. <script setup>
  43. import { formatName } from '@/utils/getText'
  44. import { jumpToEnterpriseDetail } from '@/utils/position'
  45. defineOptions({ name: 'company-item'})
  46. defineProps({
  47. list: Array
  48. })
  49. const desc = ['areaName', 'eduName', 'expName']
  50. // 职位详情
  51. const handleClickPosition = (job) => {
  52. window.open(`/recruit/personal/position/details/${job.id}`)
  53. }
  54. </script>
  55. <style scoped lang="scss">
  56. @import url('@/styles/recruit/company.scss');
  57. </style>