123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176 |
- <template>
- <div>
- <div class="position-item mb-3 job-closed elevation-2" style="position: relative;"
- :class="{'close-position': val.job.status === '1'}"
- v-for="(val, i) in props.items" :key="i" @mouseenter="val.active = true" @mouseleave="val.active = false"
- >
- <div class="info-header">
- <div v-if="val.active && val.job.status === '0'" class="header-btn">
- <v-btn v-if="props.showCancelBtn" class="half-button ml-3" color="primary" size="small" @click="handleCancel(val)">取消收藏</v-btn>
- <!-- <v-btn class="half-button ml-3" color="primary" size="small" @click="toDetails(val)">立即沟通</v-btn> -->
- </div>
- <div class="img-box">
- <v-avatar :image="getUserAvatar(val.contact.avatar, val.contact.sex)" size="x-small"></v-avatar>
- <span class="name">
- <span class="mx-3">{{ val.contact.name }}</span>
- <span class="gray">{{ val.contact.postNameCn }}</span>
- </span>
- </div>
- </div>
- <div class="info-content" >
- <div class="job-info">
- <div class="job-name cursor-pointer">
- <span class="mr-3 info-name" @click="handleToPositionDetails(val)">{{ val.job.name }}</span>
- <span v-if="val?.job?.areaName">[{{ val.job.areaName }}]</span>
- </div>
- <div class="job-other">
- <span v-if="!val.job.payFrom && !val.job.payTo" class="salary">面议</span>
- <span v-else class="salary">{{ val.job.payFrom ? val.job.payFrom + '-' : ''}}{{ val.job.payTo }}{{ val.job.payName ? '/' + val.job.payName : '' }}</span>
- <v-chip v-if="val.job?.expName" class="mx-3" color="primary" label size="small">{{ val.job.expName }}</v-chip>
- <v-chip v-if="val.job?.eduName" color="primary" label size="small">{{ val.job.eduName }}</v-chip>
- </div>
- </div>
- <div class="company-info ml-3" style="flex: 1;">
- <div style="height: 50px; width: 50px;">
- <v-img width="50" height="50" :src="val.enterprise.logoUrl || 'https://minio.citupro.com/dev/menduner/7.png'"></v-img>
- </div>
- <div class="ml-3">
- <div class="cursor-pointer info-name" @click="handleToEnterprise(val)">{{ val.enterprise.name }}</div>
- <div class="mt-3 ellipsis color-666 font-size-13" style="max-width: 260px;">
- <span v-for="(k, i) in desc" :key="k">
- {{ val.enterprise[k] }}
- <span v-if="i !== desc.length - 1 && val.enterprise[k] && val.enterprise[desc[i + 1]]" class="septal-line"></span>
- </span>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </template>
- <script setup>
- defineOptions({ name: 'longStrip'})
- import { getPersonJobUnfavorite } from '@/api/position'
- import { useI18n } from '@/hooks/web/useI18n'
- import Snackbar from '@/plugins/snackbar'
- import { getUserAvatar } from '@/utils/avatar'
- import { useRouter } from 'vue-router'
- // import { prologue, defaultText } from '@/hooks/web/useIM'
- const emits = defineEmits(['refresh'])
- const { t } = useI18n()
- const props = defineProps({
- items: {
- type: Array,
- default: () => []
- },
- showCancelBtn: {
- type: Boolean,
- default: false
- }
- })
- const router = useRouter()
- const desc = ['industryName', 'financingName', 'scaleName']
- const handleCancel = async (item) => {
- if (!item.job.id) return Snackbar.warning(t('sys.api.operationFailed'))
- await getPersonJobUnfavorite(item.job.id)
- emits('refresh')
- Snackbar.success(t('common.operationSuccessful'))
- }
- // 职位详情
- const handleToPositionDetails = (item) => {
- router.push(`/recruit/personal/position/details/${item.job.id}`)
- }
- // 企业详情
- const handleToEnterprise = (item) => {
- router.push(`/recruit/personal/company/details/${item.enterprise.id}?key=briefIntroduction`)
- }
- // // 立即沟通
- // const toDetails = async (info) => {
- // const userId = info.contact.userId
- // const enterpriseId = info.contact.enterpriseId
- // await prologue({userId, enterpriseId, defaultText})
- // let url = `/recruit/personal/message?id=${info.job.id}`
- // if (info.contact.enterpriseId) {
- // url += `&enterprise=${info.contact.enterpriseId}`
- // }
- // router.push(url)
- // }
- </script>
- <style scoped lang="scss">
- .position-item {
- height: 144px;
- background-color: #fff;
- border-radius: 12px;
- &:hover {
- box-shadow: 0px 3px 5px -1px var(--v-shadow-key-umbra-opacity, rgba(0, 0, 0, 0.2)), 0px 5px 8px 0px var(--v-shadow-key-penumbra-opacity, rgba(0, 0, 0, 0.14)), 0px 1px 14px 0px var(--v-shadow-key-ambient-opacity, rgba(0, 0, 0, 0.12)) !important;
- }
- .info-header {
- height: 48px;
- background: linear-gradient(90deg,#f5fcfc,#fcfbfa);
- border-radius: 12px;
- .img-box {
- padding: 12px 24px;
- .name {
- color: var(--color-222);
- font-weight: 400;
- font-size: 13px;
- .gray {
- color: var(--color-666);
- }
- }
- }
- .header-btn {
- padding: 10px 10px 0 0;
- float: right;
- .v-btn {
- z-index: 1;
- }
- }
- }
- .info-content {
- display: flex;
- padding: 16px 24px;
- justify-content: space-between;
- .job-info {
- width: 430px;
- min-width: 430px;
- max-width: 430px;
- font-weight: 500;
- font-size: 16px;
- .job-name {
- height: 22px;
- line-height: 22px;
- color: var(--color-222);
- margin-bottom: 12px;
- }
- .job-other {
- color: var(--v-error-base);
- height: 22px;
- line-height: 22px;
- }
- }
- .company-info {
- display: flex;
- align-items: center
- }
- .interview-info {
- color: var(--color-333);
- font-size: 15px;
- }
- }
- }
- .info-name:hover {
- color: var(--v-primary-base);
- }
- </style>
|