similarPositions.vue 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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 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.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. width: 95px;
  39. font-weight: 500;
  40. display: inline-block;
  41. max-width: 95px;
  42. vertical-align: middle;
  43. white-space: nowrap;
  44. text-overflow: ellipsis;
  45. overflow: hidden;
  46. &:hover {
  47. color: var(--v-primary-base);
  48. }
  49. }
  50. .recruit-salary {
  51. float: right;
  52. color: var(--v-error-base);
  53. font-weight: 500;
  54. height: auto;
  55. vertical-align: sub;
  56. }
  57. .enterprise {
  58. height: 40px;
  59. line-height: 30px;
  60. margin-top: 8px;
  61. }
  62. .enterprise-name {
  63. width: 120px;
  64. display: inline-block;
  65. max-width: 120px;
  66. vertical-align: middle;
  67. white-space: nowrap;
  68. text-overflow: ellipsis;
  69. overflow: hidden;
  70. color: var(--color-666);
  71. font-size: 13px;
  72. margin-left: 5px;
  73. &:hover {
  74. color: var(--v-primary-base);
  75. }
  76. }
  77. .enterprise-address {
  78. color: #555;
  79. font-size: 13px;
  80. }
  81. .more-btn {
  82. // position: absolute;
  83. // bottom: 18px;
  84. // margin-top: 20px;
  85. }
  86. </style>