item.vue 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. <template>
  2. <div>
  3. <div class="position-item mb-3 job-closed elevation-2" style="position: relative;"
  4. v-for="(val, i) in props.items" :key="i" @mouseenter="val.active = true" @mouseleave="val.active = false"
  5. >
  6. <!-- 职位、企业信息 -->
  7. <div class="info-content" >
  8. <div class="job-info">
  9. <div class="job-name ellipsis" :class="{'cursor-pointer': val.job.status === '0'}" v-ellipse-tooltip>
  10. <span class="mr-3" :class="{'info-name': val.job.status === '0'}" @click.stop="handleToPositionDetails(val)">{{ formatName(val.job.name) }}</span>
  11. <span>
  12. [{{ !val.job.areaId ? '全国' : val.job.area?.str }}]
  13. </span>
  14. </div>
  15. <div class="job-other">
  16. <span v-if="!val.job.payFrom && !val.job.payTo" class="salary color-primary">面议</span>
  17. <span v-else class="salary color-primary">{{ val.job.payFrom ? val.job.payFrom + '-' : ''}}{{ val.job.payTo }}{{ val.job.payUnit ? '/' + val.job.payUnit : '' }}</span>
  18. <v-chip v-if="val.job?.expName" class="mx-3" color="primary" label size="small">{{ val.job.expName }}</v-chip>
  19. <v-chip v-if="val.job?.eduName" color="primary" label size="small">{{ val.job.eduName }}</v-chip>
  20. </div>
  21. </div>
  22. <div class="company-info ml-3" style="flex: 1;">
  23. <div style="height: 50px; width: 50px;">
  24. <v-img width="50" height="50" :src="val.enterprise.logoUrl || 'https://minio.citupro.com/dev/menduner/7.png'" rounded contain></v-img>
  25. </div>
  26. <div class="ml-3">
  27. <div class="cursor-pointer info-name" v-ellipse-tooltip @click.stop="jumpToEnterpriseDetail(val.enterprise.id)">{{ formatName(val.enterprise.anotherName || val.enterprise.name) }}</div>
  28. <div class="mt-3 ellipsis color-666 font-size-13" style="max-width: 260px;">
  29. <span v-for="(k, i) in desc" :key="k">
  30. {{ val.enterprise[k] }}
  31. <span v-if="i !== desc.length - 1 && val.enterprise[k] && val.enterprise[desc[i + 1]]" class="septal-line"></span>
  32. </span>
  33. </div>
  34. </div>
  35. </div>
  36. </div>
  37. <div class="mx-5" style="border-bottom: 1px dashed #e0e0e0"></div>
  38. <!-- 实习范围 -->
  39. <div class="d-flex justify-space-between px-5 py-3">
  40. <div class="color-666 font-size-15">
  41. <p>实习时间:{{ timesTampChange(val.entity.jobJoinDate, 'Y-M-D') }} 至 {{ timesTampChange(val.entity.internshipEndDate, 'Y-M-D') }}</p>
  42. </div>
  43. <div class="text-end" v-if="tab === 0">
  44. <v-btn size="small" color="primary" @click="handleToReport(val)">实习报告</v-btn>
  45. </div>
  46. </div>
  47. </div>
  48. </div>
  49. </template>
  50. <script setup>
  51. defineOptions({ name: 'PersonalCenterStudentInternshipCompanyItem' })
  52. import { useRouter } from 'vue-router'
  53. import { formatName } from '@/utils/getText'
  54. import { jumpToEnterpriseDetail } from '@/utils/position'
  55. import { timesTampChange } from '@/utils/date'
  56. const props = defineProps({
  57. items: {
  58. type: Array,
  59. default: () => []
  60. },
  61. tab: Number
  62. })
  63. const router = useRouter()
  64. const desc = ['industryName', 'scaleName']
  65. // 职位详情
  66. const handleToPositionDetails = (item) => {
  67. if (item.job.status === '1') return
  68. let path = `/recruit/personal/position/details/${item.job.id}`
  69. if (item.cvRel?.jobFairId) path += `?jobFairId=${item.cvRel.jobFairId}`
  70. router.push(path)
  71. }
  72. // 实习报告
  73. const handleToReport = (val) => {
  74. console.log(val, 'report')
  75. router.push(`/recruit/personal/personalCenter/student/internshipReport?id=${val.enterprise.id}`)
  76. }
  77. </script>
  78. <style scoped lang="scss">
  79. .position-item {
  80. height: 144px;
  81. background-color: #fff;
  82. border-radius: 12px;
  83. &:hover {
  84. box-shadow: 0px 3px 5px -1px var(--v-shadow-key-umbra-opacity, rgba(0, 0, 0, 0.2)), 0px 5px 8px 0px var(--v-shadow-key-penumbra-opacity, rgba(0, 0, 0, 0.14)), 0px 1px 14px 0px var(--v-shadow-key-ambient-opacity, rgba(0, 0, 0, 0.12)) !important;
  85. }
  86. .info-header {
  87. height: 48px;
  88. background: linear-gradient(90deg,#f5fcfc,#fcfbfa);
  89. border-radius: 12px;
  90. .img-box {
  91. padding: 12px 24px;
  92. .name {
  93. color: var(--color-222);
  94. font-weight: 400;
  95. font-size: 13px;
  96. .gray {
  97. color: var(--color-666);
  98. }
  99. }
  100. }
  101. .header-btn {
  102. padding: 10px 10px 0 0;
  103. float: right;
  104. .v-btn {
  105. z-index: 1;
  106. }
  107. }
  108. }
  109. .info-content {
  110. display: flex;
  111. padding: 16px 24px;
  112. justify-content: space-between;
  113. .job-info {
  114. width: 430px;
  115. min-width: 430px;
  116. max-width: 430px;
  117. font-weight: 500;
  118. font-size: 16px;
  119. .job-name {
  120. width: 100%;
  121. height: 22px;
  122. line-height: 22px;
  123. color: #0E100F;
  124. margin-bottom: 12px;
  125. }
  126. .job-other {
  127. color: var(--v-error-base);
  128. height: 22px;
  129. line-height: 22px;
  130. }
  131. }
  132. .company-info {
  133. display: flex;
  134. align-items: center
  135. }
  136. .interview-info {
  137. color: var(--color-333);
  138. font-size: 15px;
  139. }
  140. }
  141. }
  142. .info-name:hover {
  143. color: var(--v-primary-base);
  144. }
  145. </style>