|
@@ -8,10 +8,11 @@
|
|
|
<v-img :src="item?.enterprise.logoUrl || 'https://minio.citupro.com/dev/menduner/company-avatar.png'" alt="" width="77" height="77" style="border-radius: 4px;"/>
|
|
|
</div>
|
|
|
<div class="company-info cursor-pointer">
|
|
|
- <h3 :ref="el => { if(el) companyNameRefs[index] = el }">
|
|
|
+ <h3 v-ellipse-tooltip.top>{{ formatName(item.enterprise.anotherName || item.enterprise.name) }}</h3>
|
|
|
+ <!-- <h3 :ref="el => { if(el) companyNameRefs[index] = el }">
|
|
|
{{ formatName(item.enterprise.anotherName || item.enterprise.name) }}
|
|
|
<v-tooltip v-if="isTextOverflow[index]" activator="parent" location="top">{{ formatName(item.enterprise.anotherName || item.enterprise.name) }}</v-tooltip>
|
|
|
- </h3>
|
|
|
+ </h3> -->
|
|
|
<p>
|
|
|
{{ item?.enterprise.scaleName }}
|
|
|
<span class="septal-line" v-if="item.enterprise.industryName"></span>
|
|
@@ -19,17 +20,16 @@
|
|
|
</p>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="px-5 py-1 ellipsis-tag" :style="{'height': '33px', 'border-bottom': item.enterprise.welfareList && item.enterprise.welfareList.length ? '1px solid #EBEBEB' : 'none'}">
|
|
|
- <v-tooltip v-if="item.enterprise?.welfareList?.length" activator="parent" location="top">{{ item.enterprise.welfareList.toString() }}</v-tooltip>
|
|
|
+ <div v-ellipse-tooltip.top class="px-5 py-1 ellipsis-tag" :style="{'height': '33px', 'border-bottom': item.enterprise.welfareList && item.enterprise.welfareList.length ? '1px solid #EBEBEB' : 'none'}">
|
|
|
<span class="welfareTag mr-5" v-for="(k, i) in item.enterprise.welfareList" :key="i">{{ k }}</span>
|
|
|
</div>
|
|
|
<!-- 职位列表 -->
|
|
|
+ <!-- :class="{'company-job-item-hover': k.active}" -->
|
|
|
<ul class="company-job-list">
|
|
|
- <li class="company-job-item" v-for="(k, i) in item.jobList" :key="i" :class="{'company-job-item-hover': k.active}" @mouseenter="k.active = true" @mouseleave="k.active = false" @click="handleClickPosition(k)">
|
|
|
- <div class="job-info" @mouseenter="k.active = true" @mouseleave="k.active = false" @click.stop="handleClickPosition(k)">
|
|
|
+ <li v-for="(k, i) in item.jobList" :key="i" @mouseenter="k.active = true" @mouseleave="k.active = false" @click="handleClickPosition(k)">
|
|
|
+ <v-card :elevation="k.active ? 5 : 0" class="company-job-item cursor-pointer mb-3">
|
|
|
<div class="mb-2 d-flex">
|
|
|
- <v-tooltip v-if="isTextOverflow[index]" activator="parent" location="top">{{ formatName(k.name) }}</v-tooltip>
|
|
|
- <p :class="['name', 'cursor-pointer', {'default-active': k.active }]" :style="{'max-width': !k.payFrom && !k.payTo ? '290px' : '200px'}">{{ formatName(k.name) }}</p>
|
|
|
+ <span v-ellipse-tooltip.top :class="['name', 'cursor-pointer', {'default-active': k.active }]" :style="{'max-width': !k.payFrom && !k.payTo ? '290px' : '200px'}">{{ formatName(k.name) }}</span>
|
|
|
<span v-if="!k.payFrom && !k.payTo" class="salary">面议</span>
|
|
|
<span v-else class="salary">{{ k.payFrom ? k.payFrom + '-' : '' }}{{ k.payTo }}{{ k.payName ? '/' + k.payName : '' }}</span>
|
|
|
</div>
|
|
@@ -44,7 +44,7 @@
|
|
|
</span>
|
|
|
<span class="font-size-13 float-right">{{ timesTampChange(k.updateTime, 'Y-M-D') }}</span>
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ </v-card>
|
|
|
</li>
|
|
|
</ul>
|
|
|
<div class="moreBtn d-flex align-center justify-center" @click.stop="handleMoreEnterprise(item)" @mouseenter="item.active = true" @mouseleave="item.active = false">
|
|
@@ -57,7 +57,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup name="hotPromoted">
|
|
|
-import { ref, watch, nextTick } from 'vue'
|
|
|
+import { ref, watch } from 'vue'
|
|
|
import { timesTampChange } from '@/utils/date'
|
|
|
import { formatName } from '@/utils/getText'
|
|
|
import { jumpToEnterpriseDetail } from '@/utils/position'
|
|
@@ -71,26 +71,26 @@ const props = defineProps({
|
|
|
})
|
|
|
|
|
|
const router = useRouter()
|
|
|
-const companyNameRefs = ref({})
|
|
|
-const isTextOverflow = ref({})
|
|
|
|
|
|
+// const isTextOverflow = ref({})
|
|
|
+// const companyNameRefs = ref({})
|
|
|
// 检查文本是否溢出
|
|
|
-const checkTextOverflow = () => {
|
|
|
- Object.entries(companyNameRefs.value).forEach(([index, element]) => {
|
|
|
- if (element) {
|
|
|
- isTextOverflow.value[index] = element.scrollWidth > element.clientWidth
|
|
|
- }
|
|
|
- })
|
|
|
-}
|
|
|
+// const checkTextOverflow = () => {
|
|
|
+// Object.entries(companyNameRefs.value).forEach(([index, element]) => {
|
|
|
+// if (element) {
|
|
|
+// isTextOverflow.value[index] = element.scrollWidth > element.clientWidth
|
|
|
+// }
|
|
|
+// })
|
|
|
+// }
|
|
|
|
|
|
const list = ref([])
|
|
|
watch(
|
|
|
() => props.items,
|
|
|
(newVal) => {
|
|
|
list.value = newVal
|
|
|
- nextTick(() => {
|
|
|
- checkTextOverflow()
|
|
|
- })
|
|
|
+ // nextTick(() => {
|
|
|
+ // checkTextOverflow()
|
|
|
+ // })
|
|
|
},
|
|
|
{ immediate: true },
|
|
|
{ deep: true }
|
|
@@ -104,8 +104,9 @@ const handleClickPosition = (k) => {
|
|
|
|
|
|
// 查看更多职位
|
|
|
const handleMoreEnterprise = (item) => {
|
|
|
- if (!item.enterprise.id) return
|
|
|
- window.open(`/recruit/personal/company/details/${item.enterprise.id}?key=recruitmentPositions`)
|
|
|
+ // if (!item.enterprise.id) return
|
|
|
+ // window.open(`/recruit/personal/company/details/${item.enterprise.id}?key=recruitmentPositions`)
|
|
|
+ window.open(`/recruit/personal/position?content=${item.enterprise.anotherName || item.enterprise.name}`)
|
|
|
}
|
|
|
</script>
|
|
|
|
|
@@ -120,7 +121,7 @@ const handleMoreEnterprise = (item) => {
|
|
|
min-width: calc((100% - 24px) / 3);
|
|
|
max-width: calc((100% - 24px) / 3);
|
|
|
margin: 0 12px 12px 0;
|
|
|
- height: 360px;
|
|
|
+ height: 360px + 12px;
|
|
|
border-radius: 12px;
|
|
|
padding: 0;
|
|
|
overflow: hidden;
|
|
@@ -180,7 +181,7 @@ const handleMoreEnterprise = (item) => {
|
|
|
line-height: 18px;
|
|
|
}
|
|
|
.company-job-list {
|
|
|
- padding: 4px 20px 12px;
|
|
|
+ padding: 4px 10px 12px;
|
|
|
}
|
|
|
ul li {
|
|
|
list-style: none
|
|
@@ -188,11 +189,11 @@ ul li {
|
|
|
.company-job-item {
|
|
|
display: block;
|
|
|
height: auto;
|
|
|
- padding: 12px 0;
|
|
|
+ padding: 12px 10px;
|
|
|
margin: 0;
|
|
|
- &-hover {
|
|
|
- background-color: #f2f4f7;
|
|
|
- }
|
|
|
+ // &-hover {
|
|
|
+ // background-color: #f2f4f7;
|
|
|
+ // }
|
|
|
}
|
|
|
.salary {
|
|
|
font-size: 16px;
|