123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206 |
- <template>
- <div class="d-flex">
- <div class="position-box">
- <div
- class="sub-li"
- v-for="(item, index) in props.items" :key="index"
- :style="{'height': tab === 3 && item.hire ? '180px' : '149px'}"
- @mouseenter="item.active = true" @mouseleave="item.active = false"
- @click.stop="handlePosition(item)"
- >
- <div class="job-info">
- <div class="sub-li-top">
- <div class="sub-li-info">
- <p v-ellipse-tooltip class="MiSans-Semibold" :class="['name', {'default-active': item.active }]">{{ formatName(item.name) }}</p>
- <svg-icon v-if="tab === 3 && item.hire" name="pin" size="30"></svg-icon>
- </div>
- </div>
- <div class="d-flex justify-space-between align-center">
- <div class="text-truncate" style="color: #808080;" :style="{'width': !item.payFrom && !item.payTo ? '290px' : '190px'}">
- <span v-for="(j, i) in desc" :key="i" class="font-size-13">
- <span
- v-if="item[j.value] || j.value === 'areaName'"
- class="mr-1 d-inline-block"
- >
- {{ j.value === 'areaName' ? !item.areaId ? '全国' : item.area?.str : item[j.value] }}
- </span>
- <span
- v-if="i !== desc.length - 1 && (item[j.value] || (j.value === 'areaName' && !item.areaId)) && item[desc[i + 1].value]"
- class="septal-line ml-1"
- >
- </span>
- </span>
- </div>
- <div class="MiSans-Medium">
- <p v-if="!item.payFrom && !item.payTo" class="salary">面议</p>
- <p v-else class="salary">{{ item.payFrom ? item.payFrom + '-' : '' }}{{ item.payTo }}{{ item.payName ? '/' + item.payName : '' }}</p>
- </div>
- </div>
- <div v-ellipse-tooltip class="ellipsis" style="height: 24px;overflow: hidden;">
- <span v-for="(j, i) in item.tagList" :key="i" class="mr-3 tags" style="color: #345768;">{{ j }}</span>
- </div>
- <div v-if="tab === 3 && item.hire" class="text-end mt-3">
- <v-chip v-if="item.hirePrice" size="small" label color="primary">赏金:{{ commissionCalculation(item.hirePrice / 100, 1) }}元</v-chip>
- <v-chip v-if="item.hirePoint" size="small" label class="ml-1" color="primary">积分:{{ commissionCalculation(item.hirePoint / 100, 1) }}点</v-chip>
- </div>
- <div v-if="tab === 2" class="font-size-14 mb-3 text-end" style="color: #345768;">发布时间:{{ timesTampChange(item.createTime, 'Y-M-D h:m') }}</div>
- </div>
- <!-- <div class="sub-li-bottom" @click.stop="jumpToEnterpriseDetail(item.enterpriseId, isOpenWindow)"> -->
- <div class="sub-li-bottom">
- <div class="user-info">
- <div class="d-flex align-center">
- <v-avatar tile size="35">
- <v-img class="entLogoImg" :src="item.logoUrl || 'https://minio.citupro.com/dev/menduner/company-avatar.png'" />
- </v-avatar>
- <span v-ellipse-tooltip class="names ml-2 font-size-14 ellipsis" style="max-width: 88%;">
- {{ formatName(item.anotherName || item.enterpriseName) }}
- <span class="color-999 font-size-13 ml-3">
- <span>{{ item.industryName }}</span>
- <span class="septal-line" v-if="item.industryName && item.scaleName"></span>
- <span>{{ item.scaleName }}</span>
- </span>
- </span>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </template>
- <script setup>
- defineOptions({ name: 'position-card-item' })
- import { commissionCalculation, jumpToEnterpriseDetail } from '@/utils/position'
- import { timesTampChange } from '@/utils/date'
- import { formatName } from '@/utils/getText'
- const props = defineProps({
- items: {
- type: Array,
- default: () => []
- },
- tab: {
- type: Number,
- default: 1
- },
- isOpenWindow: {
- type: Boolean,
- default: true
- }
- })
- const desc = [
- { mdi: 'mdi-map-marker-outline', value: 'areaName' },
- { mdi: 'mdi-school-outline', value: 'eduName' },
- { mdi: 'mdi-clock-time-ten-outline', value: 'expName' }
- ]
- const emits = defineEmits(['position', 'enterprise'])
- const handlePosition = (item) => {
- emits('position', item)
- }
- </script>
- <style lang="scss" scoped>
- .position-box {
- display: flex;
- flex-wrap: wrap;
- width: 100%;
- height: 100%;
- }
- .sub-li {
- position: relative;
- width: calc((100% - 24px) / 3);
- min-width: calc((100% - 24px) / 3);
- max-width: calc((100% - 24px) / 3);
- margin: 0 12px 12px 0;
- border-radius: 12px;
- padding: 0;
- overflow: hidden;
- cursor: pointer;
- transition: all .2s linear;
- background-color: #fff;
- border: 1px solid #fff;
- &:nth-child(3n) {
- margin-right: 0;
- }
- &:hover {
- box-shadow: 5px 9px 12px 1px rgba(0, 183, 96, 0.17);
- border-color: #00B760;
- }
- }
- .job-info {
- position: relative;
- padding: 16px 20px;
- }
- .recommend {
- position: absolute;
- left: 0;
- top: 0;
- }
- .sub-li-top {
- display: flex;
- width: 100%;
- align-items: center;
- }
- .sub-li-info {
- display: flex;
- align-items: center;
- flex-wrap: wrap;
- height: 31%;
- overflow: hidden;
- flex: 1;
- }
- .salary {
- font-size: 16px;
- color: #00B760;
- line-height: 22px;
- flex: none;
- }
- .tags {
- font-size: 12px;
- color: #666;
- display: inline-block;
- }
- .job-text {
- white-space: normal;
- padding-right: 0;
- height: 22px;
- line-height: 22px;
- overflow: hidden;
- word-break: break-all;
- max-width: none;
- }
- .sub-li-info .name {
- font-family: 'MiSans-Semibold';
- position: relative;
- margin-right: 8px;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- font-weight: 600;
- color: #0E100F;
- &:hover {
- color: var(--v-primary-base);
- }
- }
- .sub-li-bottom {
- position: absolute;
- width: 100%;
- height: 54px;
- bottom: 1px;
- left: 0;
- margin-top: 10px;
- padding-top: 0;
- display: block;
- border: none;
- }
- .user-info {
- // display: flex;
- padding: 10px 20px 12px;
- }
- .names {
- font-weight: 500;
- color: #0E100F;
- }
- </style>
|