|
@@ -1,40 +1,46 @@
|
|
|
<template>
|
|
|
<div class="d-flex">
|
|
|
<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-info">
|
|
|
- <p :class="['name', {'default-active': item.active }]">{{ item.job.name }}</p>
|
|
|
- <svg-icon v-if="item.job.hire" name="pin" size="30"></svg-icon>
|
|
|
+ <p :class="['name', {'default-active': item.active }]">{{ item.name }}</p>
|
|
|
+ <svg-icon v-if="item.hire" name="pin" size="30"></svg-icon>
|
|
|
</div>
|
|
|
- <p v-if="!item.job.payFrom && !item.job.payTo" class="salary">面议</p>
|
|
|
- <p v-else class="salary">{{ item.job.payFrom ? item.job.payFrom + '-' : '' }}{{ item.job.payTo }}{{ item.job.payName ? '/' + item.job.payName : '' }}</p>
|
|
|
+ <p v-if="!item.payFrom && !item.payTo" class="salary">面议</p>
|
|
|
+ <p v-else class="salary">{{ item.payFrom ? item.payFrom + '-' : '' }}{{ item.payTo }}{{ item.payName ? '/' + item.payName : '' }}</p>
|
|
|
</div>
|
|
|
<div class="d-flex justify-space-between align-center">
|
|
|
<div>
|
|
|
<span v-for="(j, i) in desc" :key="i" class="font-size-13" style="color: #808080;">
|
|
|
- <span v-if="item.job[j.value]" class="mr-1 d-inline-block">{{ item.job[j.value] }}</span>
|
|
|
- <span v-if="i !== desc.length - 1 && item.job[j.value] && item.job[desc[i + 1].value]" class="septal-line ml-1"></span>
|
|
|
+ <span v-if="item[j.value]" class="mr-1 d-inline-block">{{ item[j.value] }}</span>
|
|
|
+ <span v-if="i !== desc.length - 1 && item[j.value] && item[desc[i + 1].value]" class="septal-line ml-1"></span>
|
|
|
</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="ellipsis" style="height: 24px;overflow: hidden;">
|
|
|
- <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.tagList" :key="i" class="mr-3 tags" style="color: #345768;">{{ j }}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="sub-li-bottom" @click="handleEnterprise(item)">
|
|
|
+ <div class="sub-li-bottom">
|
|
|
<div class="user-info">
|
|
|
<div class="d-flex align-center">
|
|
|
<v-avatar size="35">
|
|
|
- <v-img :src="item.enterprise.logoUrl || 'https://minio.citupro.com/dev/menduner/company-avatar.png'" />
|
|
|
+ <v-img :src="item.logoUrl || 'https://minio.citupro.com/dev/menduner/company-avatar.png'" />
|
|
|
</v-avatar>
|
|
|
<span class="names ml-2 font-size-14 ellipsis" style="max-width: 88%;">
|
|
|
- {{ item.enterprise.anotherName }}
|
|
|
+ {{ item.anotherName }}
|
|
|
<span class="color-999 font-size-13 ml-3">
|
|
|
- <span>{{ item.enterprise.industryName }}</span>
|
|
|
- <span class="septal-line" v-if="item.enterprise.industryName && item.enterprise.scaleName"></span>
|
|
|
- <span>{{ item.enterprise.scaleName }}</span>
|
|
|
+ <span>{{ item.industryName }}</span>
|
|
|
+ <span class="septal-line" v-if="item.industryName && item.scaleName"></span>
|
|
|
+ <span>{{ item.scaleName }}</span>
|
|
|
</span>
|
|
|
</span>
|
|
|
</div>
|
|
@@ -49,12 +55,14 @@
|
|
|
defineOptions({ name: 'position-card-item' })
|
|
|
import { ref, watch } from 'vue'
|
|
|
|
|
|
+const emit = defineEmits([''])
|
|
|
const props = defineProps({
|
|
|
items: {
|
|
|
type: Array,
|
|
|
default: () => []
|
|
|
}
|
|
|
})
|
|
|
+const chosenIndex = ref(0)
|
|
|
const list = ref([])
|
|
|
watch(
|
|
|
() => props.items,
|
|
@@ -70,12 +78,14 @@ const desc = [
|
|
|
{ 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.id}?key=briefIntroduction`)
|
|
|
+// }
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
@@ -83,19 +93,23 @@ const handleEnterprise = (item) => {
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
|
}
|
|
|
+.chosen { border: 1px solid var(--v-primary-lighten2) !important; }
|
|
|
.sub-li {
|
|
|
position: relative;
|
|
|
width: 384px;
|
|
|
height: 149px;
|
|
|
- margin-bottom: 12px;
|
|
|
+ margin-right: 8px;
|
|
|
+ margin-top: 12px;
|
|
|
border-radius: 12px;
|
|
|
padding: 0;
|
|
|
overflow: hidden;
|
|
|
cursor: pointer;
|
|
|
- transition: all .2s linear;
|
|
|
+ // transition: all .2s linear;
|
|
|
background-color: #fff;
|
|
|
+ border: 1px solid #fff;
|
|
|
&:hover {
|
|
|
box-shadow: 0 16px 40px 0 rgba(153, 153, 153, .3);
|
|
|
+ .salary { color: var(--v-primary-base) !important; }
|
|
|
}
|
|
|
}
|
|
|
.job-info {
|
|
@@ -170,9 +184,9 @@ const handleEnterprise = (item) => {
|
|
|
}
|
|
|
.names {
|
|
|
font-weight: 500;
|
|
|
- color: #404040;
|
|
|
&:hover {
|
|
|
- color: var(--v-primary-base);
|
|
|
+ // color: var(--v-primary-base);
|
|
|
+ color: #404040;
|
|
|
}
|
|
|
}
|
|
|
</style>
|