|
@@ -7,19 +7,18 @@
|
|
<span class="breadcrumbsText" :class="{ active: !item.disabled && index !== breadcrumbs.length-1 }" @click="breadcrumbsClickDeal({ e: item, breadcrumbs, index })">{{ item.text }}</span>
|
|
<span class="breadcrumbsText" :class="{ active: !item.disabled && index !== breadcrumbs.length-1 }" @click="breadcrumbsClickDeal({ e: item, breadcrumbs, index })">{{ item.text }}</span>
|
|
</template>
|
|
</template>
|
|
</v-breadcrumbs>
|
|
</v-breadcrumbs>
|
|
- <headSearch v-model="content" placeholder="搜索公司关键字" @handleSearch="handleSearch"></headSearch>
|
|
|
|
|
|
+ <headSearch v-model="query.keyword" placeholder="搜索公司关键字" @handleSearch="handleSearch"></headSearch>
|
|
</div>
|
|
</div>
|
|
<Empty v-if="!items.length" :message="loadingType === 1 ? loadingText[loadingType] : '该招聘会暂无企业参与,前往其他招聘会看看吧~'" class="mt-3 py-15"></Empty>
|
|
<Empty v-if="!items.length" :message="loadingType === 1 ? loadingText[loadingType] : '该招聘会暂无企业参与,前往其他招聘会看看吧~'" class="mt-3 py-15"></Empty>
|
|
<template v-else>
|
|
<template v-else>
|
|
<div class="d-flex">
|
|
<div class="d-flex">
|
|
<div class="mt-3">
|
|
<div class="mt-3">
|
|
<EntCard :list="items" @selectChange="selectChange" />
|
|
<EntCard :list="items" @selectChange="selectChange" />
|
|
- <div class="loading defaultLink-i" @click="handleLoadMore">查看更多</div>
|
|
|
|
- <div v-if="showLoadingMore" :class="['loading', {'defaultLink-i': !loadingType}]" @click="handleChangePage">{{ loadingText[loadingType] }}</div>
|
|
|
|
|
|
+ <div :class="['loading', {'defaultLink-i': !loadingType}]" @click="handleChangePage">{{ loadingText[loadingType] }}</div>
|
|
</div>
|
|
</div>
|
|
<div class="position-details ml-3" style="flex: 1; overflow: hidden;">
|
|
<div class="position-details ml-3" style="flex: 1; overflow: hidden;">
|
|
<div class="position-content pa-3">
|
|
<div class="position-content pa-3">
|
|
- <JobCard :enterpriseId="enterpriseId" :enterpriseName="enterpriseName" />
|
|
|
|
|
|
+ <JobCard :enterpriseId="enterpriseId" :enterpriseName="enterpriseName" :jobFairId="route.params.id" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -33,14 +32,13 @@ defineOptions({ name: 'personalPositionRecommend'})
|
|
import buttons from '@/views/recruit/personal/components/buttons.vue'
|
|
import buttons from '@/views/recruit/personal/components/buttons.vue'
|
|
import { ref, reactive } from 'vue'
|
|
import { ref, reactive } from 'vue'
|
|
import { getJobFairEnterprisePage } from '@/api/recruit/personal/jobFair'
|
|
import { getJobFairEnterprisePage } from '@/api/recruit/personal/jobFair'
|
|
-
|
|
|
|
import EntCard from './components/entCard.vue'
|
|
import EntCard from './components/entCard.vue'
|
|
import JobCard from './components/jobCard.vue'
|
|
import JobCard from './components/jobCard.vue'
|
|
import { useRoute } from 'vue-router'; const route = useRoute()
|
|
import { useRoute } from 'vue-router'; const route = useRoute()
|
|
import { breadcrumbsClickDeal, getJobFairBreadcrumbs } from '@/utils/index'
|
|
import { breadcrumbsClickDeal, getJobFairBreadcrumbs } from '@/utils/index'
|
|
import { formatName } from '@/utils/getText'
|
|
import { formatName } from '@/utils/getText'
|
|
|
|
+import { dealDictArrayData } from '@/utils/position'
|
|
|
|
|
|
-const showLoadingMore = ref(false)
|
|
|
|
const breadcrumbs = ref(getJobFairBreadcrumbs(route?.query) || [])
|
|
const breadcrumbs = ref(getJobFairBreadcrumbs(route?.query) || [])
|
|
|
|
|
|
// 切换企业选中
|
|
// 切换企业选中
|
|
@@ -51,12 +49,11 @@ const selectChange = (val) => {
|
|
enterpriseName.value = formatName(val.anotherName || val.name)
|
|
enterpriseName.value = formatName(val.anotherName || val.name)
|
|
}
|
|
}
|
|
|
|
|
|
-const total = ref(0)
|
|
|
|
-const content = ref('')
|
|
|
|
const query = reactive({
|
|
const query = reactive({
|
|
pageNo: 1,
|
|
pageNo: 1,
|
|
pageSize: 10,
|
|
pageSize: 10,
|
|
- jobFairId: route.params.id
|
|
|
|
|
|
+ jobFairId: route.params.id,
|
|
|
|
+ keyword: ''
|
|
})
|
|
})
|
|
|
|
|
|
const items = ref([])
|
|
const items = ref([])
|
|
@@ -67,14 +64,13 @@ const loadingType = ref(0)
|
|
const getList = async () => {
|
|
const getList = async () => {
|
|
loadingType.value = 1
|
|
loadingType.value = 1
|
|
try {
|
|
try {
|
|
- const { list, total } = await getJobFairEnterprisePage(query)
|
|
|
|
- console.log(list, '企业列表')
|
|
|
|
|
|
+ const result = await getJobFairEnterprisePage(query)
|
|
|
|
+ const list = result?.list || []
|
|
if (list.length) {
|
|
if (list.length) {
|
|
- items.value = items.value.concat(list)
|
|
|
|
- loadingType.value = list.length === query.pageSize ? 0 : 2
|
|
|
|
|
|
+ items.value = items.value.concat(dealDictArrayData([], list))
|
|
|
|
+ loadingType.value = list.length === result.total ? 2 : 0
|
|
enterpriseId.value = items.value[0].id
|
|
enterpriseId.value = items.value[0].id
|
|
enterpriseName.value = formatName(items.value[0].anotherName || items.value[0].name)
|
|
enterpriseName.value = formatName(items.value[0].anotherName || items.value[0].name)
|
|
- getPositionList()
|
|
|
|
} else {
|
|
} else {
|
|
loadingType.value = 2
|
|
loadingType.value = 2
|
|
}
|
|
}
|
|
@@ -82,7 +78,12 @@ const getList = async () => {
|
|
}
|
|
}
|
|
getList()
|
|
getList()
|
|
|
|
|
|
-const handleSearch = (val) => {}
|
|
|
|
|
|
+const handleSearch = (val) => {
|
|
|
|
+ query.keyword = val
|
|
|
|
+ query.pageNo = 1
|
|
|
|
+ items.value = []
|
|
|
|
+ getList()
|
|
|
|
+}
|
|
|
|
|
|
const handleChangePage = () => {
|
|
const handleChangePage = () => {
|
|
if (loadingType.value) return // 没有更多数据了
|
|
if (loadingType.value) return // 没有更多数据了
|
|
@@ -90,11 +91,6 @@ const handleChangePage = () => {
|
|
query.pageNo++
|
|
query.pageNo++
|
|
getList()
|
|
getList()
|
|
}
|
|
}
|
|
-
|
|
|
|
-const handleLoadMore = () => {
|
|
|
|
-
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
<style scoped lang="scss">
|