similarPositions.vue 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <template>
  2. <div class="position-box">
  3. <h4 class="mb-3">{{ $t('position.similarPosition') }}</h4>
  4. <div v-for="(item, index) in props.list" :key="index" class="mb-2 cursor-pointer" @click.stop="handlePosition(item)">
  5. <p class="recruit-name" v-ellipse-tooltip :style="{'max-width': !item.payFrom && !item.payTo ? '230px' : '140px'}">{{ formatName(item.name) }}</p>
  6. <span v-if="!item.payFrom && !item.payTo" class="recruit-salary">面议</span>
  7. <span v-else class="recruit-salary">{{ item.payFrom ? item.payFrom + '-' : '' }}{{ item.payTo }}{{ item.payName ? '/' + item.payName :'' }}</span>
  8. <div :class="['enterprise', {'border-bottom-dashed': index !== list.length - 1}]">
  9. <v-img class="float-left entLogoImg" :src="item.logoUrl || 'https://minio.citupro.com/dev/menduner/company-avatar.png'" :width="30" :height="30"></v-img>
  10. <span class="float-left enterprise-name" v-ellipse-tooltip>{{ formatName(item.anotherName || item.enterpriseName) }}</span>
  11. <span class="float-right enterprise-address">{{ !item.areaId ? '全国' : item.area?.str }}</span>
  12. </div>
  13. </div>
  14. </div>
  15. </template>
  16. <script setup name="similarPositions">
  17. import { formatName } from '@/utils/getText'
  18. const props = defineProps({
  19. list: {
  20. type: Array,
  21. default: () => []
  22. },
  23. info: {
  24. type: Object,
  25. default: () => {}
  26. }
  27. })
  28. const handlePosition = (item) => {
  29. window.open(`/recruit/personal/position/details/${item.id}`)
  30. }
  31. </script>
  32. <style lang="scss" scoped>
  33. .position-box {
  34. background-color: var(--color-f3);
  35. border-radius: 8px;
  36. padding: 20px 15px;
  37. }
  38. .recruit-name {
  39. font-weight: 500;
  40. display: inline-block;
  41. vertical-align: middle;
  42. color: #0E100F;
  43. &:hover {
  44. color: var(--v-primary-base);
  45. }
  46. }
  47. .recruit-salary {
  48. float: right;
  49. color: var(--v-primary-base);
  50. font-weight: 500;
  51. height: auto;
  52. vertical-align: sub;
  53. }
  54. .enterprise {
  55. height: 40px;
  56. line-height: 30px;
  57. margin-top: 8px;
  58. }
  59. .enterprise-name {
  60. width: 150px;
  61. display: inline-block;
  62. max-width: 150px;
  63. vertical-align: middle;
  64. color: var(--color-666);
  65. font-size: 13px;
  66. margin-left: 5px;
  67. &:hover {
  68. color: var(--v-primary-base);
  69. }
  70. }
  71. .enterprise-address {
  72. color: #555;
  73. font-size: 13px;
  74. }
  75. </style>