index.vue 5.6 KB

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