|
@@ -1,8 +1,14 @@
|
|
<template>
|
|
<template>
|
|
<div class="d-flex">
|
|
<div class="d-flex">
|
|
<div class="position-box">
|
|
<div class="position-box">
|
|
- <div class="sub-li" v-for="(item, index) in list" :key="index">
|
|
|
|
- <div class="job-info" @click="handlePosition(item)" @mouseenter="item.active = true" @mouseleave="item.active = false">
|
|
|
|
|
|
+ <div class="sub-li"
|
|
|
|
+ v-for="(item, index) in list" :key="index"
|
|
|
|
+ :class="{'chosen': chosenIndex === index}"
|
|
|
|
+ :style="`margin-top: ${index ? '12px' : '0'}`"
|
|
|
|
+ @mouseenter="item.active = true" @mouseleave="item.active = false"
|
|
|
|
+ @click="handleClick(item, index)"
|
|
|
|
+ >
|
|
|
|
+ <div class="job-info">
|
|
<div class="sub-li-top">
|
|
<div class="sub-li-top">
|
|
<div class="sub-li-info">
|
|
<div class="sub-li-info">
|
|
<p :class="['name', {'default-active': item.active }]">{{ item.job.name }}</p>
|
|
<p :class="['name', {'default-active': item.active }]">{{ item.job.name }}</p>
|
|
@@ -23,7 +29,7 @@
|
|
<span v-for="(j, i) in item.job.tagList" :key="i" class="mr-3 tags" style="color: #345768;">{{ j }}</span>
|
|
<span v-for="(j, i) in item.job.tagList" :key="i" class="mr-3 tags" style="color: #345768;">{{ j }}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div class="sub-li-bottom" @click="handleEnterprise(item)">
|
|
|
|
|
|
+ <div class="sub-li-bottom">
|
|
<div class="user-info">
|
|
<div class="user-info">
|
|
<div class="d-flex align-center">
|
|
<div class="d-flex align-center">
|
|
<v-avatar size="35">
|
|
<v-avatar size="35">
|
|
@@ -49,12 +55,14 @@
|
|
defineOptions({ name: 'position-card-item' })
|
|
defineOptions({ name: 'position-card-item' })
|
|
import { ref, watch } from 'vue'
|
|
import { ref, watch } from 'vue'
|
|
|
|
|
|
|
|
+const emit = defineEmits([''])
|
|
const props = defineProps({
|
|
const props = defineProps({
|
|
items: {
|
|
items: {
|
|
type: Array,
|
|
type: Array,
|
|
default: () => []
|
|
default: () => []
|
|
}
|
|
}
|
|
})
|
|
})
|
|
|
|
+const chosenIndex = ref(0)
|
|
const list = ref([])
|
|
const list = ref([])
|
|
watch(
|
|
watch(
|
|
() => props.items,
|
|
() => props.items,
|
|
@@ -70,12 +78,14 @@ const desc = [
|
|
{ mdi: 'mdi-clock-time-ten-outline', value: 'expName' }
|
|
{ mdi: 'mdi-clock-time-ten-outline', value: 'expName' }
|
|
]
|
|
]
|
|
|
|
|
|
-const handlePosition = (item) => {
|
|
|
|
- console.log(item, 'iiiiiiii')
|
|
|
|
-}
|
|
|
|
-const handleEnterprise = (item) => {
|
|
|
|
- window.open(`/recruit/personal/company/details/${item.enterprise.id}?key=briefIntroduction`)
|
|
|
|
|
|
+const handleClick = (item, index) => {
|
|
|
|
+ chosenIndex.value = index
|
|
|
|
+ list.value.forEach((e, i) => e.active = i === index )
|
|
|
|
+ emit('selectChange', item)
|
|
}
|
|
}
|
|
|
|
+// const handleEnterprise = (item) => {
|
|
|
|
+// window.open(`/recruit/personal/company/details/${item.enterprise.id}?key=briefIntroduction`)
|
|
|
|
+// }
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
@@ -83,19 +93,23 @@ const handleEnterprise = (item) => {
|
|
width: 100%;
|
|
width: 100%;
|
|
height: 100%;
|
|
height: 100%;
|
|
}
|
|
}
|
|
|
|
+.chosen { border: 1px solid var(--v-primary-lighten2) !important; }
|
|
.sub-li {
|
|
.sub-li {
|
|
position: relative;
|
|
position: relative;
|
|
width: 384px;
|
|
width: 384px;
|
|
height: 149px;
|
|
height: 149px;
|
|
- margin-bottom: 12px;
|
|
|
|
|
|
+ margin-right: 8px;
|
|
|
|
+ margin-top: 12px;
|
|
border-radius: 12px;
|
|
border-radius: 12px;
|
|
padding: 0;
|
|
padding: 0;
|
|
overflow: hidden;
|
|
overflow: hidden;
|
|
cursor: pointer;
|
|
cursor: pointer;
|
|
- transition: all .2s linear;
|
|
|
|
|
|
+ // transition: all .2s linear;
|
|
background-color: #fff;
|
|
background-color: #fff;
|
|
|
|
+ border: 1px solid #fff;
|
|
&:hover {
|
|
&:hover {
|
|
box-shadow: 0 16px 40px 0 rgba(153, 153, 153, .3);
|
|
box-shadow: 0 16px 40px 0 rgba(153, 153, 153, .3);
|
|
|
|
+ .salary { color: var(--v-primary-base) !important; }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
.job-info {
|
|
.job-info {
|
|
@@ -170,9 +184,9 @@ const handleEnterprise = (item) => {
|
|
}
|
|
}
|
|
.names {
|
|
.names {
|
|
font-weight: 500;
|
|
font-weight: 500;
|
|
- color: #404040;
|
|
|
|
&:hover {
|
|
&:hover {
|
|
- color: var(--v-primary-base);
|
|
|
|
|
|
+ // color: var(--v-primary-base);
|
|
|
|
+ color: #404040;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|