index.vue 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  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">{{ formatName(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': !item.job?.payFrom && !item.job?.payTo ? '78%' : '56%'}">
  18. <span class="tag-gap" style="color: #808080;">
  19. <span>{{item.job?.area?.str ?? '全国' }}</span>
  20. <span class="divider-mx" v-if="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">{{ formatName(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. import { formatName } from '@/utils/getText'
  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. const url = `/pagesB/positionDetail/index?id=${item.job?.id}&area=${item.job.areaName}`
  88. uni.navigateTo({ url })
  89. }
  90. </script>
  91. <style scoped lang="scss">
  92. .noMore{
  93. margin: 20px 0;
  94. }
  95. .date-time{
  96. color:#d9d0d2;
  97. float: right;
  98. }
  99. .divided-line {
  100. width: 100%;
  101. height: 1px;
  102. background-color: #f0f2f7;
  103. margin: 20px 0;
  104. }
  105. .enterAvatar{
  106. width: 40px;
  107. height: 40px;
  108. // border-radius: 50%;
  109. margin: auto;
  110. }
  111. .job-name {
  112. font-size: 16px;
  113. font-weight: 700;
  114. color: #345768;
  115. max-width: 80vw;
  116. overflow: hidden;
  117. white-space: nowrap;
  118. text-overflow: ellipsis;
  119. }
  120. .sub-li-bottom {
  121. display: flex;
  122. align-items: center;
  123. background-color: #fff;
  124. font-size: 13px;
  125. padding: 5px;
  126. border-radius: 0 0 12px 12px;
  127. .avatarBox {
  128. max-width: 40px;
  129. max-height: 40px;
  130. }
  131. }
  132. .salary-text {
  133. float: right;
  134. color: #CEC149;
  135. font-weight: 700;
  136. }
  137. .list-shape {
  138. padding: 10px 30rpx 10px;
  139. background-color: #fff;
  140. border-radius: 12px 12px 0 0;
  141. .titleBox {
  142. display: flex;
  143. align-items: center;
  144. justify-content: space-between;
  145. }
  146. }
  147. .tag-gap{
  148. margin: 10rpx 10rpx 10rpx 0;
  149. }
  150. .tag-gap1{
  151. margin-bottom: 20px;
  152. }
  153. .divider-mx{
  154. margin: 0 10rpx;
  155. }
  156. .divider {
  157. color:#e4d4d2;
  158. }
  159. //公司名称
  160. .cer-end{
  161. position: absolute;
  162. top: 85%;
  163. right: 16%;
  164. }
  165. .cer-text{
  166. text-decoration: underline;
  167. margin: 0 5rpx;
  168. }
  169. //一行展示不全...
  170. .dis{
  171. display: flex;
  172. align-items: center;
  173. }
  174. .show-more{
  175. width: 26vw;
  176. white-space: nowrap;
  177. overflow: hidden;
  178. text-overflow: ellipsis;
  179. }
  180. .mList {
  181. margin-bottom: 20rpx;
  182. }
  183. /* 列表触底暂无更多 */
  184. .noMore{ text-align:center; color:grey; }
  185. .mt { margin-top: 15rpx; }
  186. .mb { margin-bottom: 10rpx; }
  187. .ml { margin-left: 20rpx; }
  188. .mr { margin-right: 20rpx; }
  189. .mr-10{ margin-right: 10rpx; }
  190. .my-5{ margin: 5px 0; }
  191. .disable {
  192. position: relative;
  193. overflow: hidden;
  194. &::after {
  195. content: '已失效';
  196. position: absolute;
  197. display: flex;
  198. align-items: center;
  199. justify-content: center;
  200. font-size: 1.2em;
  201. font-weight: bold;
  202. color: #fc796f;
  203. top: 0;
  204. border-radius: 12px;
  205. left: 0;
  206. width: 100%;
  207. height: 100%;
  208. background-color: rgba(255, 255, 255, 0.75);
  209. }
  210. }
  211. </style>