index.vue 4.7 KB

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