|
@@ -3,11 +3,11 @@
|
|
|
<div style="background-color: #fff; position: sticky;" class="pb-4">
|
|
|
<buttons :current="3"></buttons>
|
|
|
<v-breadcrumbs v-if="breadcrumbs?.length" :items="breadcrumbs">
|
|
|
- <template v-slot:item="{ item, index }">
|
|
|
- <span class="breadcrumbsText" :class="{ active: !item.disabled && index !== breadcrumbs.length-1 }" @click="breadcrumbsClickDeal({ e: item, breadcrumbs, index })">{{ item.text }}</span>
|
|
|
+ <template v-slot:item="{ item }">
|
|
|
+ <span class="breadcrumbsText" :class="{ active: !item.disabled }" @click="handleClick(item)">{{ item.text }}</span>
|
|
|
</template>
|
|
|
</v-breadcrumbs>
|
|
|
- <headSearch v-model="query.keyword" placeholder="搜索公司关键字" @handleSearch="handleSearch"></headSearch>
|
|
|
+ <headSearch v-model="query.keyword" :class="{'mt-3': !breadcrumbs?.length}" placeholder="搜索公司关键字" @handleSearch="handleSearch"></headSearch>
|
|
|
</div>
|
|
|
<Empty v-if="!items.length" :message="loadingType === 1 ? loadingText[loadingType] : '该招聘会暂无企业参与,前往其他招聘会看看吧~'" class="mt-3 py-15"></Empty>
|
|
|
<template v-else>
|
|
@@ -31,15 +31,28 @@
|
|
|
defineOptions({ name: 'jobFairPosition' })
|
|
|
import buttons from '@/views/recruit/personal/components/buttons.vue'
|
|
|
import { ref, reactive } from 'vue'
|
|
|
-import { getJobFairEnterprisePage } from '@/api/recruit/personal/jobFair'
|
|
|
+import { getJobFairEnterprisePage, getJobFair } from '@/api/recruit/personal/jobFair'
|
|
|
import EntCard from './components/entCard.vue'
|
|
|
import JobCard from './components/jobCard.vue'
|
|
|
-import { useRoute } from 'vue-router'; const route = useRoute()
|
|
|
-import { breadcrumbsClickDeal, getJobFairBreadcrumbs } from '@/utils/index'
|
|
|
+import { useRoute, useRouter } from 'vue-router'; const route = useRoute(); const router = useRouter()
|
|
|
import { formatName } from '@/utils/getText'
|
|
|
import { dealDictArrayData } from '@/utils/position'
|
|
|
|
|
|
-const breadcrumbs = ref(getJobFairBreadcrumbs(route?.query) || [])
|
|
|
+const breadcrumbs = ref([
|
|
|
+ { text: '招聘会', path: '/recruit/personal/jobFair' },
|
|
|
+ { text: '', path: '', disabled: true }
|
|
|
+])
|
|
|
+const handleClick = (item) => {
|
|
|
+ if (!item.path || item.disabled) return
|
|
|
+ router.push(item.path)
|
|
|
+}
|
|
|
+// 招聘会详情-面包屑标题设置
|
|
|
+const getJobFairDetail = async () => {
|
|
|
+ const data = await getJobFair(route?.params?.id)
|
|
|
+ if (!data) return
|
|
|
+ breadcrumbs.value[breadcrumbs.value.length - 1].text = data.title.replace(/<\/?p[^>]*>/gi, '')
|
|
|
+}
|
|
|
+getJobFairDetail()
|
|
|
|
|
|
// 切换企业选中
|
|
|
const enterpriseId = ref('')
|