index.vue 7.4 KB

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