entCard1.vue 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <template>
  2. <div class="content" :class="{'px-3': isMobile}" :style="{'grid-template-columns': `repeat(${isMobile ? 1 : 2}, 1fr)`}">
  3. <v-hover v-slot="{ isHovering, props }" v-for="val in list" :key="val.id">
  4. <v-card v-bind="props" :elevation="isHovering ? 10 : 5" class="cursor-pointer" @click="handleClickEnterprise(val.id)">
  5. <div class="d-flex pa-4 pb-2">
  6. <img :src="val.logoUrl || 'https://minio.citupro.com/dev/menduner/company-avatar.png'" style="width: 100px; height: 100px; border-radius: 4px;border: 1px solid #ccc;" />
  7. <div style="max-width: 445px;">
  8. <h3 v-ellipse-tooltip class="enterprise-name ml-3 font-weight-medium">{{ formatName(val.anotherName || val.name) }}</h3>
  9. <p class="font-size-15 color-999 mt-1 mb-2 ml-3">
  10. <span>{{ val.industryName }}</span>
  11. <span class="septal-line" v-if="val.industryName && val.scaleName"></span>
  12. <span>{{ val.scaleName }}</span>
  13. </p>
  14. <div class="flex-nowrap overflow-hidden pl-3" style="height: 35px;">
  15. <v-chip v-for="(welfare, index) in val.welfareList" :key="index" class="mr-2 mb-4 display-inline-block" color="primary" size="small">
  16. {{ welfare }}
  17. </v-chip>
  18. </div>
  19. </div>
  20. </div>
  21. <div class="card-bottom px-5" @click="handleClickEnterprise(val.id)">
  22. {{ val.jobCount }}个在线职位招聘中
  23. <v-icon>mdi-arrow-right-drop-circle-outline</v-icon>
  24. </div>
  25. </v-card>
  26. </v-hover>
  27. </div>
  28. </template>
  29. <script setup>
  30. defineOptions({ name: 'EntCard' })
  31. import { formatName } from '@/utils/getText'
  32. const props = defineProps({
  33. list: Array,
  34. jobFairId: String,
  35. isMobile: Boolean
  36. })
  37. const handleClickEnterprise = (id) => {
  38. window.open(`/recruit/personal/jobFair/entPosition/${props.jobFairId}?enterpriseId=${id}`)
  39. }
  40. </script>
  41. <style scoped lang="scss">
  42. .content {
  43. display: grid;
  44. gap: 24px;
  45. min-height: auto;
  46. }
  47. .card-bottom {
  48. height: 40px;
  49. line-height: 40px;
  50. text-align: end;
  51. font-size: 15px;
  52. color: var(--v-primary-base);
  53. background-color: #f5f5f5;
  54. }
  55. .v-card:hover {
  56. h3 {
  57. color: var(--v-primary-base);
  58. }
  59. }
  60. </style>