item.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <template>
  2. <view v-if="list.length > 0">
  3. <view v-for="(item, index) in list" :key="index" class="list-item list-item-bgc default-border">
  4. <view class="sub-li-bottom" @click.stop="jumpToEnterpriseDetail(item.enterprise?.id)">
  5. <view class="avatarBox">
  6. <image class="enterAvatar" :src="item.enterprise?.logoUrl || 'https://minio.citupro.com/dev/menduner/company-avatar.png'"></image>
  7. </view>
  8. <view>
  9. <span class="ss-m-x-20 color-666 MiSans-Medium">{{ item.contact?.name || ' -- ' }}</span>
  10. <span class="MiSans-Normal ss-m-r-10">{{ item.contact?.postNameCn }}</span>
  11. <span class="ss-m-r-10 MiSans-Normal">{{ item.invitePhone }}</span>
  12. </view>
  13. </view>
  14. <!-- 职位信息 -->
  15. <view class="list-shape ss-m-t-30">
  16. <view class="titleBox" @click="toDetail(item)">
  17. <span class="MiSans-Semibold" style="font-size: 16px;font-weight: 700; color: #0E100F;">{{ formatName(item.job?.name) }}</span>
  18. <span v-if="!item.job?.payFrom && !item.job?.payTo" class="salary-text MiSans-Semibold">面议</span>
  19. <span v-else class="salary-text MiSans-Semibold">{{ item.job?.payFrom }}-{{ item.job?.payTo }}{{ item.job?.payName ? '/' + item.job?.payName : '' }}</span>
  20. </view>
  21. <!-- 面试时间、地点 -->
  22. <view class="color-666 font-size-14 ss-m-t-20" @click="toDetail(item)">
  23. <view class="MiSans-Normal">面试时间:{{ timesTampChange(item.time, 'Y-M-D h:m') }}</view>
  24. <view class="ss-m-t-20 MiSans-Normal">面试地点:{{ item.address }}</view>
  25. </view>
  26. <view v-if="item.status === '0'">
  27. <view class="ss-m-y-30" style="border-top: 1rpx solid #E1E4E9;"></view>
  28. <view style="text-align: end;">
  29. <button
  30. @tap.stop="handleAction(item, 'refuse')"
  31. type="danger"
  32. size="mini"
  33. style="color:#fff; backgroundColor:#dd524d;borderColor:#dd524d"
  34. >拒绝</button>
  35. <button
  36. @tap.stop="handleAction(item, 'agree')"
  37. type="danger"
  38. size="mini"
  39. style="color:#fff; backgroundColor:#00B760;borderColor:#00B760; margin-left: 30rpx;"
  40. >同意</button>
  41. </view>
  42. </view>
  43. </view>
  44. </view>
  45. </view>
  46. </template>
  47. <script setup>
  48. import { timesTampChange } from '@/utils/date'
  49. import { formatName } from '@/utils/getText'
  50. import { jumpToEnterpriseDetail } from '@/utils/position'
  51. const emits = defineEmits(['action'])
  52. const props = defineProps({
  53. list: { type: Array, default: () => [] }
  54. })
  55. //岗位详情
  56. const toDetail = (item) =>{
  57. uni.navigateTo({ url: `/pagesB/positionDetail/index?id=${item.job?.id}&area=${item.job.area?.str ?? '全国'}` })
  58. }
  59. const handleAction = (item, type) => {
  60. emits('action', item, type)
  61. }
  62. </script>
  63. <style scoped lang="scss">
  64. .list-item {
  65. margin: 30rpx;
  66. border-radius: 20rpx;
  67. padding: 30rpx;
  68. box-shadow: 1px 2px 12px rgba(0, 0, 0, 0.17);
  69. &:last-child {
  70. margin-bottom: 0;
  71. }
  72. }
  73. .enterAvatar{
  74. width: 40px;
  75. height: 40px;
  76. border-radius: 50%;
  77. margin: auto;
  78. }
  79. .sub-li-bottom {
  80. display: flex;
  81. align-items: center;
  82. font-size: 13px;
  83. .avatarBox {
  84. max-width: 40px;
  85. max-height: 40px;
  86. }
  87. }
  88. .salary-text {
  89. float: right;
  90. color: #00B760;
  91. font-weight: 700;
  92. }
  93. .list-shape {
  94. .titleBox {
  95. display: flex;
  96. align-items: center;
  97. justify-content: space-between;
  98. }
  99. }
  100. </style>