index.vue 4.9 KB

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