index.vue 7.7 KB

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