index.vue 5.1 KB

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