| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258 | <template>  <view class="ss-m-x-20">    <!-- 岗位列表 -->    <view v-if="list.length > 0" class="ss-p-b-30 ss-p-t-20">      <view v-for="(item, index) in list" :key="index" class="mList default-border list-item-bgc" :class="{ 'disable': !jobFairId && item.job?.status === '1'}" @click="toDetail(item)">        <!-- 职位信息 -->        <view class="list-shape" :style="`border-radius: ${props.showEntInfo ? '12px 12px 0 0' : '12px'};`">          <!-- 职位 -->          <view class="titleBox my-5">            <view style="display: flex;align-items: center;">              <view v-if="item.job?.hire" class="iconfont icon-a-1_zhaopin ss-m-r-10" style="color: #e03506; font-size: 25px;"></view>              <image v-if="props.jobFairId" src="/static/svg/jobFair.svg" class=" ss-m-r-10" style="width: 20px; height: 20px;"></image>              <rich-text v-if="item.job?.name?.indexOf('style') !== -1" class="job-name MiSans-Semibold default-text-color" :nodes="item.job.name"></rich-text>              <view v-else class="job-name MiSans-Semibold default-text-color">{{ formatName(item.job?.name) }}</view>            </view>          </view>          <!-- 薪酬、工作地、学历、工作经验 -->          <view class="d-flex align-center ellipsis" style="max-width: 100%;">            <view class="ss-m-r-20">                <span v-if="!item.job?.payFrom && !item.job?.payTo" class="salary-text MiSans-Bold">面议</span>                <span v-else class="salary-text MiSans-Bold">{{ item.job?.payFrom }}-{{ item.job?.payTo }}{{ item.job?.payName ? '/' + item.job?.payName : '' }}</span>            </view>            <view class="font-size-13">              <span class="desc-tag">                <span class="MiSans-Normal">{{item.job?.area?.str ?? '全国' }}</span>                <span class="divider-mx" v-if="item.job?.eduName">|</span>                <span class="MiSans-Normal">{{item.job?.eduName }}</span>                <span class="divider-mx" v-if="item.job?.expName">|</span>                <span class="MiSans-Normal">{{item.job?.expName }}</span>              </span>            </view>          </view>          <!-- 岗位tag  -->          <view class="mt" v-if="showWelfareTag">            <uni-tag               v-for="(tag,i) in item.job?.tagList || []"              :key="i"              class="tag-gap MiSans-Normal"              :text="tag"              inverted="false"              size="mini"              custom-style="background-color: #ececec;color:#666;border-color:#ececec;display: inline-block;"            />          </view>          <view style="text-align: end;" v-if="item.job?.hire">            <uni-tag              class="ss-m-l-10"              v-if="item?.job?.hirePrice && item?.job?.hirePrice > 0"               :text="`赏金:${commissionCalculation(item.job.hirePrice / 100, 1)}元`"              inverted="false"              size="default"              custom-style="background-color: #e2f0ef; color:#666; border-color:#e2f0ef;"            />          </view>          <view            v-if="props.showUpdateTime"            class="font-size-13 color-666 ss-m-t-20 MiSans-Normal d-flex align-center"          >            <image src="/static/img/clock.png" class="ss-m-r-20" style="width: 15px; height: 15px;"></image>            更新时间:{{ timesTampChange(item?.job?.refreshTime || item.job?.updateTime, 'Y-M-D h:m') }}          </view>        </view>        <!-- 企业信息 -->        <view v-if="props.showEntInfo" class="sub-li-bottom" @tap="handleClickEnt(item)">          <view class="avatarBox">            <image class="enterAvatar ml default-border default-radius" :src="item.enterprise?.logoUrl || 'https://minio.citupro.com/dev/menduner/company-avatar.png'"></image>          </view>          <view class="ss-m-l-35">            <view class="mr MiSans-Normal default-text-color">{{ formatName(item.enterprise?.anotherName || item.enterprise.name) }}</view>            <span class="color-666 MiSans-Normal ss-m-r-10">{{ item.enterprise?.industryName || '' }}</span>            <span class="mr color-666 MiSans-Normal">{{ item.enterprise?.scaleName || '' }}</span>          </view>        </view>      </view>      <view v-if="props.noMore" class="noMore">暂无更多数据</view>    </view>    <view v-else>      <image src="https://minio.citupro.com/dev/static/nodata.png" mode="widthFix" style="width: 100vw;height: 100vh;"></image>      <view style="color: gray; text-align: center;">暂无数据</view>    </view>  </view></template><script setup>import { commissionCalculation } from '@/utils/position'import { timesTampChange } from '@/utils/date'import { formatName } from '@/utils/getText'const emit = defineEmits(['entClick'])const props = defineProps({  list: { type: Array, default: () => [] },  jobFairId: { type: [String, Number], default: '' }, // 招聘会id  showEntInfo: { type: Boolean, default: true },  showUpdateTime: { type: Boolean, default: true },  noMore: { type: Boolean, default: false },  showWelfareTag: { type: Boolean, default: true }})//岗位详情const toDetail = (item) =>{  if (!item?.job?.id) return  let url = `/pagesB/positionDetail/index?id=${item.job.id}&area=${item.job.areaName}`  if (props.jobFairId) url += `&jobFairId=${props.jobFairId}`  uni.navigateTo({ url })}const handleClickEnt = (item) => {  const info = {    enterpriseId: item?.enterprise?.id || null,    anotherName: item?.enterprise?.anotherName || null  }  emit('entClick', info)}</script><style scoped lang="scss">.noMore{  margin: 20px 0;}.date-time{  color:#d9d0d2;  float: right;}.divided-line {  width: 100%;  height: 1px;  background-color: #f0f2f7;  margin: 20px 0;}.enterAvatar{	width: 60rpx;	height: 60rpx;	margin: auto;}.job-name {  max-width: 80vw;  overflow: hidden;  white-space: nowrap;  text-overflow: ellipsis;    font-weight: 600;  font-size: 30rpx;  text-align: center;  font-style: normal;  text-transform: none;}.sub-li-bottom {  display: flex;  align-items: center;  font-size: 13px;  padding: 5px;  border-radius: 0 0 12px 12px;  margin-bottom: 20rpx;  .avatarBox {    max-width: 40px;    max-height: 40px;  }}.salary-text {	font-weight: bold;	font-size: 24rpx;	color: #00B760;	text-align: center;	font-style: normal;	text-transform: none;}.list-shape {	padding: 10px 30rpx 10px;  border-radius: 12px 12px 0 0;  .titleBox {    display: flex;    align-items: center;    justify-content: space-between;  }}.desc-tag {	font-family: MiSans, MiSans;	font-weight: 400;	font-size: 24rpx;	color: #666666;	text-align: left;	font-style: normal;	text-transform: none;}.tag-gap{	margin: 10rpx 10rpx 10rpx 0;}.tag-gap1{  margin-bottom: 20px;}.divider-mx{	margin: 0 10rpx;}.divider { 	color:#e4d4d2;}//公司名称.cer-end{  position: absolute;  top: 85%;  right: 16%;}.cer-text{  text-decoration: underline;  margin: 0 5rpx;}//一行展示不全....dis{	display: flex;	align-items: center;}.show-more{	width: 26vw;	white-space: nowrap;	overflow: hidden;	text-overflow: ellipsis;}.mList {  margin-bottom: 20rpx;  border-radius: 20rpx;}/* 列表触底暂无更多 */.noMore{ text-align:center; color:grey; }.mt { margin-top: 15rpx; }.mb { margin-bottom: 10rpx; }.ml { margin-left: 20rpx; }.mr { margin-right: 20rpx; }.mr-10{ margin-right: 10rpx; }.my-5{ margin: 5px 0; }.disable {  position: relative;  overflow: hidden;  &::after {    content: '已失效';    position: absolute;    display: flex;    align-items: center;    justify-content: center;    font-size: 1.2em;    font-weight: bold;    color: #fc796f;    top: 0;    border-radius: 12px;    left: 0;    width: 100%;    height: 100%;    background-color: rgba(255, 255, 255, 0.75);  }}</style>
 |