|
@@ -8,7 +8,10 @@
|
|
|
<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>{{ 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>
|
|
|
<p>
|
|
|
{{ item?.enterprise.scaleName }}
|
|
|
<span class="septal-line" v-if="item.enterprise.industryName"></span>
|
|
@@ -30,8 +33,8 @@
|
|
|
</div>
|
|
|
<div style="height: 24px; overflow: hidden; color: #808080;">
|
|
|
<span v-for="(j, index) in desc" :key="index">
|
|
|
- <span v-if="k[j.value] || (j.value === 'areaName' && !k.areaId)" class="mr-1 font-size-13">{{ (j.value === 'areaName' && !k.areaId) ? '全国' : k[j.value] }}</span>
|
|
|
- <span v-if="k[j.value] && index !== desc.length - 1 && (k[desc[index + 1].value] || (j.value === 'areaName' && !k.areaId))" class="septal-line ml-1"></span>
|
|
|
+ <span v-if="k[j] || (j === 'areaName' && !k.areaId)" class="mr-1 font-size-13">{{ (j === 'areaName' && !k.areaId) ? '全国' : k[j] }}</span>
|
|
|
+ <span v-if="k[j] && index !== desc.length - 1 && (k[desc[index + 1]] || (j === 'areaName' && !k.areaId))" class="septal-line ml-1"></span>
|
|
|
</span>
|
|
|
<span class="font-size-13 float-right">{{ timesTampChange(k.updateTime, 'Y-M-D') }}</span>
|
|
|
</div>
|
|
@@ -39,7 +42,7 @@
|
|
|
</li>
|
|
|
</ul>
|
|
|
<div class="moreBtn d-flex align-center justify-center" @click.stop="handleMoreEnterprise(item)" @mouseenter="item.active = true" @mouseleave="item.active = false">
|
|
|
- <span :style="{'text-decoration': item.active ? 'underline' : 'none'}">{{ $t('position.moreBtn') }}</span>
|
|
|
+ <span :style="{'border-bottom': item.active ? '1px solid #fff' : 'none'}">{{ $t('position.moreBtn') }}</span>
|
|
|
<v-icon>mdi-menu-right</v-icon>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -48,7 +51,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup name="hotPromoted">
|
|
|
-import { ref, watch } from 'vue'
|
|
|
+import { ref, watch, nextTick } from 'vue'
|
|
|
import { timesTampChange } from '@/utils/date'
|
|
|
import { formatName } from '@/utils/getText'
|
|
|
import { jumpToEnterpriseDetail } from '@/utils/position'
|
|
@@ -59,29 +62,37 @@ const props = defineProps({
|
|
|
default: () => []
|
|
|
}
|
|
|
})
|
|
|
+
|
|
|
+const companyNameRefs = ref({})
|
|
|
+const isTextOverflow = ref({})
|
|
|
+
|
|
|
+// 检查文本是否溢出
|
|
|
+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()
|
|
|
+ })
|
|
|
},
|
|
|
{ immediate: true },
|
|
|
{ deep: true }
|
|
|
)
|
|
|
-const desc = [
|
|
|
- { value: 'areaName' },
|
|
|
- { value: 'eduName' },
|
|
|
- { value: 'expName' }
|
|
|
-]
|
|
|
+const desc = ['areaName', 'eduName', 'expName']
|
|
|
|
|
|
// 职位详情
|
|
|
const handleClickPosition = (k) => {
|
|
|
window.open(`/recruit/personal/position/details/${k.id}`)
|
|
|
}
|
|
|
-// 企业详情
|
|
|
-const handleClickEnterprise = (item) => {
|
|
|
- window.open(`/recruit/personal/company/details/${item.enterprise.id}?key=briefIntroduction`)
|
|
|
-}
|
|
|
|
|
|
// 查看更多职位
|
|
|
const handleMoreEnterprise = (item) => {
|