Преглед изворни кода

招聘会文件位置调整

Xiao_123 пре 3 месеци
родитељ
комит
cdaf039948

+ 1 - 17
src/router/modules/recruit.js

@@ -176,23 +176,7 @@ const recruit = [
       },
       {
         path: '/recruit/personal/jobFair/details/:id',
-        component: () => import('@/views/recruit/personal/jobFair/details.vue'),
-        name: 'jobFairDetails',
-        meta: {
-          title: '招聘会详情'
-        }
-      },
-      {
-        path: '/recruit/personal/jobFair/enterprise/:id',
-        component: () => import('@/views/recruit/personal/jobFair/enterprise/index.vue'),
-        name: 'jobFairEnterprise',
-        meta: {
-          title: '在招职位'
-        }
-      },
-      {
-        path: '/recruit/personal/jobFair/entDetails/:id',
-        component: () => import('@/views/recruit/personal/jobFair/position/index.vue'),
+        component: () => import('@/views/recruit/personal/jobFair/details/index.vue'),
         name: 'jobFairEntDetails',
         meta: {
           title: '招聘会详情'

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

@@ -1,148 +0,0 @@
-<template>
-	<div class="default-width">
-		<buttons :current="3" style="position: sticky;" class="mx-4"></buttons>
-		<div class="px-4">
-			<!-- 搜索框 -->
-			<div class="white-bgc py-5">
-				<v-breadcrumbs v-if="breadcrumbs?.length" :items="breadcrumbs" elevation="3">
-          <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-breadcrumbs>
-				<headSearch v-model="content" placeholder="搜索公司关键字" @handleSearch="handleSearch"></headSearch>
-			</div>
-
-			<!-- 参与招聘会企业列表 -->
-			<div class="mt-3">
-				<div class="content" v-if="list.length">
-					<v-card elevation="5" v-for="val in list" :key="val.id" class="cursor-pointer" @click="handleClickEnterprise(val)">
-						<div class="d-flex pa-4 pb-2">
-							<img :src="val.logoUrl" style="width: 80px; height: 80px; border-radius: 4px;" />
-							<div style="max-width: 455px;">
-								<h3 v-ellipse-tooltip class="enterprise-name ml-3">{{ formatName(val.name) }}</h3>
-								<p class="font-size-14 color-666 mt-1 mb-2 ml-3">{{ val.industryName }}</p>
-								<div class="flex-nowrap overflow-hidden pl-3" style="height: 35px;">
-									<v-hover v-slot="{ isHovering, props }" v-for="(job, index) in val.job" :key="index">
-										<v-chip v-bind="props" :class="isHovering ? 'elevation-5' : 'elevation-1'" class="mr-2 mb-4 display-inline-block" variant="flat" color="primary" size="small">{{ job.name }}</v-chip>
-									</v-hover>
-								</div>
-							</div>
-						</div>
-						<div class="card-bottom">{{ val.jobNum }}个在线职位招聘中</div>
-					</v-card>
-				</div>
-				<Empty v-else class="" message="暂无数据"></Empty>
-			</div>
-		</div>
-	</div>
-</template>
-
-<script setup>
-defineOptions({ name: 'jobFairDetails' })
-import { ref } from 'vue'
-import { formatName } from '@/utils/getText'
-import buttons from '@/views/recruit/personal/components/buttons.vue'
-// import { getJobFair } from '@/api/recruit/enterprise/jobFair'
-import { useRouter } from 'vue-router'; const router = useRouter()
-import { useRoute } from 'vue-router'; const route = useRoute()
-import { breadcrumbsClickDeal, getJobFairBreadcrumbs } from '@/utils/index'
-
-const breadcrumbs = ref(getJobFairBreadcrumbs(route?.query) || [])
-
-const content = ref('')
-
-const list = ref([
-	{
-		name: '苏州华贸姑苏里服务公寓',
-		id: '755518158911180800',
-		industryName: '全服务中档酒店/4星级',
-		jobNum: 8,
-		logoUrl: 'https://www.mendunerhr.com/images/1715235010000_755518158911180800_mini.jpg',
-		job: [
-			{ name: 'Executive Chef 行政总厨' },
-			{ name: 'Sales Manager 销售经理' },
-			{ name: 'Trainee Chef Intern 实习厨师' }
-		]
-	},
-	{
-		name: '济南鲁能希尔顿酒店及公寓',
-		id: '24610866855022592',
-		industryName: '酒店集团',
-		jobNum: 1,
-		logoUrl: 'https://www.mendunerhr.com/images/1540973133000_24610866855022592_mini.jpg',
-		job: [
-			{ name: '行政总厨' },
-			{ name: '销售经理' },
-			{ name: '实习厨师' }
-		]
-	},
-	{
-		name: '天津生态城世茂希尔顿酒店',
-		id: '69553335253995520',
-		industryName: '酒店集团',
-		jobNum: 3,
-		logoUrl: 'https://www.mendunerhr.com/images/1551688252363_69553335253995520_mini.jpg',
-		job: [
-			{ name: '行政总厨' },
-			{ name: '销售经理' },
-			{ name: '实习厨师' }
-		]
-	},
-])
-
-// 招聘会名称设置到面包屑中
-// const getMsg = async () => {
-  // const res = await getJobFair(route.params.id)
-  // breadcrumbs.value[breadcrumbs.value.length - 1].title = res.title.replace(/<\/?p[^>]*>/gi, '')
-// }
-// getMsg()
-
-const handleSearch = (val) => {
-	console.log(val, 'handleSearch')
-}
-
-const handleClickEnterprise = (val) => {
-	if (!val?.id) return
-	const path = '/recruit/personal/jobFair/enterprise/' + val.id
-	// 面包屑储存
-	const list = JSON.stringify([
-		...breadcrumbs.value,
-		{ text: val.name || '', path }
-	])
-	// 跳转
-  router.push({ path, query: { breadcrumbs: list } })
-}
-</script>
-
-<style scoped lang="scss">
-.content {
-  display: grid;
-  grid-template-columns: repeat(2, 1fr);
-  gap: 12px;
-  min-height: auto;
-}
-.card-bottom {
-	height: 40px;
-	line-height: 40px;
-	color: #fff;
-	text-align: center;
-	font-size: 15px;
-	background: linear-gradient(to right, #12ebb0, #427daa);
-	&:hover {
-		font-size: 16px;
-		font-weight: 700;
-	}
-}
-.enterprise-name:hover {
-	color: var(--v-primary-base);
-}
-
-.breadcrumbsText {
-  color: var(--color-999);
-  font-size: 15px;
-  &.active {
-    color: var(--v-primary-base);
-    cursor: pointer;
-  }
-}
-</style>

+ 0 - 0
src/views/recruit/personal/jobFair/position/components/entCard.vue → src/views/recruit/personal/jobFair/details/components/entCard.vue


+ 0 - 0
src/views/recruit/personal/jobFair/position/components/jobCard.vue → src/views/recruit/personal/jobFair/details/components/jobCard.vue


+ 0 - 0
src/views/recruit/personal/jobFair/position/index.vue → src/views/recruit/personal/jobFair/details/index.vue


+ 0 - 293
src/views/recruit/personal/jobFair/enterprise/index.vue

@@ -1,293 +0,0 @@
-<template>
-  <div class="default-width banner px-6">
-    <!-- 面包屑 -->
-    <div>
-      <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-breadcrumbs>
-    </div>
-    <div v-if="Object.keys(info).length">
-      <div class="banner-title" v-if="Object.keys(info).length">
-        <div class="float-left d-flex align-center">
-          <v-img width="60" height="60" :src="info.enterprise.logoUrl || 'https://minio.citupro.com/dev/menduner/company-avatar.png'"></v-img>
-          <div class="ml-4">
-            <div class="contact-name">{{ formatName(info.enterprise.anotherName || info.enterprise.name) }}</div>
-            <div class="contact-info">
-              {{ info.scaleName }}
-              <span v-if="info.industryName && info.scaleName">·</span> 
-              {{ info.industryName }}
-            </div>
-          </div>
-        </div>
-        <!-- <div class="float-right d-flex">
-          <v-btn color="primary" variant="text" size="large" @click.stop="handleReturn" prepend-icon="mdi-chevron-triple-left">返回上一页</v-btn>
-        </div> -->
-      </div>
-      <!-- <div class="text-end mb-3">
-        <v-tooltip location="bottom">
-          <template v-slot:activator="{ props }">
-            <v-icon v-bind="props" class="ml-5 mr-2" size="25" :color="isCollection ? 'error' : ''" @click.stop="handleFollow">{{ isCollection ? 'mdi-heart' : 'mdi-heart-outline' }}</v-icon>
-          </template>
-          <span>关注该企业</span>
-        </v-tooltip>
-      </div>
-      <v-divider></v-divider> -->
-      <div class="mt-3">
-        <v-tabs v-model="tab" align-tabs="start" color="primary" bg-color="#f3f3f3" @update:model-value="handleTabClick">
-          <v-tab :value="1">公司简介</v-tab>
-          <v-tab :value="2">在招职位</v-tab>
-        </v-tabs>
-        <div class="d-flex" v-if="Object.keys(info).length">
-          <div class="content-left">
-            <EnterpriseIntroduction v-if="tab === 1" :info="info" />
-            <recruitmentPositions v-else :info="info"/>
-          </div>
-          <div class="content-right">
-            <div class="welfare mb-3">
-              <h4>福利</h4>
-              <div v-if="info?.enterprise?.welfareList?.length" class="welfare-tags mt-3">
-                <v-chip size="small" label v-for="(k, i) in info?.enterprise?.welfareList?.slice(0, 6)" :key="i" class="mb-2 welfare-tags-item ellipsis" color="primary">{{ k }}</v-chip>
-              </div>
-              <div v-else class="color-666 font-size-14 mt-3">暂无</div>
-            </div>
-            <div class="welfare">
-              <h4>工商信息</h4>
-              <div :class="['mt-2', 'business-item']" v-for="val in businessList" :key="val.value">
-                <div>{{ val.label }}</div>
-                <div class="business-value ellipsis">
-                  {{ info?.business ? info.business[val.value] : '暂无' }}
-                  <span v-if="info?.business && val.value === 'registeredCapital' && info?.business[val.value] && info?.business[val.value].indexOf('万元') === -1">万元</span>
-                </div>
-                <div :class="['my-3']"></div>
-              </div>
-            </div>
-          </div>
-        </div>
-      </div>
-    </div>
-
-    <!-- 快速登录 -->
-    <loginPage v-if="showLogin" @loginSuccess="loginSuccess" @close="loginClose"></loginPage>
-  </div>
-</template>
-
-<script setup>
-defineOptions({name: 'jobFair-enterprise'})
-import { ref } from 'vue'
-import EnterpriseIntroduction from './introduction.vue'
-import recruitmentPositions from './positions.vue'
-import { getEnterpriseDetails, getEnterpriseSubscribeCheck, getEnterpriseSubscribe, getEnterpriseUnsubscribe, enterpriseClick } from '@/api/enterprise'
-import { timesTampChange } from '@/utils/date'
-import { dealDictObjData } from '@/utils/position'
-import { useRoute, useRouter } from 'vue-router'
-import { getToken } from '@/utils/auth'
-import Snackbar from '@/plugins/snackbar'
-import loginPage from '@/views/common/loginDialog.vue'
-import { formatName } from '@/utils/getText'
-import { breadcrumbsClickDeal, getJobFairBreadcrumbs } from '@/utils/index'
-
-const route = useRoute()
-const router = useRouter()
-const { id } = router.currentRoute.value.params
-const breadcrumbs = ref(getJobFairBreadcrumbs(route?.query) || [])
-
-const tab = ref(2)
-const savedTab = new URLSearchParams(window.location.search).get('key')
-tab.value = savedTab ? (savedTab === 'briefIntroduction' ? 1 : 2) : 2
-
-const handleTabClick = () => {
-  // router.push(`${route.path}?key=${tab.value === 1 ? 'briefIntroduction' : 'recruitmentPositions'}`)
-  const key = tab.value === 1 ? 'briefIntroduction' : 'recruitmentPositions'
-  const query = { ...route?.query, key }
-  router.push({ path: route.path, query })
-}
-
-
-// 返回上一页
-const handleReturn = () => {
-  if (window.history.state.back) {
-    router.back()
-  } else router.push('/recruitHome')
-}
-
-// 企业埋点
-const handleEnterpriseClick = async () => {
-  if (id) return
-  await enterpriseClick({ id })
-}
-handleEnterpriseClick()
-
-// 企业详情
-const info = ref({})
-const getDetails = async () => {
-  if (!id) return
-  const data = await getEnterpriseDetails({ id })
-  // 成立日期
-  if (data?.business?.establishmentTime) {
-    data.business.establishmentTime = timesTampChange(data.business.establishmentTime, 'Y-M-D')
-  }
-
-  info.value = { ...data, ...dealDictObjData({}, data.enterprise) }
-  getCollectionStatus(id)
-}
-getDetails()
-
-// 效验求职者是否关注该企业
-const isCollection = ref(false)
-const getCollectionStatus = async (id) => {
-  if (!getToken()) return isCollection.value = false
-  const data = await getEnterpriseSubscribeCheck({ enterpriseId: id })
-  isCollection.value = data
-}
-
-// 关注&取消关注企业
-const handleFollow = async () => {
-  if (!getToken()) {
-    showLogin.value = true // 打开快速登录弹窗
-    Snackbar.warning('您还未登录,请先登录后再试')
-    nextFunc.value = handleFollow // 登录成功后要执行的操作
-    loginCloseWarningWord = '您已取消登录,无法关注企业' // 取消登录提示语
-    return
-  }
-  const api = isCollection.value ? getEnterpriseUnsubscribe : getEnterpriseSubscribe
-  await api(isCollection.value ? id : { enterpriseId: id })
-  getCollectionStatus(id)
-}
-
-// 工商信息
-const businessList = [
-  { label: '企业类型:', value: 'type' },
-  { label: '统一社会信用代码:', value: 'code' },
-  { label: '成立日期:', value: 'establishmentTime' },
-  { label: '注册资本:', value: 'registeredCapital' }
-]
-
-const showLogin = ref(false)
-const nextFunc = ref(null)
-let loginCloseWarningWord = ''
-// 快速登录
-const loginSuccess = () => {
-  showLogin.value = false
-  Snackbar.success('登录成功')
-  if (nextFunc.value) nextFunc.value()
-}
-
-const loginClose = () => {
-  showLogin.value = false
-  Snackbar.warning(loginCloseWarningWord)
-}
-
-</script>
-
-<style scoped lang="scss">
-.banner {
-  background-color: #fff;
-  padding: 0 0 20px;
-}
-.banner-title {
-  display: flex;
-  align-items: center;
-  justify-content: space-between;
-  height: 100px;
-}
-.content-left {
-  width: 844px;
-  padding: 20px;
-}
-.content-right {
-  flex: 1;
-  padding: 20px 20px 0 0;
-}
-.contact {
-  height: 60px;
-  line-height: 60px;
-}
-.contact-name {
-  font-size: 28px;
-  font-weight: 700;
-  color: #37576c;
-  line-height: 28px;
-}
-.contact-info {
-  font-size: 15px;
-  font-weight: 500;
-  color: var(--color-222);
-  line-height: 21px;
-  margin-top: 8px;
-}
-.tools-box {
-  height: 80px;
-  width: 80px;
-  background-color: var(--color-d5e6e8);
-  border-radius: 5px;
-}
-.tools-box-number {
-  font-size: 30px;
-  font-weight: 700;
-  color: var(--v-primary-base);
-}
-.tools-box-text {
-  color: var(--v-primary-base);
-  font-size: 14px;
-}
-.welfare {
-  background-color: var(--color-f3);
-  border-radius: 8px;
-  padding: 12px;
-}
-.welfare-tags {
-  display: flex;
-  width: 242px;
-  flex-wrap: wrap;
-  height: 100px;
-  overflow: hidden;
-  text-align: center;
-}
-.welfare-tags-item {
-  display: block;
-  width: 117px;
-  max-width: 117px;
-  text-align: center;
-  line-height: 26px;
-  margin-right: 8px;
-  &:nth-child(2n) {
-    margin-right: 0;
-  }
-}
-.business-item {
-  font-size: 14px;
-  color: var(--color-666);
-  font-weight: 600;
-}
-.business-value {
-  width: 228px;
-  color: #000;
-  font-weight: 500;
-}
-.business-source {
-  font-size: 14px;
-  color: var(--color-666);
-}
-.desc {
-  width: 180px;
-  color: var(--color-666);
-  font-weight: 500;
-  font-size: 12px;
-}
-.position-name {
-  width: 180px;
-  font-size: 14px;
-  font-weight: 600;
-}
-
-.breadcrumbsText {
-  color: var(--color-999);
-  font-size: 15px;
-  &.active {
-    color: var(--v-primary-base);
-    cursor: pointer;
-  }
-}
-</style>

+ 0 - 66
src/views/recruit/personal/jobFair/enterprise/introduction.vue

@@ -1,66 +0,0 @@
-<template>
-  <div>
-    <h4>公司简介</h4>
-    <div v-if="props.info.enterprise.introduce" class="requirement" v-html="props.info.enterprise.introduce.replace(/\n/g, '</br>')"></div>
-    <div v-else>暂无</div>
-    <v-divider class="my-3"></v-divider>
-    <div>
-      <h4>公司地址</h4>
-      <div v-if="props.info?.business?.address" class="mt-1">
-        <v-icon size="25" color="primary">mdi-map-marker</v-icon>
-        <span style="color: var(--color-666);font-size: 15px;">{{ props.info.business.address }}</span>
-      </div>
-      <div v-else class="mt-1">暂无</div>
-    </div>
-    <v-divider class="my-3"></v-divider>
-    <div>
-      <h4>公司相册</h4>
-      <v-slide-group v-if="props.info.enterprise.albumList" :show-arrows="true" class="mt-3 img-box cursor-pointer">
-        <v-slide-group-item v-for="(val, i) in props.info.enterprise.albumList" :key="i">
-          <div>
-            <v-img v-if="checkIsImage(val)" class="mr-3" width="200" height="115" :src="val" cover rounded @click.stop="handleClick(i)"></v-img>
-            <video v-else class="videos-radius mr-3" :src="val" controls height="118" width="200" preload="preload" @click.stop="handleClick(i)"></video>
-          </div>
-        </v-slide-group-item>
-      </v-slide-group>
-      <div v-else>暂无</div>
-    </div>
-    <PreviewImage v-if="showPreview" :initialIndex="current" :urlList="props.info.enterprise.albumList" @close="showPreview = !showPreview" />
-  </div>
-</template>
-
-<script setup>
-defineOptions({ name: 'enterprise-introduction'})
-import { checkIsImage } from '@/utils'
-import { ref } from 'vue'
-
-const props = defineProps({
-  info: {
-    type: Object,
-    default: () => {}
-  }
-})
-
-// 预览
-const showPreview = ref(false)
-const current = ref(0)
-const handleClick = (index) => {
-  showPreview.value = !showPreview.value
-  current.value = index
-}
-</script>
-
-<style scoped lang="scss">
-.requirement {
-  white-space: pre-wrap;
-  word-break: break-all;
-  line-height: 28px;
-  color: var(--color-333);
-  font-size: 15px;
-  text-align: justify;
-  letter-spacing: 0;
-}
-.videos-radius {
-  border-radius: 8px;
-}
-</style>

+ 0 - 370
src/views/recruit/personal/jobFair/enterprise/positions.vue

@@ -1,370 +0,0 @@
-<template>
-  <div class="top">
-    <div class="d-flex" v-if="positionCategory.length">
-      <div class="font-weight-bold position-category-left">职位类别:</div>
-      <div class="position-category-right">
-        <span 
-          :class="['category-item', {'default-active': k.active}, {'font-weight-bold': k.active}]" 
-          v-for="k in positionCategory" 
-          :key="k.id"
-          @click.stop="handleClickCategory(k)"
-        >{{ k.id === -1 ? `${k.label}` : `${k.label} (${k.number})` }}</span>
-      </div>
-    </div>
-    <div class="d-flex mt-1 justify-space-between">
-      <conditionFilter v-if="show" ref="conditionFilterRef" :showFilterList="showFilterList" @reset="handleReset" @change="handleQueryChange"></conditionFilter>
-      <div style="width: 220px;" class="mt-2">
-        <v-text-field
-          v-model="query.content"
-          variant="outlined" 
-          label="查找职位关键字"
-          hide-details
-          color="primary"
-          append-inner-icon="mdi-magnify"
-          @click:append-inner="handleSearch('content', { values: query.content })"
-          @keyup.enter="handleSearch('content', { values: query.content })"
-        >
-        </v-text-field>
-      </div>
-    </div>
-  </div>
-  <v-divider class="mt-5"></v-divider>
-  <div class="bottom mt-4">
-    <div v-if="list.length">
-      <div 
-        v-for="(val, i) in list" 
-        :key="i" 
-        :class="['bottom-item', {'border-bottom-dashed': i !== list.length -1}, 'd-flex', 'justify-space-between', 'cursor-pointer']" 
-        @mouseenter="val.active = true"
-        @mouseleave="val.active = false"
-      >
-        <div>
-          <p v-if="val.job.name.includes('style')" :class="['name', {'default-active': val.active }]" v-html="val.job.name" @click.stop="handlePosition(val)"></p>
-          <p v-else :class="['name', {'default-active': val.active }]" @click.stop="handlePosition(val)">{{ formatName(val.job.name) }}</p>
-          <div style="line-height: 40px;">
-            <span v-for="k in desc" :key="k.mdi">
-              <span v-if="val.job[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.job.areaId ? '全国' : val.job.area?.str : val.job[k.value] }}
-                  <!-- {{ (k.value === 'areaName' && !val.job.areaId) ? '全国' : val.job[k.value] }} -->
-                </span>
-              </span>
-            </span>
-          </div>
-        </div>
-        <div v-if="!val.active" class="text-right">
-          <p v-if="!val.job.payFrom && !val.job.payTo" class="salary">面议</p>
-          <p v-else class="salary">{{ val.job.payFrom ? val.job.payFrom + '-' : '' }}{{ val.job.payTo }}{{ val.job.payName ? '/' + val.job.payName : '' }}</p>
-          <div class="update-time">{{ timesTampChange(val.job.updateTime) }} 刷新</div>
-        </div>
-        <div v-else class="account-info">
-          <v-avatar :image="getUserAvatar(val.contact.avatar, val.contact.sex)"></v-avatar>
-          <span class="account-label">{{ val.contact.name }}{{ val.contact.postNameCn ? ' · ' + val.contact.postNameCn : '' }}</span>
-          <span>
-            <v-btn class="half-button" color="primary" size="small" @click="toDetails(val)">立即沟通</v-btn>
-          </span>
-        </div>
-      </div>
-      <MPagination
-        :total="total"
-        :page="pageInfo.pageNo"
-        :limit="pageInfo.pageSize"
-        @handleChange="handleChangePage"
-      ></MPagination>
-    </div>
-    <Empty v-else :elevation="false"></Empty>
-
-    <!-- 快速登录 -->
-    <loginPage v-if="showLogin" @loginSuccess="loginSuccess" @close="loginClose"></loginPage>
-  </div>
-</template>
-
-<script setup>
-defineOptions({ name: 'recruitment-positions'})
-import { reactive, ref } from 'vue'
-import { useRoute, useRouter } from 'vue-router'
-import { timesTampChange } from '@/utils/date'
-import { getDict } from '@/hooks/web/useDictionaries'
-import { dealDictObjData } from '@/utils/position'
-import { prologue, defaultText } from '@/hooks/web/useIM'
-import { getUserAvatar } from '@/utils/avatar'
-import { getJobAdvertisedPositionCount, getJobAreaByEnterpriseId, getJobAdvertisedSearch } from '@/api/position'
-import MPagination from '@/components/CtPagination'
-import conditionFilter from '@/views/recruit/personal/position/components/conditionFilter'
-import loginPage from '@/views/common/loginDialog.vue'
-import { getToken } from '@/utils/auth'
-import Snackbar from '@/plugins/snackbar'
-import { checkPersonBaseInfo } from '@/utils/check'
-import dialogExtend from '@/plugins/dialogExtend'
-import { formatName } from '@/utils/getText'
-
-const props = defineProps({
-  info: {
-    type: Object,
-    default: () => {}
-  }
-})
-
-const total = ref(0)
-const pageInfo = ref({
-  pageSize: 10,
-  pageNo: 1
-})
-let query = reactive({})
-const route = useRoute(); const router = useRouter()
-let routeQuery = (route?.query && route.query && Object.keys(route?.query).length) ? route.query : null
-if (routeQuery?.content) query.content = routeQuery?.content || ''
-if (routeQuery) query = routeQuery
-
-// 职位详情
-const handlePosition = (val) => {
-  window.open(`/recruit/personal/position/details/${val.job.id}`)
-}
-
-// 职位类型
-const positionList = ref([])
-const getDictData = async () => {
-  const { data } = await getDict('positionData', {}, 'positionData')
-  positionList.value = data
-}
-getDictData()
-
-const show = ref(false)
-const showFilterList = ref([
-  { key: 'expType', isSingle: true },
-  { key: 'eduType', isSingle: true },
-  { key: 'payScope', isSingle: true },
-])
-const getProvideData = (list) => {
-  if (!list?.length) return show.value = true
-  getDict('menduner_area_type', {}, 'areaList').then(({ data }) => {
-    data = data?.length && data || []
-    const arr = list.map(e => {
-      const obj = data.find(k => k.id === Number(e.key))
-      if (!obj) return
-      return { label: obj.name, value: obj.id }
-    }).filter(Boolean)
-    if (arr?.length) showFilterList.value.unshift({ key: 'areaIds', isSingle: true, provideData: arr})
-    show.value = true
-  })
-}
-
-// 职位类别&工作地点
-const positionCategory = ref([])
-const getData = async () => {
-  const data = await getJobAdvertisedPositionCount({ enterpriseId: props.info.enterprise.id })
-  const areaList = await getJobAreaByEnterpriseId({ enterpriseId: props.info.enterprise.id })
-  getProvideData(areaList)
-  const list = data.map(val => {
-    const value = positionList.value.find(e => Number(e.id) === Number(val.key))
-    if (!value) return
-    return { id: value.id, label: value.nameCn, number: val.value, active: false }
-  }).filter(Boolean)
-  positionCategory.value = [{ id: -1, label: '全部', active: true }, ...list]
-}
-const getPoAr = async () => {
-  await getData()
-  // 职位类别回显
-  if (routeQuery?.positionId) {
-    positionCategory.value.map(e => e.active = false)
-    positionCategory.value.find(e => e.id === Number(routeQuery.positionId)).active = true
-  }
-}
-getPoAr()
-
-// 职位类别选中
-const handleClickCategory = (k) => {
-  positionCategory.value.map(e => e.active = false)
-  k.active = !k.active
-  handleSearch('positionId', { values: [k.id] })
-}
-
-const dealRouteQuery = () => {
-  const arr = Object.keys(query).map(e => {
-    if (Array.isArray(query[e]) && !query[e].length) {
-      delete query[e]
-    }
-    if (!query[e]) delete query[e]
-    if (e !== 'pageSize' && e !== 'pageNo' && e !== 'enterpriseId') return `${e}=${query[e]}`
-  }).filter(Boolean)
-  const str = ['key=recruitmentPositions', ...arr].join('&')
-  if (str) router.replace(`${route.path}?${str}`)
-}
-
-const handleSearch = (key, { values = [] }) => {
-  if (key) {
-    if (values === -1 || !values || values[0] === -1 || !values.length) delete query[key]
-    else if (['payScope', 'positionId'].includes(key)) query[key] = values?.length ? values[values.length-1] : '' // 单选且传递字符串
-    else query[key] = values
-  }
-  dealRouteQuery()
-  getPositionList(true)
-}
-
-// 职位列表
-const list = ref([])
-// 职位列表
-const getPositionList = async (isSearch) => {
-  const queryParams = {
-    ...query,
-    ...pageInfo.value,
-    enterpriseId: props.info.enterprise.id
-  }
-  delete queryParams.key
-  for (const key in queryParams) {
-    if (['expType', 'eduType'].includes(key) && queryParams[key] === '9999') delete queryParams[key]
-  }
-
-  if (isSearch) query.pageNo = 1
-  const { list: arr, total: number } = await getJobAdvertisedSearch(queryParams)
-  total.value = number
-  list.value = arr.map(e => {
-    e.active = false
-    e.job = { ...e.job, ...dealDictObjData({}, e.job) }
-    return e
-  })
-}
-getPositionList()
-
-const handleChangePage = (index) => {
-  pageInfo.value.pageNo = index
-  getPositionList()
-}
-
-// 参数改变
-const handleQueryChange = (key, val) => { // val为字符串,数组的话用_下划线分隔
-  pageInfo.value.pageNo = 1
-  const values = val ? val.split('_') : []
-  handleSearch(key, { values })
-}
-
-// 清空筛选条件
-const handleReset = async () => {
-  pageInfo.value.pageNo = 1
-  showFilterList.value.forEach(e => {
-    delete query[e.key]
-  })
-  handleSearch(null, {})
-}
-
-// 城市、学历、工作经验
-const desc = [
-  { mdi: 'mdi-map-marker-outline', value: 'areaName' },
-  { mdi: 'mdi-school-outline', value: 'eduName' },
-  { mdi: 'mdi-clock-time-ten-outline', value: 'expName' }
-]
-
-let toDetailsInfo = {}
-// 沟通
-const toDetails = async (info) => {
-  if (info) toDetailsInfo = info // 快速登录弹窗回调使用
-  else info = toDetailsInfo
-  if (!getToken()) {
-    showLogin.value = true // 打开快速登录弹窗
-    Snackbar.warning('您还未登录,请先登录后再试')
-    //
-    loginCloseWarningWord = '您已取消登录,无法对职位进行沟通' // 取消登录提示语
-    nextFunc.value = toDetails // 登录成功后要执行的操作 (toDetails执行不成功,原因未找到)
-    return
-  }
-  if (!checkPersonBaseInfo()) { // 强制填写个人信息
-    dialogExtend('necessaryInfoDialog').then(() => {
-      toDetails(toDetailsInfo)
-    })
-    return
-  }
-  const userId = info.contact.userId
-  const enterpriseId = info.contact.enterpriseId
-  const textObj = {
-    text: defaultText,
-    positionInfo: { ...info.job, enterprise: info.enterprise, contact: info.contact },
-  }
-  await prologue({userId, enterpriseId, text: JSON.stringify(textObj)})
-  let url = `/recruit/personal/message?id=${info.job.id}`
-  if (info.contact.enterpriseId) {
-    url += `&enterprise=${info.contact.enterpriseId}`
-  }
-
-  window.open(url)
-}
-
-const showLogin = ref(false)
-const nextFunc = ref(null)
-let loginCloseWarningWord = ''
-// 快速登录
-const loginSuccess = () => {
-  showLogin.value = false
-  Snackbar.success('登录成功')
-  if (nextFunc.value) nextFunc.value()
-}
-
-const loginClose = () => {
-  showLogin.value = false
-  Snackbar.warning(loginCloseWarningWord)
-}
-</script>
-
-<style scoped lang="scss">
-.bottom-item {
-  width: 100%;
-  height: 68px;
-  margin-bottom: 12px;
-}
-.name {
-  position: relative;
-  max-width: 30vw;
-  margin-right: 8px;
-  overflow: hidden;
-  text-overflow: ellipsis;
-  white-space: nowrap;
-  font-weight: 600;
-}
-.salary {
-  font-size: 16px;
-  font-weight: 700;
-  color: var(--v-error-base);
-  line-height: 22px;
-  flex: none;
-}
-.tag-text {
-  color: var(--color-222);
-  font-size: 14px;
-}
-.update-time {
-  color: var(--color-666);
-  font-size: 14px;
-  line-height: 40px;
-}
-.account-info {
-  line-height: 52px;
-  .account-label {
-    color: var(--color-666);
-    font-size: 14px;
-    font-weight: 600;
-    margin: 0 10px;
-  }
-}
-.position-category-left {
-  width: 80px;
-}
-.position-category-right {
-  flex: 1;
-}
-.category-item {
-  display: inline-block;
-  margin-right: 20px;
-  font-size: 15px;
-  color: var(--color-666);
-  cursor: pointer;
-  &:hover {
-    color: var(--v-primary-base);
-  }
-}
-:deep(.v-field__input) {
-  height: 28px;
-  padding: 0 0 0 10px;
-  font-size: 12px;
-  min-height: 28px;
-}
-</style>

+ 1 - 1
src/views/recruit/personal/jobFair/index.vue

@@ -34,7 +34,7 @@ getList()
 
 const handleJoin = (val) => {
 	if (!val?.id) return
-	const path = '/recruit/personal/jobFair/entDetails/' + val.id
+	const path = '/recruit/personal/jobFair/details/' + val.id
 	router.push(path)
 
 	// 面包屑储存