|
@@ -1,10 +1,10 @@
|
|
|
<template>
|
|
|
<v-card class="position-box">
|
|
|
- <h4 class="h4 mb-3">推荐职位</h4>
|
|
|
- <div v-for="(item, index) in list" :key="index" class="mb-2 cursor-pointer" @click="handlePosition(item)">
|
|
|
+ <h4 class="h4 mb-3">{{ $t('position.recommend') }}</h4>
|
|
|
+ <div v-for="(item, index) in items" :key="index" class="mb-2 cursor-pointer" @click="handlePosition(item)">
|
|
|
<p class="recruit-name">{{ item.name }}</p>
|
|
|
<span class="recruit-salary">{{ item.payFrom }}-{{ item.payTo }}k/{{ item.payName }}</span>
|
|
|
- <div :class="['enterprise', {'border-bottom-dashed': index !== list.length - 1}]">
|
|
|
+ <div :class="['enterprise', {'border-bottom-dashed': index !== items.length - 1}]" @click="handleEnterprise(item)">
|
|
|
<v-img class="float-left" :src="item.logoUrl || 'https://minio.citupro.com/dev/menduner/company-avatar.png'" :width="30" :height="30"></v-img>
|
|
|
<span class="float-left enterprise-name">{{ item.anotherName }}</span>
|
|
|
<span class="float-right enterprise-address">{{ item.areaName }}</span>
|
|
@@ -15,49 +15,42 @@
|
|
|
|
|
|
<script setup>
|
|
|
defineOptions({name: 'retrieval-components-recommendedPositions'})
|
|
|
-const list = [
|
|
|
- {
|
|
|
- name: '项目经历',
|
|
|
- payFrom: 11,
|
|
|
- payTo: 13,
|
|
|
- payName: '月',
|
|
|
- logoUrl: 'https://cdn.vuetifyjs.com/images/john.jpg',
|
|
|
- anotherName: '广州辞图科技有限公司',
|
|
|
- areaName: '广州·越秀'
|
|
|
- },
|
|
|
- {
|
|
|
- name: '项目经历',
|
|
|
- payFrom: 11,
|
|
|
- payTo: 13,
|
|
|
- payName: '月',
|
|
|
- logoUrl: 'https://cdn.vuetifyjs.com/images/john.jpg',
|
|
|
- anotherName: '广州辞图科技有限公司',
|
|
|
- areaName: '广州·越秀'
|
|
|
- },
|
|
|
- {
|
|
|
- name: '项目经历',
|
|
|
- payFrom: 11,
|
|
|
- payTo: 13,
|
|
|
- payName: '月',
|
|
|
- logoUrl: 'https://cdn.vuetifyjs.com/images/john.jpg',
|
|
|
- anotherName: '广州辞图科技有限公司',
|
|
|
- areaName: '广州·越秀'
|
|
|
- },
|
|
|
-]
|
|
|
+import { ref } from 'vue'
|
|
|
+import { getPromotedPosition } from '@/api/position'
|
|
|
+import { dealDictArrayData } from '@/views/recruit/personal/position/components/dict'
|
|
|
+
|
|
|
+const items = ref([])
|
|
|
+
|
|
|
+const getList = async () => {
|
|
|
+ const { list } = await getPromotedPosition({ pageSize: 10, pageNo: 1 })
|
|
|
+ items.value = dealDictArrayData([], list)
|
|
|
+}
|
|
|
+getList()
|
|
|
+
|
|
|
+const handlePosition = (item) => {
|
|
|
+ if (!item.id) return
|
|
|
+ window.open(`/recruit/personal/position/details/${item.id}`)
|
|
|
+}
|
|
|
+
|
|
|
+const handleEnterprise = (item) => {
|
|
|
+ if (!item.enterpriseId) return
|
|
|
+ window.open(`/recruit/personal/company/details/${item.enterpriseId}?key=briefIntroduction`)
|
|
|
+}
|
|
|
</script>
|
|
|
+
|
|
|
<style lang="scss" scoped>
|
|
|
.position-box {
|
|
|
position: relative;
|
|
|
- width: 284px;
|
|
|
+ width: 320px;
|
|
|
height: 100%;
|
|
|
border-radius: 8px;
|
|
|
padding: 20px 15px;
|
|
|
}
|
|
|
.recruit-name {
|
|
|
- width: 95px;
|
|
|
+ width: 125px;
|
|
|
font-weight: 500;
|
|
|
display: inline-block;
|
|
|
- max-width: 95px;
|
|
|
+ max-width: 125px;
|
|
|
vertical-align: middle;
|
|
|
white-space: nowrap;
|
|
|
text-overflow: ellipsis;
|