index.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <template>
  2. <view>
  3. <uni-segmented-control :current="current" :values="controlList" @clickItem="handleChange" styleType="text" activeColor="#00897B"></uni-segmented-control>
  4. <scroll-view class="scrollBox" scroll-y="true" @scrolltolower="loadingMore" style="height: calc(100vh - 36px);">
  5. <view v-if="items.length">
  6. <uni-card v-for="(item,index) in items" :key="index" :is-shadow="true" :border='false' shadow="0px 0px 3px 1px rgba(0,0,0,0.1)" >
  7. <view>
  8. <view class="mar">
  9. <span style="font-size: 16px;font-weight: 700;color: black;">{{ item.job.name }}</span>
  10. <span class="mar" v-if="item.job.hire">
  11. <uni-icons type="fire-filled" size="25" color="#ff770d"></uni-icons>
  12. </span>
  13. <span class="salary-text">{{ item.job.payTo }}-{{ item.job.payFrom }}/{{ item.job.payName }}</span>
  14. </view>
  15. <view style="font-size: 13px;">
  16. <span class="tag-gap">
  17. <span>{{ item.job.areaName }}</span>
  18. <span class="viewider">|</span>
  19. <span>{{ item.job.eduName }}</span>
  20. <span class="viewider">|</span>
  21. <span>{{ item.job.expName }}</span>
  22. </span>
  23. </view>
  24. <view class="mar">
  25. <view style="margin:10px 0px;font-size:13px;" class="f-horizon">
  26. <span style="display: flex;">
  27. <image class="r-avatar" :src="item.enterprise.logoUrl || ''" style="width: 50px; height: 50px;"></image>
  28. <span class="ml" style="width:50vw;">
  29. <view style="width:50vw;font-weight: bold;">{{ item.enterprise.name }} </view>
  30. <view class="dis">
  31. <view class="show-more" :style="{'width': item.enterprise.industryName == '' ? '14vw' : '28vw'}">{{!!item.enterprise.industryName ? item.enterprise.industryName : '行业未知'}}</view>
  32. <span class="divider ss-m-10"> | </span>
  33. <span>{{ !!item.enterprise.scaleName ? item.enterprise.scaleName : '规模未知' }}</span>
  34. </view>
  35. </span>
  36. </span>
  37. </view>
  38. </view>
  39. <view v-if="current === 4">
  40. <view>拒绝原因: {{ item.refuseMsg }}</view>
  41. </view>
  42. </view>
  43. <view v-if="item.status == '0'">
  44. <view class="divided-line"></view>
  45. <view style="display: flex;justify-content: flex-end;">
  46. <span style="color: #dd524d;text-decoration: underline;">拒绝</span>
  47. <span style="color: #2991de;margin-left: 65rpx;text-decoration: underline;">同意</span>
  48. </view>
  49. </view>
  50. </uni-card>
  51. <uni-load-more :status="more" />
  52. </view>
  53. <view v-else class="nodata-img-parent">
  54. <image src="https://minio.citupro.com/dev/static/nodata.png" mode="widthFix" style="width: 100vw;height: 100vh;"></image>
  55. </view>
  56. </scroll-view>
  57. </view>
  58. </template>
  59. <script setup>
  60. import { ref } from 'vue'
  61. import { getJobDeliveryList, getUserInterviewInvitePage } from '@/api/user'
  62. import { dealDictObjData } from '@/utils/position'
  63. const current = ref(0)
  64. const controlList = ['已投递', '待接受', '待面试', '已完成', '已拒绝']
  65. const statusList = [0, 1, 3, 98]
  66. const more = ref('more')
  67. const items = ref([])
  68. const queryParams = ref({
  69. pageNo: 1,
  70. pageSize: 10
  71. })
  72. const getList = async () => {
  73. const api = current.value === 0 ? getJobDeliveryList : getUserInterviewInvitePage
  74. if (current.value !== 0) queryParams.value.status = statusList[current.value - 1]
  75. const { data } = await api(queryParams.value)
  76. const list = data?.list || []
  77. if (list?.length) {
  78. list.forEach(e => {
  79. e.job = { ...e.job, ...dealDictObjData({}, e.job) }
  80. e.enterprise = { ...e.enterprise, ...dealDictObjData({}, e.enterprise)}
  81. })
  82. items.value = items.value.concat(list)
  83. }
  84. more.value = list?.length < queryParams.value.pageSize ? 'noMore' : 'more'
  85. }
  86. getList()
  87. const handleChange = (e) => {
  88. queryParams.value.pageNo = 1
  89. current.value = e.currentIndex
  90. getList()
  91. }
  92. const loadingMore = () => {
  93. more.value = 'loading'
  94. queryParams.value.pageNo++
  95. getList()
  96. }
  97. </script>
  98. <style scoped lang="scss">
  99. </style>