index.vue 6.3 KB

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