123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248 |
- <template>
- <div class="default-width banner px-6">
- <div class="banner-title" v-if="Object.keys(info).length">
- <div class="float-left d-flex align-center">
- <v-img width="60" height="60" :src="info.enterprise.logoUrl"></v-img>
- <div class="ml-4">
- <div class="contact-name">
- {{ info.enterprise.name }}
- <v-icon color="primary" size="24">mdi-shield-check</v-icon>
- </div>
- <div class="contact-info">{{ info.business.type }} · {{ info.scaleName }} · {{ info.industryName }}</div>
- </div>
- </div>
- <div class="float-right d-flex">
- <div class="tools-box text-center">
- <div class="tools-box-number">{{ info.jobAdvertisedCount }}</div>
- <div class="tools-box-text">职位在招</div>
- </div>
- <!-- 是否关注该企业 -->
- <v-tooltip location="bottom">
- <template v-slot:activator="{ props }">
- <v-icon v-bind="props" class="ml-5 mr-2" size="25" :color="isCollection ? 'primary' : ''" @click="handleFollow">{{ isCollection ? 'mdi-heart' : 'mdi-heart-outline' }}</v-icon>
- </template>
- <span>关注该企业</span>
- </v-tooltip>
- </div>
- </div>
- <v-divider></v-divider>
- <div class="mt-3">
- <v-tabs v-model="tab" align-tabs="start" color="primary" bg-color="#f3f3f3">
- <v-tab :value="1">公司简介</v-tab>
- <v-tab :value="2">在招职位({{ info.jobAdvertisedCount }})</v-tab>
- </v-tabs>
- <div class="d-flex" v-if="Object.keys(info).length">
- <div class="content-left">
- <EnterpriseIntroduction v-if="tab === 1" :info="info" />
- <recruitmentPositions v-else :info="info"/>
- </div>
- <div class="content-right">
- <div class="welfare">
- <h4>工作时间及福利</h4>
- <div class="my-3" style="color: #777;font-size: 14px;">
- <v-icon size="17" color="#ccc" class="mr-2">mdi-clock</v-icon>{{ info.enterprise.workTime }}
- </div>
- <div class="welfare-tags">
- <v-chip size="small" label v-for="(k, i) in info.enterprise.welfareList.slice(0, 6)" :key="i" class="mb-2 welfare-tags-item ellipsis" color="primary">{{ k }}</v-chip>
- </div>
- </div>
- <div class="welfare my-3">
- <h4>工商信息</h4>
- <div :class="['mt-2', 'business-item']" v-for="(val, index) in businessList" :key="val.value">
- <div>{{ val.label }}</div>
- <div class="business-value ellipsis">{{ info.business[val.value] }}</div>
- <div :class="['my-3', {'border-bottom-dashed': index === businessList.length - 1 }]"></div>
- </div>
- <div class="business-source">
- 数据来源:企查查
- </div>
- </div>
- <div class="welfare">
- <h4>4位经理正在招聘</h4>
- <div class="d-flex mt-2" v-for="(val, i) in recruitmentSpecialist" :key="i">
- <v-avatar>
- <v-img :src="val.avatar"></v-img>
- </v-avatar>
- <div class="ml-2">
- <div class="position-name ellipsis">{{ val.name }} · {{ val.position }}</div>
- <div class="desc ellipsis">{{ val.desc }}</div>
- </div>
- </div>
- <div class="text-center mt-3">
- <v-btn class="buttons" color="primary" variant="outlined">{{ $t('position.allBtn') }}</v-btn>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </template>
- <script setup>
- defineOptions({ name: 'enterprise-details'})
- import { ref } from 'vue'
- import EnterpriseIntroduction from './components/introduction.vue'
- import recruitmentPositions from './components/positions.vue'
- import { getEnterpriseDetails, getEnterpriseSubscribeCheck, getEnterpriseSubscribe, getEnterpriseUnsubscribe } from '@/api/enterprise'
- import { timesTampChange } from '@/utils/date'
- import { dealDictData } from '@/views/recruit/position/components/dict.js'
- const props = defineProps({
- id: {
- type: String,
- default: ''
- }
- })
- const tab = ref(1)
- // 企业详情
- const info = ref({})
- const getDetails = async () => {
- const id = Number(props.id)
- if (!id) return
- const data = await getEnterpriseDetails({ id })
- // 成立日期
- const time = timesTampChange(data.business.establishmentTime)
- data.business.establishmentTime = time.slice(0, 10)
- info.value = { ...data, ...dealDictData({}, data.enterprise) }
- getCollectionStatus(id)
- }
- getDetails()
- // 效验求职者是否关注该企业
- const isCollection = ref(false)
- const getCollectionStatus = async (id) => {
- const data = await getEnterpriseSubscribeCheck({ enterpriseId: id })
- isCollection.value = data
- }
- // 关注&取消关注企业
- const handleFollow = async () => {
- const api = isCollection.value ? getEnterpriseUnsubscribe : getEnterpriseSubscribe
- await api(isCollection.value ? props.id : { enterpriseId: props.id })
- getCollectionStatus(props.id)
- }
- // 工商信息
- const businessList = [
- { label: '企业类型:', value: 'type' },
- { label: '统一社会信用代码:', value: 'code' },
- { label: '成立日期:', value: 'establishmentTime' },
- { label: '注册资本:', value: 'registeredCapital' }
- ]
- // 企业招聘人员
- const recruitmentSpecialist = [
- { name: '陈北方', position: '人事经理', desc: '正在招聘“运营专员”等职位11111', avatar: 'https://cdn.vuetifyjs.com/images/john.jpg' },
- { name: '蔡艳生', position: '人事经理', desc: '正在招聘“产品助理”等职位', avatar: 'https://avatars0.githubusercontent.com/u/9064066?v=4&s=460' },
- { name: '徐有道', position: '招聘专员', desc: '正在招聘“运营专员”等职位', avatar: 'https://cdn.vuetifyjs.com/images/john.jpg' },
- { name: '方晓', position: '人事经理', desc: '正在招聘“运营专员”等职位', avatar: 'https://avatars0.githubusercontent.com/u/9064066?v=4&s=460' }
- ]
- // 有tab的是首页中热门企业模块
- const savedTab = new URLSearchParams(window.location.search).get('tab')
- if (savedTab) tab.value = 2
- </script>
- <style scoped lang="scss">
- .banner {
- background-color: #fff;
- padding: 0 0 20px;
- }
- .banner-title {
- display: flex;
- align-items: center;
- justify-content: space-between;
- height: 125px;
- }
- .content-left {
- width: 844px;
- padding: 20px;
- }
- .content-right {
- flex: 1;
- padding: 20px 20px 0 0;
- }
- .contact {
- height: 60px;
- line-height: 60px;
- }
- .contact-name {
- font-size: 28px;
- font-weight: 700;
- color: #37576c;
- line-height: 28px;
- }
- .contact-info {
- font-size: 15px;
- font-weight: 500;
- color: #222;
- line-height: 21px;
- margin-top: 8px;
- }
- .tools-box {
- height: 80px;
- width: 80px;
- background-color: #d5e6e8;
- border-radius: 5px;
- }
- .tools-box-number {
- font-size: 30px;
- font-weight: 700;
- color: var(--v-primary-base);
- }
- .tools-box-text {
- color: var(--v-primary-base);
- font-size: 14px;
- }
- .welfare {
- background-color: #f3f3f3;
- border-radius: 8px;
- padding: 12px;
- }
- .welfare-tags {
- display: flex;
- width: 242px;
- flex-wrap: wrap;
- height: 100px;
- overflow: hidden;
- text-align: center;
- }
- .welfare-tags-item {
- display: block;
- width: 117px;
- max-width: 117px;
- text-align: center;
- line-height: 26px;
- margin-right: 8px;
- &:nth-child(2n) {
- margin-right: 0;
- }
- }
- .business-item {
- font-size: 14px;
- color: #777;
- font-weight: 600;
- }
- .business-value {
- width: 228px;
- color: #000;
- font-weight: 500;
- }
- .business-source {
- font-size: 14px;
- color: #777;
- }
- .desc {
- width: 180px;
- color: #666;
- font-weight: 500;
- font-size: 12px;
- }
- .position-name {
- width: 180px;
- font-size: 14px;
- font-weight: 600;
- }
- </style>
|