index.vue 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. <template>
  2. <view class="ss-m-x-20">
  3. <!-- 岗位列表 -->
  4. <view v-if="list.length > 0" class="ss-p-b-30 ss-p-t-20">
  5. <view v-for="(item, index) in list" :key="index" class="mList default-border list-item-bgc" :class="{ 'disable': !jobFairId && item.job?.status === '1'}" @click="toDetail(item)">
  6. <!-- 职位信息 -->
  7. <view class="list-shape" :style="`border-radius: ${props.showEntInfo ? '12px 12px 0 0' : '12px'};`">
  8. <!-- 职位 -->
  9. <view class="titleBox ss-m-y-10">
  10. <view style="display: flex;align-items: center;">
  11. <view v-if="item.job?.hire" class="iconfont icon-a-1_zhaopin ss-m-r-10" style="color: #e03506; font-size: 25px;"></view>
  12. <image v-if="props.jobFairId" src="/static/svg/jobFair.svg" class=" ss-m-r-10" style="width: 20px; height: 20px;"></image>
  13. <rich-text v-if="item.job?.name?.indexOf('style') !== -1" class="job-name MiSans-Semibold default-text-color" :nodes="item.job.name"></rich-text>
  14. <view v-else class="job-name MiSans-Semibold default-text-color">{{ formatName(item.job?.name) }}</view>
  15. </view>
  16. </view>
  17. <!-- 薪酬、工作地、学历、工作经验 -->
  18. <view class="d-flex ellipsis" style="max-width: 100%; align-items: baseline;">
  19. <view class="ss-m-r-20">
  20. <span v-if="!item.job?.payFrom && !item.job?.payTo" class="salary-text MiSans-Bold">面议</span>
  21. <span v-else class="salary-text MiSans-Bold">{{ item.job?.payFrom }}-{{ item.job?.payTo }}{{ item.job?.payName ? '/' + item.job?.payName : '' }}</span>
  22. </view>
  23. <view class="font-size-13">
  24. <span class="desc-tag">
  25. <span class="MiSans-Normal">{{item.job?.area?.str ?? '全国' }}</span>
  26. <span class="divider-mx" v-if="item.job?.eduName">|</span>
  27. <span class="MiSans-Normal">{{item.job?.eduName }}</span>
  28. <span class="divider-mx" v-if="item.job?.expName">|</span>
  29. <span class="MiSans-Normal">{{item.job?.expName }}</span>
  30. </span>
  31. </view>
  32. </view>
  33. <!-- 岗位tag -->
  34. <view class="ss-m-t-15" v-if="showWelfareTag">
  35. <uni-tag
  36. v-for="(tag,i) in item.job?.tagList || []"
  37. :key="i"
  38. class="tag-gap MiSans-Normal"
  39. :text="tag"
  40. inverted="false"
  41. size="mini"
  42. custom-style="background-color: #ececec;color:#666;border-color:#ececec;display: inline-block;"
  43. />
  44. </view>
  45. <view style="text-align: end;" v-if="item.job?.hire">
  46. <uni-tag
  47. class="ss-m-l-10"
  48. v-if="item?.job?.hirePrice && item?.job?.hirePrice > 0"
  49. :text="`赏金:${commissionCalculation(item.job.hirePrice / 100, 1)}元`"
  50. inverted="false"
  51. size="default"
  52. custom-style="background-color: #e2f0ef; color:#666; border-color:#e2f0ef;"
  53. />
  54. </view>
  55. <view
  56. v-if="props.showUpdateTime"
  57. class="font-size-13 color-666 ss-m-t-20 MiSans-Normal d-flex align-center"
  58. >
  59. <image src="/static/img/clock.png" class="ss-m-r-20" style="width: 15px; height: 15px;"></image>
  60. 更新时间:{{ timesTampChange(item?.job?.refreshTime || item.job?.updateTime, 'Y-M-D h:m') }}
  61. </view>
  62. </view>
  63. <!-- 企业信息 -->
  64. <view v-if="props.showEntInfo" class="sub-li-bottom" @tap="handleClickEnt(item)">
  65. <view class="avatarBox">
  66. <image class="enterAvatar ss-m-l-20 default-border default-radius" :src="item.enterprise?.logoUrl || 'https://minio.citupro.com/dev/menduner/company-avatar.png'"></image>
  67. </view>
  68. <view class="ss-m-l-35">
  69. <view class="ss-m-r-20 MiSans-Normal default-text-color">{{ formatName(item.enterprise?.anotherName || item.enterprise.name) }}</view>
  70. <span class="color-666 MiSans-Normal ss-m-r-10">{{ item.enterprise?.industryName || '' }}</span>
  71. <span class="ss-m-r-20 color-666 MiSans-Normal">{{ item.enterprise?.scaleName || '' }}</span>
  72. </view>
  73. </view>
  74. </view>
  75. <view v-if="props.noMore" class="noMore">暂无更多数据</view>
  76. </view>
  77. <view v-else>
  78. <image src="https://minio.citupro.com/dev/static/nodata.png" mode="widthFix" style="width: 100vw;height: 100vh;"></image>
  79. <view style="color: gray; text-align: center;">暂无数据</view>
  80. </view>
  81. </view>
  82. </template>
  83. <script setup>
  84. import { commissionCalculation } from '@/utils/position'
  85. import { timesTampChange } from '@/utils/date'
  86. import { formatName } from '@/utils/getText'
  87. const emit = defineEmits(['entClick'])
  88. const props = defineProps({
  89. list: { type: Array, default: () => [] },
  90. jobFairId: { type: [String, Number], default: '' }, // 招聘会id
  91. showEntInfo: { type: Boolean, default: true },
  92. showUpdateTime: { type: Boolean, default: true },
  93. noMore: { type: Boolean, default: false },
  94. showWelfareTag: { type: Boolean, default: true }
  95. })
  96. //岗位详情
  97. const toDetail = (item) =>{
  98. if (!item?.job?.id) return
  99. let url = `/pagesB/positionDetail/index?id=${item.job.id}&area=${item.job.areaName}`
  100. if (props.jobFairId) url += `&jobFairId=${props.jobFairId}`
  101. uni.navigateTo({ url })
  102. }
  103. const handleClickEnt = (item) => {
  104. const info = {
  105. enterpriseId: item?.enterprise?.id || null,
  106. anotherName: item?.enterprise?.anotherName || null
  107. }
  108. emit('entClick', info)
  109. }
  110. </script>
  111. <style scoped lang="scss">
  112. .enterAvatar{
  113. width: 60rpx;
  114. height: 60rpx;
  115. margin: auto;
  116. }
  117. .job-name {
  118. max-width: 80vw;
  119. overflow: hidden;
  120. white-space: nowrap;
  121. text-overflow: ellipsis;
  122. font-weight: 600;
  123. font-size: 30rpx;
  124. text-align: center;
  125. font-style: normal;
  126. text-transform: none;
  127. }
  128. .sub-li-bottom {
  129. display: flex;
  130. align-items: center;
  131. font-size: 13px;
  132. padding: 5px;
  133. border-radius: 0 0 12px 12px;
  134. margin-bottom: 20rpx;
  135. .avatarBox {
  136. max-width: 40px;
  137. max-height: 40px;
  138. }
  139. }
  140. .salary-text {
  141. font-size: 24rpx;
  142. color: #00B760;
  143. font-style: normal;
  144. text-transform: none;
  145. }
  146. .list-shape {
  147. padding: 10px 30rpx 10px;
  148. border-radius: 12px 12px 0 0;
  149. .titleBox {
  150. display: flex;
  151. align-items: center;
  152. justify-content: space-between;
  153. }
  154. }
  155. .desc-tag {
  156. font-size: 24rpx;
  157. color: #666666;
  158. font-style: normal;
  159. text-transform: none;
  160. }
  161. .tag-gap{
  162. margin: 10rpx 10rpx 10rpx 0;
  163. }
  164. .divider-mx{
  165. margin: 0 10rpx;
  166. }
  167. .mList {
  168. margin-bottom: 20rpx;
  169. border-radius: 20rpx;
  170. box-shadow: 1px 2px 12px rgba(0, 0, 0, 0.17);
  171. }
  172. /* 列表触底暂无更多 */
  173. .noMore{ text-align:center; color:grey;margin: 20px 0; }
  174. .disable {
  175. position: relative;
  176. overflow: hidden;
  177. &::after {
  178. content: '已失效';
  179. position: absolute;
  180. display: flex;
  181. align-items: center;
  182. justify-content: center;
  183. font-size: 1.2em;
  184. font-weight: bold;
  185. color: #fc796f;
  186. top: 0;
  187. border-radius: 12px;
  188. left: 0;
  189. width: 100%;
  190. height: 100%;
  191. background-color: rgba(255, 255, 255, 0.75);
  192. }
  193. }
  194. </style>