|
@@ -1,7 +1,7 @@
|
|
<!-- 主页职业类型面板 -->
|
|
<!-- 主页职业类型面板 -->
|
|
<template>
|
|
<template>
|
|
<div class="hasPageCard d-flex" @mouseleave="handleMouseLeave">
|
|
<div class="hasPageCard d-flex" @mouseleave="handleMouseLeave">
|
|
- <v-card class="card">
|
|
|
|
|
|
+ <v-card class="leftBox">
|
|
<div class="leftCard d-flex flex-column flex-wrap pt-3 pr-2">
|
|
<div class="leftCard d-flex flex-column flex-wrap pt-3 pr-2">
|
|
<div
|
|
<div
|
|
v-for="(item, index) in items" :key="item.id"
|
|
v-for="(item, index) in items" :key="item.id"
|
|
@@ -32,7 +32,7 @@
|
|
</div> -->
|
|
</div> -->
|
|
</div>
|
|
</div>
|
|
</v-card>
|
|
</v-card>
|
|
- <v-card v-if="rightObj.show" class="card rightCardBox">
|
|
|
|
|
|
+ <v-card v-if="rightObj.show" class="right-item-box elevation-5" :style="{'left': itemLeft + 'px'}">
|
|
<div class="rightCard">
|
|
<div class="rightCard">
|
|
<div class="rightContent">
|
|
<div class="rightContent">
|
|
<div
|
|
<div
|
|
@@ -50,7 +50,7 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</v-card>
|
|
</v-card>
|
|
- <v-card height="392px" v-if="!rightObj.show" class="card rightCardBox">
|
|
|
|
|
|
+ <v-card height="392px" class="card rightCardBox">
|
|
<v-carousel show-arrows="hover" cycle>
|
|
<v-carousel show-arrows="hover" cycle>
|
|
<v-carousel-item v-for="(item, i) in carouselList" :key="i">
|
|
<v-carousel-item v-for="(item, i) in carouselList" :key="i">
|
|
<div style="height: 392px; overflow: hidden;">
|
|
<div style="height: 392px; overflow: hidden;">
|
|
@@ -109,21 +109,31 @@ getDict('positionTreeData', null, 'positionTreeData').then(({ data }) => {
|
|
})
|
|
})
|
|
|
|
|
|
// 翻页按钮
|
|
// 翻页按钮
|
|
-const previous = () => { if (pageInfo.current > 1) pageInfo.current--; getPageItems() }
|
|
|
|
-const nextPage = () => { if (pageInfo.current < pageCount.value) pageInfo.current++; getPageItems() }
|
|
|
|
|
|
+// const previous = () => { if (pageInfo.current > 1) pageInfo.current--; getPageItems() }
|
|
|
|
+// const nextPage = () => { if (pageInfo.current < pageCount.value) pageInfo.current++; getPageItems() }
|
|
|
|
|
|
// 右侧职位信息
|
|
// 右侧职位信息
|
|
const leftIndex = ref(null)
|
|
const leftIndex = ref(null)
|
|
const rightObj = reactive({ show: false, data: {} })
|
|
const rightObj = reactive({ show: false, data: {} })
|
|
-
|
|
|
|
-const handleMouseOver = (val, index) => { // 鼠标移入
|
|
|
|
|
|
+const itemLeft = ref(0)
|
|
|
|
+const container = document.getElementsByClassName('leftBox')
|
|
|
|
+// 鼠标移入
|
|
|
|
+const handleMouseOver = (val, index) => {
|
|
leftIndex.value = index
|
|
leftIndex.value = index
|
|
rightObj.data = val
|
|
rightObj.data = val
|
|
|
|
+
|
|
|
|
+ // 弹窗位置
|
|
|
|
+ const div = document.getElementsByClassName('leftCardItem')[index]
|
|
|
|
+ const rect = div.getBoundingClientRect()
|
|
|
|
+ const containerRect = container[0].getBoundingClientRect()
|
|
|
|
+ itemLeft.value = rect.right - containerRect.x + 20
|
|
|
|
+
|
|
rightObj.show = true
|
|
rightObj.show = true
|
|
}
|
|
}
|
|
const handleMouseLeave = () => { // 鼠标移出
|
|
const handleMouseLeave = () => { // 鼠标移出
|
|
rightObj.show = false // true false
|
|
rightObj.show = false // true false
|
|
leftIndex.value = null
|
|
leftIndex.value = null
|
|
|
|
+ itemLeft.value = 0
|
|
}
|
|
}
|
|
// 轮播图片
|
|
// 轮播图片
|
|
const carouselList = ref([
|
|
const carouselList = ref([
|
|
@@ -136,6 +146,9 @@ const carouselList = ref([
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
|
|
+.leftBox {
|
|
|
|
+ border-radius: 12px;
|
|
|
|
+}
|
|
.active {
|
|
.active {
|
|
color: var(--v-primary-base) !important;
|
|
color: var(--v-primary-base) !important;
|
|
font-weight: 700;
|
|
font-weight: 700;
|
|
@@ -143,14 +156,23 @@ const carouselList = ref([
|
|
:deep(.v-window) {
|
|
:deep(.v-window) {
|
|
height: 392px !important;
|
|
height: 392px !important;
|
|
}
|
|
}
|
|
|
|
+.right-item-box {
|
|
|
|
+ position: absolute;
|
|
|
|
+ z-index: 999;
|
|
|
|
+ width: 500px;
|
|
|
|
+ border-radius: 12px;
|
|
|
|
+}
|
|
.hasPageCard {
|
|
.hasPageCard {
|
|
width: 100%;
|
|
width: 100%;
|
|
- .card { border-radius: 12px; }
|
|
|
|
|
|
+ height: 392px;
|
|
|
|
+ position: relative;
|
|
|
|
+ .card {
|
|
|
|
+ border-radius: 12px;
|
|
|
|
+ }
|
|
.leftIndexAct {
|
|
.leftIndexAct {
|
|
height: 48px;
|
|
height: 48px;
|
|
margin: 0 4px;
|
|
margin: 0 4px;
|
|
border-radius: 12px;
|
|
border-radius: 12px;
|
|
- // background-color: var(--v-primary-base);
|
|
|
|
}
|
|
}
|
|
justify-content: center; // 后面的flex会继承
|
|
justify-content: center; // 后面的flex会继承
|
|
.leftCard {
|
|
.leftCard {
|
|
@@ -191,7 +213,10 @@ const carouselList = ref([
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- .rightCardBox { flex: 1; margin-left: 12px;}
|
|
|
|
|
|
+ .rightCardBox {
|
|
|
|
+ flex: 1;
|
|
|
|
+ margin-left: 12px;
|
|
|
|
+ }
|
|
.rightCard {
|
|
.rightCard {
|
|
height: 384px;
|
|
height: 384px;
|
|
// min-width: 786px;
|
|
// min-width: 786px;
|