index.vue 6.4 KB

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