index.vue 6.0 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'}">
  5. <!-- 职位信息 -->
  6. <view class="list-shape" @click="toDetail(1, item)">
  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. <span v-if="!item.job?.payFrom && !item.job?.payTo" class="salary-text">面议</span>
  15. <span v-else class="salary-text">{{ item.job?.payFrom }}-{{ item.job?.payTo }}{{ item.job?.payName ? '/' + item.job?.payName : '' }}</span>
  16. </view>
  17. <!-- 工作地 -->
  18. <view style="font-size: 13px;" class="mt">
  19. <span class="tag-gap" style="color: #808080;">
  20. <span>{{item.job?.areaName }}</span>
  21. <span class="divider-mx" v-if="item.job?.areaName && item.job?.eduName">|</span>
  22. <span>{{item.job?.eduName }}</span>
  23. <span class="divider-mx" v-if="item.job?.expName">|</span>
  24. <span>{{item.job?.expName }}</span>
  25. </span>
  26. </view>
  27. <!-- 岗位tag -->
  28. <view class="mt" v-if="showWelfareTag">
  29. <uni-tag
  30. v-for="(tag,i) in item.enterprise?.welfareList || []"
  31. :key="i"
  32. class="tag-gap"
  33. :text="tag"
  34. inverted="false"
  35. size="mini"
  36. custom-style="background-color: #ececec;color:#666;border-color:#ececec;display: inline-block;"
  37. />
  38. </view>
  39. <view style="text-align: end;" v-if="item.job?.hire">
  40. <uni-tag
  41. class="ss-m-l-10"
  42. v-if="item?.job?.hirePrice && item?.job?.hirePrice > 0"
  43. :text="`赏金:${commissionCalculation(item.job.hirePrice, 1)}元`"
  44. inverted="false"
  45. size="default"
  46. custom-style="background-color: #e2f0ef; color:#00897B; border-color:#e2f0ef;"
  47. />
  48. </view>
  49. </view>
  50. <!-- 企业信息 -->
  51. <view class="sub-li-bottom">
  52. <view class="avatarBox" @click="toDetail(0, item)">
  53. <image class="enterAvatar ml" :src="item.enterprise?.logoUrl || 'https://minio.citupro.com/dev/menduner/company-avatar.png'"></image>
  54. </view>
  55. <view class="ss-m-l-35">
  56. <!-- 企业简称 -->
  57. <span
  58. class="mr"
  59. @click="toDetail(0, item)"
  60. >
  61. {{ item.enterprise?.anotherName || ' -- ' }}
  62. </span>
  63. <span class="color-999">{{ item.enterprise?.industryName || '行业未知' }}</span>
  64. <span class="divider tag-gap1"> | </span>
  65. <span class="mr color-999">{{ item.enterprise?.scaleName || '规模未知' }}</span>
  66. </view>
  67. </view>
  68. </view>
  69. <view v-if="props.noMore" class="noMore">暂无更多数据</view>
  70. </view>
  71. <view v-else>
  72. <image src="https://minio.citupro.com/dev/static/nodata.png" mode="widthFix" style="width: 100vw;height: 100vh;"></image>
  73. <view style="color: gray; text-align: center;">暂无数据</view>
  74. </view>
  75. </view>
  76. </template>
  77. <script setup>
  78. import { commissionCalculation } from '@/utils/position'
  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 = (isPosition, item) =>{
  86. const url = isPosition
  87. ? `/pagesB/positionDetail/index?id=${item.job?.id}`
  88. : `/pagesB/companyDetail/index?id=${item.enterprise?.id}`
  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: #345768;
  116. max-width: 50vw;
  117. overflow: hidden;
  118. white-space: nowrap;
  119. text-overflow: ellipsis;
  120. }
  121. .sub-li-bottom {
  122. display: flex;
  123. align-items: center;
  124. background-color: #fff;
  125. font-size: 13px;
  126. padding: 5px;
  127. border-radius: 0 0 12px 12px;
  128. .avatarBox {
  129. max-width: 40px;
  130. max-height: 40px;
  131. }
  132. }
  133. .salary-text {
  134. float: right;
  135. color: #CEC149;
  136. font-weight: 700;
  137. }
  138. .list-shape {
  139. padding: 10px 30rpx 10px;
  140. background-color: #fff;
  141. border-radius: 12px 12px 0 0;
  142. .titleBox {
  143. display: flex;
  144. align-items: center;
  145. justify-content: space-between;
  146. }
  147. }
  148. .tag-gap{
  149. margin: 10rpx 10rpx 10rpx 0;
  150. }
  151. .tag-gap1{
  152. margin-bottom: 20px;
  153. }
  154. .divider-mx{
  155. margin: 0 10rpx;
  156. }
  157. .divider {
  158. color:#e4d4d2;
  159. }
  160. //公司名称
  161. .cer-end{
  162. position: absolute;
  163. top: 85%;
  164. right: 16%;
  165. }
  166. .cer-text{
  167. text-decoration: underline;
  168. margin: 0 5rpx;
  169. }
  170. //一行展示不全...
  171. .dis{
  172. display: flex;
  173. align-items: center;
  174. }
  175. .show-more{
  176. width: 26vw;
  177. white-space: nowrap;
  178. overflow: hidden;
  179. text-overflow: ellipsis;
  180. }
  181. .mList {
  182. margin-bottom: 20rpx;
  183. }
  184. /* 列表触底暂无更多 */
  185. .noMore{ text-align:center; color:grey; }
  186. .mt { margin-top: 15rpx; }
  187. .mb { margin-bottom: 10rpx; }
  188. .ml { margin-left: 20rpx; }
  189. .mr { margin-right: 20rpx; }
  190. .mr-10{ margin-right: 10rpx; }
  191. .my-5{ margin: 5px 0; }
  192. .disable {
  193. position: relative;
  194. overflow: hidden;
  195. &::after {
  196. content: '已失效';
  197. position: absolute;
  198. display: flex;
  199. align-items: center;
  200. justify-content: center;
  201. font-size: 1.2em;
  202. font-weight: bold;
  203. color: #fc796f;
  204. top: 0;
  205. border-radius: 12px;
  206. left: 0;
  207. width: 100%;
  208. height: 100%;
  209. background-color: rgba(255, 255, 255, 0.75);
  210. }
  211. }
  212. </style>