123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189 |
- <template>
- <div
- style="position: relative; min-height: calc(100vh - 198px);"
- :class="{
- 'disable1': userInfo?.vipExpireDate > Date.now() && !userInfo?.entitlement?.viewersList,
- 'disable2': !userInfo?.vipExpireDate || (userInfo?.vipExpireDate && userInfo?.vipExpireDate < Date.now())
- }"
- >
- <div v-if="userInfo?.entitlement?.viewersList && userInfo?.vipFlag && userInfo?.vipExpireDate && userInfo?.vipExpireDate > Date.now()">
- <div v-if="items.length" class="mt-3">
- <div class="positionItem" :class="item.active ? 'elevation-8' : 'elevation-3'" v-for="(item, index) in items" :key="index" @mouseenter="item.active = true" @mouseleave="item.active = false">
- <div class="position-and-company">
- <div class="position">
- <div class="float-left">
- <v-img :src="getUserAvatar(item?.contact.avatar, item?.contact.sex)" :width="40" style="height: 40px;border-radius: 4px;"/>
- </div>
- <div class="company-info">
- <h3 v-ellipse-tooltip class="title1">{{ item.contact.name }}</h3>
- <p class="mt-2">{{ item?.post?.nameCn }}</p>
- </div>
- </div>
- <div class="company" @click.stop="jumpToEnterpriseDetail(item.enterprise.id, false)">
- <div class="float-left">
- <v-img :src="item?.enterprise.logoUrl || 'https://minio.citupro.com/dev/menduner/company-avatar.png'" :alt="item.enterprise.anotherName" :width="40" style="height: 40px;border-radius: 4px;"/>
- </div>
- <div class="company-info">
- <h3 v-ellipse-tooltip :class="{'default-active': item.active }" class="title1 cursor-pointer" style="max-width: 455px;">{{ formatName(item.enterprise.anotherName || item.enterprise.name) }}</h3>
- <p class="mt-2">{{ item.enterprise.scaleName }}<span class="mx-2">|</span>{{ item.enterprise.industryName }}</p>
- </div>
- </div>
- </div>
- <div class="footer">
- {{ $t('position.viewTime') + timesTampChange(item.updateTime) }}
- </div>
- </div>
- <CtPagination
- :total="total"
- :page="page.pageNo"
- :limit="page.pageSize"
- @handleChange="handleChangePage"
- ></CtPagination>
- </div>
- <Empty v-else :elevation="false"></Empty>
- </div>
- </div>
- </template>
- <script setup>
- // 看过我
- defineOptions({ name: 'position-seen-me' })
- import { ref } from 'vue'
- import { getInterestedMePage } from '@/api/recruit/personal/personalCenter'
- import { dealDictObjData } from '@/utils/position'
- import { timesTampChange } from '@/utils/date'
- import Empty from '@/components/Empty'
- import { getUserAvatar } from '@/utils/avatar'
- import { useUserStore } from '@/store/user'
- import { formatName } from '@/utils/getText'
- import { jumpToEnterpriseDetail } from '@/utils/position'
- const total = ref(0)
- const items = ref([])
- const page = ref({
- pageNo: 1,
- pageSize: 10
- })
- const userStore = useUserStore()
- let userInfo = ref(JSON.parse(localStorage.getItem('userInfo')) || {})
- userStore.$subscribe((mutation, state) => {
- if (state.userInfo && Object.keys(state.userInfo).length) userInfo.value = state?.userInfo
- })
- const getData = async () => {
- const res = await getInterestedMePage(page.value)
- items.value = res.list.map(e => {
- e.enterprise = dealDictObjData({}, e.enterprise)
- e.active = false
- return e
- })
- total.value = res.total
- }
- getData()
- const handleChangePage = (e) => {
- page.value.pageNo = e
- getData()
- }
- </script>
- <style scoped lang="scss">
- .title1 {
- color: var(--color-666);
- position: relative;
- max-width: 400px;
- margin-right: 8px;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- font-size: 16px;
- }
- .company {
- flex: 1;
- display: flex;
- }
- .company-info {
- float: left;
- margin-left: 16px;
- }
- .company-info p {
- height: 18px;
- font-size: 13px;
- font-weight: 400;
- color: var(--color-999);
- }
- .textColor666 { color: var(--color-666); }
- .positionItem {
- margin-bottom: 12px;
- border-radius: 12px;
- padding: 0;
- overflow: hidden;
- transition: all .2s linear;
- background-color: #fff;
- .position-and-company {
- display: flex;
- padding: 16px 20px;
- width: 100%;
- .position {
- width: 484px;
- padding-right: 12px;
- }
- }
- }
- .footer {
- height: 36px;
- line-height: 36px;
- padding: 0px 20px;
- font-size: 14px;
- color: var(--color-999);
- background: linear-gradient(90deg, #f5fcfc 0, #fcfbfa 100%);
- }
- .tips {
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- }
- .disable1 {
- position: relative;
- overflow: hidden;
- &::after {
- content: '当前会员套餐的福利不包含谁看过我';
- position: absolute;
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: 1.5em;
- font-family: 'MiSans-Bold';
- color: #fff;
- top: 0;
- border-radius: 12px;
- left: 0;
- width: 100%;
- height: 100%;
- background-color: rgba(0, 0, 0, 0.35);
- }
- }
- .disable2 {
- position: relative;
- overflow: hidden;
- &::after {
- content: '谁看过我为会员福利内容';
- position: absolute;
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: 1.5em;
- font-family: 'MiSans-Bold';
- color: #fff;
- top: 0;
- border-radius: 12px;
- left: 0;
- width: 100%;
- height: 100%;
- background-color: rgba(0, 0, 0, 0.35);
- }
- }
- </style>
|