瀏覽代碼

招聘会调整

Xiao_123 4 月之前
父節點
當前提交
9a8725f2dc

+ 5 - 2
src/views/recruit/personal/jobFair/details/components/entCard1.vue

@@ -18,7 +18,7 @@
 						</div>
 					</div>
 				</div>
-				<div class="card-bottom px-5" @click="jumpToEnterpriseDetail(val.id, true, 1)">
+				<div class="card-bottom px-5" @click="handleClickEnterprise(val.id)">
 					{{ val.jobCount }}个在线职位招聘中
 					<v-icon>mdi-arrow-right-drop-circle-outline</v-icon>
 				</div>
@@ -33,8 +33,11 @@ import { formatName } from '@/utils/getText'
 import { jumpToEnterpriseDetail } from '@/utils/position'
 
 defineProps({
-	list: Array
+	list: Array,
+	jobFairId: String
 })
+
+const handleClickEnterprise = (id) => {}
 </script>
 
 <style scoped lang="scss">

+ 22 - 19
src/views/recruit/personal/jobFair/details/components/jobCard1.vue

@@ -1,31 +1,32 @@
 <template>
 	<div class="content">
 		<v-hover v-slot="{ isHovering, props }" v-for="val in list" :key="val.id">
-			<v-card  class="cursor-pointer mb-3 pa-4" v-bind="props" :elevation="isHovering ? 10 : 5" @click="handleClick(val.id)">
-				<div class="d-flex justify-space-between">
-					<div class="d-flex align-center">
-						<!-- <svg-icon name="jobFair" size="20" class="mr-1"></svg-icon> -->
-						<p class="job-name font-weight-medium" v-ellipse-tooltip>{{ formatName(val.name) }}</p>
+			<v-card  class="cursor-pointer mb-3 pa-4" v-bind="props" :elevation="isHovering ? 10 : 5" >
+				<div @click="handleClick(val.id)">
+					<div class="d-flex justify-space-between">
+						<div class="d-flex align-center">
+							<p class="job-name font-weight-medium" v-ellipse-tooltip>{{ formatName(val.name) }}</p>
+						</div>
+						<p v-if="!val.payFrom && !val.payTo" class="salary">面议</p>
+						<p v-else class="salary ml-3">{{ val.payFrom ? val.payFrom + '-' : '' }}{{ val.payTo }}{{ val.payName ? '/' + val.payName : '' }}</p>
 					</div>
-					<p v-if="!val.payFrom && !val.payTo" class="salary">面议</p>
-					<p v-else class="salary ml-3">{{ val.payFrom ? val.payFrom + '-' : '' }}{{ val.payTo }}{{ val.payName ? '/' + val.payName : '' }}</p>
-				</div>
-				<div class="d-flex justify-space-between mt-3">
-					<div class="color-999 font-size-15">
-						<span v-for="k in desc" :key="k.mdi">
-							<span v-if="val[k.value] || k.value === 'areaName'" class="mr-5">
-								<v-icon color="var(--color-666)" size="15">{{ k.mdi }}</v-icon>
-								<span class="ml-1 tag-text">
-									{{ k.value === 'areaName' ? !val.areaId ? '全国' : val.area?.str : val[k.value] }}
+					<div class="d-flex justify-space-between mt-3">
+						<div class="color-999 font-size-15">
+							<span v-for="k in desc" :key="k.mdi">
+								<span v-if="val[k.value] || k.value === 'areaName'" class="mr-5">
+									<v-icon color="var(--color-666)" size="15">{{ k.mdi }}</v-icon>
+									<span class="ml-1 tag-text">
+										{{ k.value === 'areaName' ? !val.areaId ? '全国' : val.area?.str : val[k.value] }}
+									</span>
 								</span>
 							</span>
-						</span>
+						</div>
+						<div class="font-size-14 color-999">{{ timesTampChange(val.updateTime) }} 刷新</div>
 					</div>
-					<div class="font-size-14 color-999">{{ timesTampChange(val.updateTime) }} 刷新</div>
 				</div>
 				<v-divider class="mt-3" />
 				<!-- 企业信息 -->
-				<div class="d-flex align-center pt-4">
+				<div class="d-flex align-center pt-4" @click="jumpToEnterpriseDetail(val.enterprise.id, true)">
 					<img :src="val.enterprise.logoUrl || 'https://minio.citupro.com/dev/menduner/company-avatar.png'" style="width: 60px; height: 60px; border-radius: 4px;border: 1px solid #ccc;" />
 					<div class="ml-3" style="flex: 1;">
 						<h3 v-ellipse-tooltip class="font-weight-medium enterprise-name" style="max-width: 480px;">{{ formatName(val.enterprise.anotherName || val.enterprise.name) }}</h3>
@@ -45,9 +46,11 @@
 defineOptions({ name: 'jobCard' })
 import { formatName } from '@/utils/getText'
 import { timesTampChange } from '@/utils/date'
+import { jumpToEnterpriseDetail } from '@/utils/position'
 
 const props = defineProps({
-	list: Array
+	list: Array,
+	jobFairId: [String, Number]
 })
 
 // 城市、学历、工作经验

+ 120 - 0
src/views/recruit/personal/jobFair/details/entJobCard.vue

@@ -0,0 +1,120 @@
+<!-- 企业 -->
+<template>
+  <div>
+    <!-- 轮播 -->
+    <v-carousel v-if="jobFair?.pcHeadImg && jobFair?.pcHeadImg.length > 0" :show-arrows="jobFair?.pcHeadImg.length > 1 ? 'hover' : false" cycle :hide-delimiters="true" style="height: 500px;">
+			<v-carousel-item v-for="(k, i) in jobFair?.pcHeadImg" :key="i">
+				<img :src="k" :lazy-src="k" style="width: 100%; height:100%;">
+			</v-carousel-item>
+		</v-carousel>
+
+    <div :style="`background-color: ${jobFair.backgroundColour}; min-height: calc(100vh - 500px);`">
+      <div class="default-width">
+        <div v-if="!items.length" class="emptyText">{{ loadingType === 1 ? loadingText[loadingType] : '暂无数据,去看看其他吧~' }}</div>
+        <template v-else>
+          <JobCard :jobFairId="jobFair?.id" :list="items" class="mt-5" />
+          <div :class="['loading', {'loadMoreText': !loadingType}]" class="pb-5" @click="handleChangePage">{{ loadingText[loadingType] }}</div>
+        </template>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script setup>
+defineOptions({name: 'jobFair-enterprises-job-card'})
+import { ref, reactive } from 'vue'
+import { getJobFair, getJobFairEntJobPage } from '@/api/recruit/personal/jobFair'
+import JobCard from './components/jobCard1.vue'
+import { useRoute } from 'vue-router'; const route = useRoute();
+import { dealDictObjData } from '@/utils/position'
+
+const tab = ref(0)
+const query = reactive({
+  pageNo: 1,
+  pageSize: 20,
+	jobFairId: route.params.id,
+  enterpriseId: route.query.enterpriseId,
+})
+
+const items = ref([])
+const loadingText = ['点击加载更多', '加载中...', '']
+const loadingType = ref(0)
+
+// 参与招聘会的企业
+const getList = async () => {
+	loadingType.value = 1
+
+  // 有类别的添加筛选条件
+  if (jobFair.value?.tag && jobFair.value?.tag.length) {
+    const key = jobFair.value.tag[tab.value].key
+    const value = jobFair.value.tag[tab.value].value
+    query[key] = value
+  }
+
+	try {
+		const result = await getJobFairEntJobPage(query)
+		const list = result?.list || []
+    if (list.length) {
+      items.value.push(...list.map(e => {
+        e.enterprise = dealDictObjData({}, e.enterprise)
+        e = dealDictObjData({}, e)
+        return e
+      }))
+
+			loadingType.value = items.value.length === result.total ? 2 : 0
+		} else {
+			loadingType.value = 2
+		}
+	} catch {}
+}
+
+// 招聘会详情
+const jobFair = ref([])
+const getJobFairDetail = async () => {
+  const data = await getJobFair(route?.params?.id)
+  if (!data) return
+  jobFair.value = data
+  // document.title = data.title.replace(/<\/?p[^>]*>/gi, '')
+  getList()
+}
+getJobFairDetail()
+
+
+const handleChangePage = () => {
+  if (loadingType.value) return // 没有更多数据了
+  // 加载更多
+  query.pageNo++
+  getList()
+}
+</script>
+
+<style scoped lang="scss">
+.emptyText {
+  color: #fff;
+  height: calc(100vh - 574px);
+  line-height: calc(100vh - 574px);
+  text-align: center;
+}
+.loading {
+  margin-top: 8px;
+  text-align: center;
+  font-size: 18px;
+  color: #fff;
+}
+.loadMoreText {
+  color: #fff;
+  cursor: pointer;
+}
+::-webkit-scrollbar {
+  width: 0;
+  height: 0;
+}
+::-webkit-scrollbar-thumb, .temporaryAdd ::-webkit-scrollbar-thumb, .details_edit ::-webkit-scrollbar-thumb {
+  // 滚动条-颜色
+  background: #c3c3c379;
+}
+::-webkit-scrollbar-track, .temporaryAdd ::-webkit-scrollbar-track, .details_edit ::-webkit-scrollbar-track {
+  // 滚动条-底色
+  background: #e5e5e58f;
+}
+</style>

+ 10 - 6
src/views/recruit/personal/jobFair/details/enterprises.vue

@@ -2,7 +2,7 @@
 <template>
   <div>
     <!-- 轮播 -->
-    <v-carousel v-if="jobFair?.pcHeadImg && jobFair?.pcHeadImg.length > 0"  cycle :hide-delimiters="true" style="height: 500px;">
+    <v-carousel v-if="jobFair?.pcHeadImg && jobFair?.pcHeadImg.length > 0" :show-arrows="jobFair?.pcHeadImg.length > 1 ? 'hover' : false" cycle :hide-delimiters="true" style="height: 500px;">
 			<v-carousel-item v-for="(k, i) in jobFair?.pcHeadImg" :key="i">
 				<img :src="k" :lazy-src="k" style="width: 100%; height:100%;">
 			</v-carousel-item>
@@ -26,9 +26,9 @@
 
         <div v-if="!items.length" class="emptyText">{{ loadingType === 1 ? loadingText[loadingType] : '暂无数据,去看看其他吧~' }}</div>
         <template v-else>
-          <EntCard v-if="jobFair?.category === '0'" :list="items" class="mt-5" />
-          <JobCard v-if="jobFair?.category === '1'" :list="items" class="mt-5" />
-          <div :class="['loading', {'defaultLink-i': !loadingType}]" @click="handleChangePage">{{ loadingText[loadingType] }}</div>
+          <EntCard v-if="jobFair?.category === '0'" :jobFairId="jobFair?.id" :list="items" class="mt-5" />
+          <JobCard v-if="jobFair?.category === '1'" :jobFairId="jobFair?.id" :list="items" class="mt-5" />
+          <div :class="['loading', {'loadMoreText': !loadingType}]" class="pb-5" @click="handleChangePage">{{ loadingText[loadingType] }}</div>
         </template>
       </div>
     </div>
@@ -52,7 +52,7 @@ const query = reactive({
 })
 
 const items = ref([])
-const loadingText = ['加载更多', '加载中...', '没有更多数据了']
+const loadingText = ['点击加载更多', '加载中...', '']
 const loadingType = ref(0)
 
 // 参与招聘会的企业
@@ -150,9 +150,13 @@ const handleChangePage = () => {
 .loading {
   margin-top: 8px;
   text-align: center;
-  font-size: 13px;
+  font-size: 18px;
   color: #fff;
 }
+.loadMoreText {
+  color: #fff;
+  cursor: pointer;
+}
 ::-webkit-scrollbar {
   width: 0;
   height: 0;