item.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. <template>
  2. <div class="d-flex">
  3. <div class="position-box">
  4. <div class="sub-li" v-for="(item, index) in list" :key="index" :style="{'height': tab === 3 && item.hire ? '180px' : '140px'}">
  5. <div class="job-info" @click="handlePosition(item)" @mouseenter="item.active = true" @mouseleave="item.active = false">
  6. <div class="sub-li-top">
  7. <div class="sub-li-info">
  8. <p :class="['name', {'default-active': item.active }]">{{ item.name }}</p>
  9. <svg-icon v-if="tab === 3 && item.hire" name="pin" size="30"></svg-icon>
  10. </div>
  11. <p v-if="!item.payFrom && !item.payTo" class="salary">面议</p>
  12. <p v-else class="salary">{{ item.payFrom ? item.payFrom + '-' : '' }}{{ item.payTo }}{{ item.payName ? '/' + item.payName : '' }}</p>
  13. </div>
  14. <div class="d-flex justify-space-between align-center">
  15. <div>
  16. <span v-for="(j, i) in desc" :key="i" class="font-size-13" style="color: #808080;">
  17. <span v-if="item[j.value]" class="mr-1 d-inline-block">{{ item[j.value] }}</span>
  18. <span v-if="i !== desc.length - 1 && item[j.value] && item[desc[i + 1].value]" class="septal-line ml-1"></span>
  19. </span>
  20. </div>
  21. </div>
  22. <div class="ellipsis" style="height: 24px;overflow: hidden;">
  23. <span v-for="(j, i) in item.tagList" :key="i" class="mr-3 tags" style="color: #345768;">{{ j }}</span>
  24. </div>
  25. <div v-if="tab === 3 && item.hire" class="text-end mt-3">
  26. <v-chip v-if="item.hirePrice" size="small" label color="primary">赏金:{{ commissionCalculation(item.hirePrice, 1) }}元</v-chip>
  27. <v-chip v-if="item.hirePoint" size="small" label class="ml-1" color="primary">积分:{{ commissionCalculation(item.hirePoint, 1) }}点</v-chip>
  28. </div>
  29. </div>
  30. <div class="sub-li-bottom" @click="handleEnterprise(item)">
  31. <div class="user-info">
  32. <div class="d-flex align-center">
  33. <v-avatar size="35">
  34. <v-img :src="item.logoUrl || 'https://minio.citupro.com/dev/menduner/company-avatar.png'" />
  35. </v-avatar>
  36. <span class="names ml-2 font-size-14">{{ item.anotherName }}</span>
  37. </div>
  38. <p class="float-right color-999 font-size-13">
  39. <span>{{ item.industryName }}</span>
  40. <span class="septal-line" v-if="item.industryName && item.scaleName"></span>
  41. <span>{{ item.scaleName }}</span>
  42. </p>
  43. </div>
  44. </div>
  45. </div>
  46. </div>
  47. <!-- 滚动提现数据 -->
  48. <div class="pa-3 white-bgc" :style="{height:height}" style="flex: 1; border-radius: 5px; margin: 0 12px 12px 0;">
  49. <bountyDisplay></bountyDisplay>
  50. </div>
  51. </div>
  52. </template>
  53. <script setup>
  54. import bountyDisplay from '@/views/publicRecruitment/components/bountyDisplay.vue'
  55. defineOptions({ name: 'position-card-item' })
  56. import { ref, watch } from 'vue'
  57. import { commissionCalculation } from '@/utils/position'
  58. const props = defineProps({
  59. items: {
  60. type: Array,
  61. default: () => []
  62. },
  63. tab: {
  64. type: Number,
  65. default: 1
  66. }
  67. })
  68. const list = ref([])
  69. watch(
  70. () => props.items,
  71. (newVal) => {
  72. list.value = newVal
  73. },
  74. { immediate: true },
  75. { deep: true }
  76. )
  77. const desc = [
  78. { mdi: 'mdi-map-marker-outline', value: 'areaName' },
  79. { mdi: 'mdi-school-outline', value: 'eduName' },
  80. { mdi: 'mdi-clock-time-ten-outline', value: 'expName' }
  81. ]
  82. const emits = defineEmits(['position', 'enterprise'])
  83. const handlePosition = (item) => {
  84. emits('position', item)
  85. }
  86. const handleEnterprise = (item) => {
  87. emits('enterprise', item)
  88. }
  89. const height = ((210 * 2) + 12) + 'px'
  90. </script>
  91. <style lang="scss" scoped>
  92. .position-box {
  93. display: flex;
  94. flex-wrap: wrap;
  95. width: 66.66%;
  96. height: 100%;
  97. }
  98. .sub-li {
  99. position: relative;
  100. width: calc((100% - 24px) / 2);
  101. min-width: calc((100% - 24px) / 2);
  102. max-width: calc((100% - 24px) / 2);
  103. margin: 0 12px 12px 0;
  104. border-radius: 12px;
  105. padding: 0;
  106. overflow: hidden;
  107. cursor: pointer;
  108. transition: all .2s linear;
  109. background-color: #fff;
  110. &:nth-child(2n) {
  111. margin-right: 0;
  112. }
  113. &:hover {
  114. box-shadow: 0 16px 40px 0 rgba(153, 153, 153, .3);
  115. }
  116. }
  117. .job-info {
  118. position: relative;
  119. padding: 16px 20px;
  120. }
  121. .recommend {
  122. position: absolute;
  123. left: 0;
  124. top: 0;
  125. }
  126. .sub-li-top {
  127. display: flex;
  128. width: 100%;
  129. align-items: center;
  130. }
  131. .sub-li-info {
  132. display: flex;
  133. align-items: center;
  134. flex-wrap: wrap;
  135. height: 31%;
  136. overflow: hidden;
  137. flex: 1;
  138. }
  139. .salary {
  140. font-size: 16px;
  141. font-weight: 700;
  142. color: #CEC149;
  143. line-height: 22px;
  144. flex: none;
  145. }
  146. .tags {
  147. font-size: 12px;
  148. color: #666;
  149. display: inline-block;
  150. }
  151. .job-text {
  152. white-space: normal;
  153. padding-right: 0;
  154. height: 22px;
  155. line-height: 22px;
  156. overflow: hidden;
  157. word-break: break-all;
  158. max-width: none;
  159. }
  160. .sub-li-info .name {
  161. position: relative;
  162. max-width: 140px;
  163. margin-right: 8px;
  164. overflow: hidden;
  165. text-overflow: ellipsis;
  166. white-space: nowrap;
  167. font-weight: 600;
  168. color: #345768;
  169. &:hover {
  170. color: var(--v-primary-base);
  171. }
  172. }
  173. .sub-li-bottom {
  174. position: absolute;
  175. width: 100%;
  176. height: 54px;
  177. bottom: 1px;
  178. left: 0;
  179. margin-top: 10px;
  180. padding-top: 0;
  181. display: block;
  182. border: none;
  183. }
  184. .user-info {
  185. display: flex;
  186. padding: 12px 20px;
  187. align-items: center;
  188. justify-content: space-between;
  189. }
  190. .names {
  191. font-weight: 500;
  192. color: #404040;
  193. &:hover {
  194. color: var(--v-primary-base);
  195. }
  196. }
  197. </style>