longStrip.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. <template>
  2. <div>
  3. <div class="position-item mb-3 job-closed" v-for="(val, i) in props.items" :key="i" @mouseenter="val.active = true" @mouseleave="val.active = false">
  4. <div class="info-header">
  5. <div v-if="val.active" class="header-btn">
  6. <!-- <v-btn class="half-button" color="primary" size="small">继续沟通</v-btn> -->
  7. <v-btn v-if="props.showCancelBtn" class="half-button ml-3" color="primary" size="small" @click="handleCancel(val)">取消感兴趣</v-btn>
  8. </div>
  9. <div class="img-box">
  10. <v-avatar :image="val.contact.avatar || 'https://minio.citupro.com/dev/menduner/7.png'" size="x-small"></v-avatar>
  11. <span class="name">
  12. <span class="mx-3">{{ val.contact.name }}</span>
  13. <span class="gray">{{ val.contact.postNameCn }}</span>
  14. </span>
  15. </div>
  16. </div>
  17. <div class="info-content">
  18. <div class="job-info">
  19. <div class="job-name cursor-pointer">
  20. <span class="mr-3 info-name">{{ val.job.name }}</span>
  21. <span>[{{ val.job.areaName }}]</span>
  22. </div>
  23. <div class="job-other">
  24. <span class="salary">{{ val.job.payFrom }}-{{ val.job.payTo }}/{{ val.job.payName }}</span>
  25. <v-chip class="mx-3" color="primary" label size="small">{{ val.job.expName }}</v-chip>
  26. <v-chip color="primary" label size="small">{{ val.job.eduName }}</v-chip>
  27. </div>
  28. </div>
  29. <div class="company-info">
  30. <v-img width="50" height="50" :src="val.enterprise.logoUrl || 'https://minio.citupro.com/dev/menduner/7.png'"></v-img>
  31. <div class="ml-3">
  32. <div class="cursor-pointer info-name">{{ val.enterprise.name }}</div>
  33. <div class="mt-3">
  34. <v-chip color="primary" label size="small" class="mr-3" v-for="k in desc" :key="k">{{ val.enterprise[k] }}</v-chip>
  35. </div>
  36. </div>
  37. </div>
  38. </div>
  39. </div>
  40. </div>
  41. </template>
  42. <script setup>
  43. defineOptions({ name: 'longStrip'})
  44. import { getPersonJobUnfavorite } from '@/api/position'
  45. import { useI18n } from '@/hooks/web/useI18n'
  46. import Snackbar from '@/plugins/snackbar'
  47. const emits = defineEmits(['refresh'])
  48. const { t } = useI18n()
  49. const props = defineProps({
  50. items: {
  51. type: Array,
  52. default: () => []
  53. },
  54. showCancelBtn: {
  55. type: Boolean,
  56. default: false
  57. }
  58. })
  59. const desc = ['industryName', 'financingName', 'scaleName']
  60. const handleCancel = async (item) => {
  61. if (!item.job.id) return Snackbar.warning(t('sys.api.operationFailed'))
  62. await getPersonJobUnfavorite(item.job.id)
  63. emits('refresh')
  64. Snackbar.success(t('common.operationSuccessful'))
  65. }
  66. </script>
  67. <style scoped lang="scss">
  68. .position-item {
  69. height: 144px;
  70. background-color: #fff;
  71. border-radius: 12px;
  72. &:hover {
  73. box-shadow: 0 16px 40px 0 rgba(153, 153, 153, .3);
  74. }
  75. .info-header {
  76. height: 48px;
  77. background: linear-gradient(90deg,#f5fcfc,#fcfbfa);
  78. border-radius: 12px;
  79. .img-box {
  80. padding: 12px 24px;
  81. .name {
  82. color: var(--color-222);
  83. font-weight: 400;
  84. font-size: 13px;
  85. .gray {
  86. color: var(--color-666);
  87. }
  88. }
  89. }
  90. .header-btn {
  91. padding: 10px 10px 0 0;
  92. float: right;
  93. .v-btn {
  94. z-index: 1;
  95. }
  96. }
  97. }
  98. .info-content {
  99. display: flex;
  100. padding: 16px 24px;
  101. justify-content: space-between;
  102. .job-info {
  103. width: 430px;
  104. min-width: 430px;
  105. max-width: 430px;
  106. font-weight: 500;
  107. font-size: 16px;
  108. .job-name {
  109. height: 22px;
  110. line-height: 22px;
  111. color: var(--color-222);
  112. margin-bottom: 12px;
  113. }
  114. .job-other {
  115. color: var(--v-error-base);
  116. height: 22px;
  117. line-height: 22px;
  118. }
  119. }
  120. .company-info {
  121. display: flex;
  122. align-items: center
  123. }
  124. .interview-info {
  125. color: var(--color-333);
  126. font-size: 15px;
  127. }
  128. }
  129. }
  130. .info-name:hover {
  131. color: var(--v-primary-base);
  132. }
  133. </style>