index.vue 6.2 KB

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