similarPositions.vue 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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="handlePosition(item)">
  5. <p class="recruit-name" :style="{'max-width': !item.payFrom && !item.payTo ? '230px' : '140px'}">{{ 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" :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">{{ item.anotherName }}</span>
  11. <span class="float-right enterprise-address">{{ !item.areaId ? '全国' : item.areaName }}</span>
  12. </div>
  13. </div>
  14. </div>
  15. </template>
  16. <script setup name="similarPositions">
  17. const props = defineProps({
  18. list: {
  19. type: Array,
  20. default: () => []
  21. },
  22. info: {
  23. type: Object,
  24. default: () => {}
  25. }
  26. })
  27. const handlePosition = (item) => {
  28. window.open(`/recruit/personal/position/details/${item.id}`)
  29. }
  30. </script>
  31. <style lang="scss" scoped>
  32. .position-box {
  33. background-color: var(--color-f3);
  34. border-radius: 8px;
  35. padding: 20px 15px;
  36. }
  37. .recruit-name {
  38. font-weight: 500;
  39. display: inline-block;
  40. vertical-align: middle;
  41. white-space: nowrap;
  42. text-overflow: ellipsis;
  43. overflow: hidden;
  44. &:hover {
  45. color: var(--v-primary-base);
  46. }
  47. }
  48. .recruit-salary {
  49. float: right;
  50. color: var(--v-error-base);
  51. font-weight: 500;
  52. height: auto;
  53. vertical-align: sub;
  54. }
  55. .enterprise {
  56. height: 40px;
  57. line-height: 30px;
  58. margin-top: 8px;
  59. }
  60. .enterprise-name {
  61. width: 150px;
  62. display: inline-block;
  63. max-width: 150px;
  64. vertical-align: middle;
  65. white-space: nowrap;
  66. text-overflow: ellipsis;
  67. overflow: hidden;
  68. color: var(--color-666);
  69. font-size: 13px;
  70. margin-left: 5px;
  71. &:hover {
  72. color: var(--v-primary-base);
  73. }
  74. }
  75. .enterprise-address {
  76. color: #555;
  77. font-size: 13px;
  78. }
  79. .more-btn {
  80. // position: absolute;
  81. // bottom: 18px;
  82. // margin-top: 20px;
  83. }
  84. </style>