similarPositions.vue 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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">{{ item.name }}</p>
  6. <span class="recruit-salary">{{ item.payFrom ? item.payFrom + '-' : '' }}{{ item.payTo }}{{ item.payName ? '/' + item.payName :'' }}</span>
  7. <div :class="['enterprise', {'border-bottom-dashed': index !== list.length - 1}]">
  8. <v-img class="float-left" :src="item.logoUrl || 'https://minio.citupro.com/dev/menduner/company-avatar.png'" :width="30" :height="30"></v-img>
  9. <span class="float-left enterprise-name">{{ item.anotherName }}</span>
  10. <span class="float-right enterprise-address">{{ item.areaName }}</span>
  11. </div>
  12. </div>
  13. <!-- <div class="text-center more-btn">
  14. <v-btn color="primary" variant="outlined" class="buttons" :to="`/recruit/personal/company/details/${props.info.enterpriseId}?key=recruitmentPositions`">{{ $t('position.allBtn') }}</v-btn>
  15. </div> -->
  16. </div>
  17. </template>
  18. <script setup name="similarPositions">
  19. const props = defineProps({
  20. list: {
  21. type: Array,
  22. default: () => []
  23. },
  24. info: {
  25. type: Object,
  26. default: () => {}
  27. }
  28. })
  29. const handlePosition = (item) => {
  30. window.open(`/recruit/personal/position/details/${item.id}`)
  31. }
  32. </script>
  33. <style lang="scss" scoped>
  34. .position-box {
  35. // position: relative;
  36. // height: 430px;
  37. background-color: var(--color-f3);
  38. border-radius: 8px;
  39. padding: 20px 15px;
  40. }
  41. .recruit-name {
  42. width: 95px;
  43. font-weight: 500;
  44. display: inline-block;
  45. max-width: 95px;
  46. vertical-align: middle;
  47. white-space: nowrap;
  48. text-overflow: ellipsis;
  49. overflow: hidden;
  50. &:hover {
  51. color: var(--v-primary-base);
  52. }
  53. }
  54. .recruit-salary {
  55. float: right;
  56. color: var(--v-error-base);
  57. font-weight: 500;
  58. height: auto;
  59. vertical-align: sub;
  60. }
  61. .enterprise {
  62. height: 40px;
  63. line-height: 30px;
  64. margin-top: 8px;
  65. }
  66. .enterprise-name {
  67. width: 120px;
  68. display: inline-block;
  69. max-width: 120px;
  70. vertical-align: middle;
  71. white-space: nowrap;
  72. text-overflow: ellipsis;
  73. overflow: hidden;
  74. color: var(--color-666);
  75. font-size: 13px;
  76. margin-left: 5px;
  77. &:hover {
  78. color: var(--v-primary-base);
  79. }
  80. }
  81. .enterprise-address {
  82. color: #555;
  83. font-size: 13px;
  84. }
  85. .more-btn {
  86. // position: absolute;
  87. // bottom: 18px;
  88. // margin-top: 20px;
  89. }
  90. </style>