index.vue 5.0 KB

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