index.vue 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <template>
  2. <div class="default-width">
  3. <div style="background-color: #fff; position: sticky;">
  4. <buttons :current="0"></buttons>
  5. </div>
  6. <div class="d-flex recommend-content">
  7. <div class="mt-3">
  8. <PositionList v-if="items.length" :items="items"></PositionList>
  9. </div>
  10. <div style="flex: 1;" class="ml-3">right-details</div>
  11. </div>
  12. </div>
  13. </template>
  14. <script setup>
  15. defineOptions({ name: 'personalPositionRecommend'})
  16. import buttons from '@/views/recruit/personal/components/buttons.vue'
  17. import { ref, reactive } from 'vue'
  18. import { getJobAdvertisedSearch } from '@/api/position'
  19. import { dealDictObjData } from '@/utils/position'
  20. import PositionList from './components/item'
  21. const query = reactive({
  22. pageNum: 1,
  23. pageSize: 10
  24. })
  25. const items = ref([])
  26. const getData = async () => {
  27. const { list } = await getJobAdvertisedSearch(query)
  28. if (!list.length) return
  29. items.value = list.map(e => {
  30. e.job = { ...e.job, ...dealDictObjData({}, e.job) }
  31. e.enterprise = { ...e.enterprise, ...dealDictObjData({}, e.enterprise) }
  32. return e
  33. })
  34. if (items.value.length) {
  35. items.value[0].active = true
  36. }
  37. }
  38. getData()
  39. </script>
  40. <style scoped lang="scss">
  41. .recommend-content {
  42. height: calc(100vh - 100px);
  43. overflow-y: auto;
  44. }
  45. ::-webkit-scrollbar {
  46. width: 0;
  47. height: 0;
  48. }
  49. </style>