jobItem.vue 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. <template>
  2. <view>
  3. <view v-if="list?.length" class="ss-p-b-30 ss-p-t-20 ss-p-x-30">
  4. <view v-for="(item, index) in list" :key="index" class="mList">
  5. <view v-if="item?.enterpriseName" class="d-flex align-center item-top">
  6. <view class="avatarBox">
  7. <image class="enterAvatar default-border default-radius" :src="item.enterpriseLogo || 'https://minio.citupro.com/dev/menduner/company-avatar.png'"></image>
  8. </view>
  9. <view class="ss-m-l-20 label-text">{{ formatName(item?.enterpriseName) }} - {{ item?.hrName }}</view>
  10. </view>
  11. <view class="list-shape">
  12. <view @tap.stop="handleToDetail(item)">
  13. <view class="titleBox">
  14. <view style="display: flex;align-items: center;">
  15. <image src="/static/svg/jobFair.svg" class=" ss-m-r-10" style="width: 20px; height: 20px;"></image>
  16. <rich-text v-if="item.name?.indexOf('style') !== -1" class="job-name" :nodes="item.name"></rich-text>
  17. <view v-else class="job-name">{{ formatName(item.name) }}</view>
  18. </view>
  19. </view>
  20. <view class="d-flex align-center justify-space-between ss-m-t-20">
  21. <view class="font-size-13 ellipsis" style="flex: 1;">
  22. <span class="tag-gap" style="color: #808080;">
  23. <span>{{item.area?.str ?? '全国' }}</span>
  24. <span class="divider-mx" v-if="item.eduName">|</span>
  25. <span>{{item.eduName }}</span>
  26. <span class="divider-mx" v-if="item.expName">|</span>
  27. <span>{{item.expName }}</span>
  28. <span class="divider-mx">|</span>
  29. <span>{{!item.payFrom && !item.payTo ? '面议' : `${item.payFrom}-${item.payTo}${item.payName ? '/' + item.payName : ''}` }}</span>
  30. </span>
  31. </view>
  32. </view>
  33. </view>
  34. <view class="sub-li-bottom ss-m-t-20">
  35. <view class="sub-li-bottom-item color-primary" @tap.stop="handleToResume(item)">{{ item.count || 0 }} 已投递简历</view>
  36. <view class="sub-li-bottom-item color-error" @tap.stop="handleRemove(item)">移出招聘会</view>
  37. </view>
  38. </view>
  39. </view>
  40. </view>
  41. <uni-popup ref="removePopup" type="dialog">
  42. <uni-popup-dialog
  43. type="warn"
  44. cancelText="取消"
  45. confirmText="确定"
  46. title="系统提示"
  47. content="是否确认将此职位移出招聘会?"
  48. @confirm="handleRemoveConfirm"
  49. @close="handleRemoveClose"
  50. ></uni-popup-dialog>
  51. </uni-popup>
  52. </view>
  53. </template>
  54. <script setup>
  55. import { ref } from 'vue'
  56. import { formatName } from '@/utils/getText'
  57. import { quitJobFairPosition } from '@/api/jobFair'
  58. const emit = defineEmits(['refresh'])
  59. const props = defineProps({
  60. list: Array,
  61. jobFairId: [String, Number],
  62. jobFairName: String
  63. })
  64. // 查看职位详情
  65. const handleToDetail = (val) => {
  66. uni.navigateTo({
  67. url: `/pagesB/positionDetail/index?jobId=${val.id}&jobFairId=${props.jobFairId}&isEdit=${val.edit}`
  68. })
  69. }
  70. // 查看职位投递简历
  71. const handleToResume = (val) => {
  72. uni.navigateTo({
  73. url: `/pagesA/resume/index?jobId=${val.id}&jobName=${formatName(val.name)}&jobFairId=${props.jobFairId}&jobFairName=${props.jobFairName}`
  74. })
  75. }
  76. // 移出招聘会
  77. const removePopup = ref()
  78. const removeParams = ref({})
  79. const handleRemove = (val) => {
  80. removeParams.value = val
  81. removePopup.value.open()
  82. }
  83. const handleRemoveClose = () => {
  84. removeParams.value = {}
  85. removePopup.value.close()
  86. }
  87. const handleRemoveConfirm = async () => {
  88. if (!removeParams.value.id || !props.jobFairId) {
  89. uni.showToast({ title: '正在维护中,请稍后再试', icon: 'none', duration: 2000 })
  90. return
  91. }
  92. uni.showLoading({ title: '加载中' })
  93. try {
  94. await quitJobFairPosition({ jobFairId: props.jobFairId, jobId: removeParams.value.id })
  95. uni.hideLoading()
  96. uni.showToast({ title: '移出成功', icon: 'none' })
  97. removeParams.value = {}
  98. emit('refresh')
  99. } catch {
  100. removeParams.value = {}
  101. uni.hideLoading()
  102. }
  103. }
  104. </script>
  105. <style scoped lang="scss">
  106. .enterAvatar{
  107. width: 60rpx;
  108. height: 60rpx;
  109. margin: auto;
  110. }
  111. .avatarBox {
  112. max-width: 60rpx;
  113. max-height: 60rpx;
  114. }
  115. .item-top {
  116. padding: 20rpx 30rpx;
  117. background: linear-gradient(90deg,#f5fcfc,#fcfbfa);
  118. border-radius: 12px 12px 0 0;
  119. font-size: 28rpx;
  120. color: #0E100F;
  121. .label-text {
  122. max-width: 100%;
  123. text-overflow: ellipsis;
  124. white-space: nowrap;
  125. overflow: hidden;
  126. }
  127. }
  128. .job-name {
  129. font-size: 16px;
  130. font-weight: 700;
  131. color: #0E100F;
  132. max-width: 80vw;
  133. overflow: hidden;
  134. white-space: nowrap;
  135. text-overflow: ellipsis;
  136. }
  137. .sub-li-bottom {
  138. display: flex;
  139. justify-content: space-between;
  140. margin-top: 10px;
  141. font-size: 13px;
  142. color: #666;
  143. &-item {
  144. width: 50%;
  145. height: 35px;
  146. line-height: 35px;
  147. text-align: center;
  148. margin-right: 15px;
  149. background-color: #f7f8fa;
  150. border-radius: 4px;
  151. &:nth-child(2) {
  152. margin-right: 0;
  153. }
  154. }
  155. }
  156. .salary-text {
  157. float: right;
  158. color: #00B760;
  159. font-weight: 700;
  160. }
  161. .list-shape {
  162. background-color: #fff;
  163. border-radius: 0 0 12px 12px;
  164. padding: 30rpx;
  165. .titleBox {
  166. display: flex;
  167. align-items: center;
  168. justify-content: space-between;
  169. }
  170. }
  171. .tag-gap{
  172. margin: 10rpx 10rpx 10rpx 0;
  173. }
  174. .divider-mx{
  175. margin: 0 10rpx;
  176. }
  177. .divider {
  178. color:#e4d4d2;
  179. }
  180. .mList {
  181. margin-bottom: 20rpx;
  182. position: relative;
  183. box-shadow: 1px 2px 12px rgba(0, 0, 0, 0.17);
  184. }
  185. </style>