index.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  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 class="d-flex align-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 style="font-size: 16px;font-weight: 700;color: black;">{{item.job?.name}}</view>
  11. <template v-if="item.job?.hire">
  12. <uni-tag
  13. class="ss-m-l-10"
  14. v-if="item?.job?.hirePrice && item?.job?.hirePrice > 0"
  15. :text="`赏金:${commissionCalculation(item.job.hirePrice, 1)}元`"
  16. inverted="false"
  17. size="mini"
  18. custom-style="background-color: #e2f0ef;color:#00897B;border-color:#e2f0ef;"
  19. />
  20. </template>
  21. </view>
  22. <span class="salary-text">{{ item.job?.payFrom }}-{{ item.job?.payTo }}/{{ item.job?.payName }}</span>
  23. </view>
  24. <!-- 工作地 -->
  25. <view style="font-size: 13px;" class="mt">
  26. <span class="tag-gap">
  27. <span>{{item.job?.areaName }}</span>
  28. <span class="divider-mx" v-if="item.job?.areaName && item.job?.jobName">|</span>
  29. <span>{{item.job?.eduName }}</span>
  30. <span class="divider-mx" v-if="item.job?.expName">|</span>
  31. <span>{{item.job?.expName }}</span>
  32. </span>
  33. </view>
  34. <!-- 岗位tag -->
  35. <view class="mt" v-if="showWelfareTag">
  36. <uni-tag
  37. v-for="(tag,i) in item.enterprise?.welfareList || []"
  38. :key="i"
  39. class="tag-gap"
  40. :text="tag"
  41. inverted="false"
  42. size="mini"
  43. custom-style="background-color: #eef1f7;color:#7f828b;border-color:#eef1f7;"
  44. />
  45. </view>
  46. </view>
  47. <!-- 企业信息 -->
  48. <view class=sub-li-bottom>
  49. <view>
  50. <!-- 企业简称 -->
  51. <span
  52. class="mr"
  53. style="font-weight: bold;"
  54. @click.stop="toDetail(0, item)"
  55. >
  56. {{ item.enterprise?.anotherName || ' -- ' }}
  57. </span>
  58. <span>{{ item.enterprise?.industryName || '行业未知' }}</span>
  59. <span class="divider tag-gap1"> | </span>
  60. <span class="mr">{{ item.enterprise?.scaleName || '规模未知' }}</span>
  61. </view>
  62. <view class="avatarBox" @click.stop="toDetail(0, item)">
  63. <image class="enterAvatar ml" :src="item.enterprise?.logoUrl || 'https://minio.citupro.com/dev/menduner/company-avatar.png'"></image>
  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. .sub-li-bottom {
  108. display: flex;
  109. justify-content:space-between;
  110. align-items: center;
  111. background: linear-gradient(90deg, #f5fcfc 0, #fcfbfa 100%);
  112. font-size: 13px;
  113. padding: 5px 30rpx;
  114. .avatarBox {
  115. max-width: 40px;
  116. max-height: 40px;
  117. }
  118. }
  119. .salary-text {
  120. float: right;
  121. color: #fe574a;
  122. }
  123. .list-shape {
  124. padding: 10px 30rpx 10px;
  125. margin-top: 10px;
  126. background-color: #fff;
  127. .titleBox {
  128. display: flex;
  129. align-items: center;
  130. justify-content: space-between;
  131. }
  132. }
  133. .tag-gap{
  134. margin: 10rpx 10rpx 10rpx 0;
  135. }
  136. .tag-gap1{
  137. margin-bottom: 20px;
  138. }
  139. .divider-mx{
  140. margin: 0 10rpx;
  141. }
  142. .divider {
  143. color:#e4d4d2;
  144. }
  145. //公司名称
  146. .cer-end{
  147. position: absolute;
  148. top: 85%;
  149. right: 16%;
  150. }
  151. .cer-text{
  152. text-decoration: underline;
  153. margin: 0 5rpx;
  154. }
  155. //一行展示不全...
  156. .dis{
  157. display: flex;
  158. align-items: center;
  159. }
  160. .show-more{
  161. width: 26vw;
  162. white-space: nowrap;
  163. overflow: hidden;
  164. text-overflow: ellipsis;
  165. }
  166. /* 列表触底暂无更多 */
  167. .noMore{ text-align:center; color:grey; }
  168. .mt { margin-top: 10rpx; }
  169. .mb { margin-bottom: 10rpx; }
  170. .ml { margin-left: 20rpx; }
  171. .mr { margin-right: 20rpx; }
  172. .mr-10{ margin-right: 10rpx; }
  173. .my-5{ margin: 5px 0; }
  174. </style>