index.vue 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258
  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 my-5">
  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 align-center ellipsis" style="max-width: 100%;">
  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 MiSans-Normal">
  25. <span>{{item.job?.area?.str ?? '全国' }}</span>
  26. <span class="divider-mx" v-if="item.job?.eduName">|</span>
  27. <span>{{item.job?.eduName }}</span>
  28. <span class="divider-mx" v-if="item.job?.expName">|</span>
  29. <span>{{item.job?.expName }}</span>
  30. </span>
  31. </view>
  32. </view>
  33. <!-- 岗位tag -->
  34. <view class="mt" 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 ml 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="mr 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="mr 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. .noMore{
  113. margin: 20px 0;
  114. }
  115. .date-time{
  116. color:#d9d0d2;
  117. float: right;
  118. }
  119. .divided-line {
  120. width: 100%;
  121. height: 1px;
  122. background-color: #f0f2f7;
  123. margin: 20px 0;
  124. }
  125. .enterAvatar{
  126. width: 60rpx;
  127. height: 60rpx;
  128. margin: auto;
  129. }
  130. .job-name {
  131. max-width: 80vw;
  132. overflow: hidden;
  133. white-space: nowrap;
  134. text-overflow: ellipsis;
  135. font-weight: 600;
  136. font-size: 30rpx;
  137. text-align: center;
  138. font-style: normal;
  139. text-transform: none;
  140. }
  141. .sub-li-bottom {
  142. display: flex;
  143. align-items: center;
  144. font-size: 13px;
  145. padding: 5px;
  146. border-radius: 0 0 12px 12px;
  147. margin-bottom: 20rpx;
  148. .avatarBox {
  149. max-width: 40px;
  150. max-height: 40px;
  151. }
  152. }
  153. .salary-text {
  154. font-weight: bold;
  155. font-size: 24rpx;
  156. color: #00B760;
  157. text-align: center;
  158. font-style: normal;
  159. text-transform: none;
  160. }
  161. .list-shape {
  162. padding: 10px 30rpx 10px;
  163. border-radius: 12px 12px 0 0;
  164. .titleBox {
  165. display: flex;
  166. align-items: center;
  167. justify-content: space-between;
  168. }
  169. }
  170. .desc-tag {
  171. font-family: MiSans, MiSans;
  172. font-weight: 400;
  173. font-size: 24rpx;
  174. color: #666666;
  175. text-align: left;
  176. font-style: normal;
  177. text-transform: none;
  178. }
  179. .tag-gap{
  180. margin: 10rpx 10rpx 10rpx 0;
  181. }
  182. .tag-gap1{
  183. margin-bottom: 20px;
  184. }
  185. .divider-mx{
  186. margin: 0 10rpx;
  187. }
  188. .divider {
  189. color:#e4d4d2;
  190. }
  191. //公司名称
  192. .cer-end{
  193. position: absolute;
  194. top: 85%;
  195. right: 16%;
  196. }
  197. .cer-text{
  198. text-decoration: underline;
  199. margin: 0 5rpx;
  200. }
  201. //一行展示不全...
  202. .dis{
  203. display: flex;
  204. align-items: center;
  205. }
  206. .show-more{
  207. width: 26vw;
  208. white-space: nowrap;
  209. overflow: hidden;
  210. text-overflow: ellipsis;
  211. }
  212. .mList {
  213. margin-bottom: 20rpx;
  214. border-radius: 20rpx;
  215. }
  216. /* 列表触底暂无更多 */
  217. .noMore{ text-align:center; color:grey; }
  218. .mt { margin-top: 15rpx; }
  219. .mb { margin-bottom: 10rpx; }
  220. .ml { margin-left: 20rpx; }
  221. .mr { margin-right: 20rpx; }
  222. .mr-10{ margin-right: 10rpx; }
  223. .my-5{ margin: 5px 0; }
  224. .disable {
  225. position: relative;
  226. overflow: hidden;
  227. &::after {
  228. content: '已失效';
  229. position: absolute;
  230. display: flex;
  231. align-items: center;
  232. justify-content: center;
  233. font-size: 1.2em;
  234. font-weight: bold;
  235. color: #fc796f;
  236. top: 0;
  237. border-radius: 12px;
  238. left: 0;
  239. width: 100%;
  240. height: 100%;
  241. background-color: rgba(255, 255, 255, 0.75);
  242. }
  243. }
  244. </style>