Ver código fonte

Merge branch 'dev' of https://git.citupro.com/zhengnaiwen_citu/menduner into dev

lifanagju_citu 5 meses atrás
pai
commit
42cdf08569

+ 1 - 1
src/permission.js

@@ -48,7 +48,7 @@ router.beforeEach(async (to, from, next) => {
         }
       }
     }
-    if (to.path === '/login') {
+    if (to.fullPath === '/login') {
       next({ path: '/recruitHome' })
     }
     // 获取字典信息

+ 2 - 2
src/router/modules/common.js

@@ -3,7 +3,6 @@
 import headhunting from './components/headhunting'
 
 const common = [
-  ...headhunting,
   {
     path: '', // 门墩项目列表/项目入口页
     redirect: '/recruitHome',
@@ -104,7 +103,8 @@ const common = [
       title: '人才详情',
       hideSide: true
     }
-  }
+  },
+  ...headhunting
 ]
 
 export default common

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

@@ -108,7 +108,7 @@ const recruit = [
     children: [
       {
         path: '/recruit/personal/company/details/:id',
-        component: () => import('@/views/recruit/enterprise/components/enterpriseDetails.vue'),
+        component: () => import('@/views/recruit/personal/companyDetail/index.vue'),
         meta: {
           title: '企业详情'
         },

+ 0 - 16
src/views/recruit/enterprise/components/enterpriseDetails.vue

@@ -1,16 +0,0 @@
-<template>
-  <EnterpriseDetails :id="id"></EnterpriseDetails>
-</template>
-
-<script setup>
-defineOptions({ name: "enterprise-details" })
-import { useRouter } from 'vue-router'
-import EnterpriseDetails from '@/components/Enterprise/details.vue'
-
-const router = useRouter()
-const { id } = router.currentRoute.value.params
-</script>
-
-<style scoped lang="scss">
-
-</style>

+ 0 - 0
src/views/recruit/enterprise/components/enterpriseInfo.vue


+ 0 - 0
src/components/Enterprise/components/introduction.vue → src/views/recruit/personal/companyDetail/components/introduction.vue


+ 11 - 12
src/components/Enterprise/components/positions.vue → src/views/recruit/personal/companyDetail/components/positions.vue

@@ -11,9 +11,9 @@
         >{{ k.id === -1 ? `${k.label}` : `${k.label} (${k.number})` }}</span>
       </div>
     </div>
-    <div class="d-flex mt-1">
+    <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: 300px;" class="mt-2">
+      <div style="width: 200px;" class="mt-2">
         <v-text-field
           v-model="query.content"
           variant="outlined" 
@@ -111,7 +111,6 @@ 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 || ''
-// provide('routeQuery', routeQuery)
 if (routeQuery) query = routeQuery
 
 // 职位详情
@@ -119,11 +118,11 @@ const handlePosition = (val) => {
   window.open(`/recruit/personal/position/details/${val.job.id}`)
 }
 
-// 行业列表
-const industryList = ref([])
+// 职位类型
+const positionList = ref([])
 const getDictData = async () => {
-  const { data } = await getDict('menduner_industry_type', {}, 'industryList')
-  industryList.value = data
+  const { data } = await getDict('positionData', {}, 'positionData')
+  positionList.value = data
 }
 getDictData()
 
@@ -138,7 +137,7 @@ const getProvideData = (list) => {
   getDict('menduner_area_type', {}, 'areaList').then(({ data }) => {
     data = data?.length && data || []
     const arr = list.map(e => {
-      const obj = data.find(k => k.id === e.key)
+      const obj = data.find(k => k.id === Number(e.key))
       if (!obj) return
       return { label: obj.name, value: obj.id }
     }).filter(Boolean)
@@ -154,7 +153,7 @@ const getData = async () => {
   const areaList = await getJobAreaByEnterpriseId({ enterpriseId: props.info.enterprise.id })
   getProvideData(areaList)
   const list = data.map(val => {
-    const value = industryList.value.find(e => Number(e.id) === Number(val.key))
+    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)
@@ -165,7 +164,7 @@ const getPoAr = async () => {
   // 职位类别回显
   if (routeQuery?.positionId) {
     positionCategory.value.map(e => e.active = false)
-    positionCategory.value.find(e => e.id === routeQuery.positionId).active = true
+    positionCategory.value.find(e => e.id === Number(routeQuery.positionId)).active = true
   }
 }
 getPoAr()
@@ -174,7 +173,7 @@ getPoAr()
 const handleClickCategory = (k) => {
   positionCategory.value.map(e => e.active = false)
   k.active = !k.active
-  handleSearch('positionId', { values: k.id })
+  handleSearch('positionId', { values: [k.id] })
 }
 
 const dealRouteQuery = () => {
@@ -192,7 +191,7 @@ const dealRouteQuery = () => {
 const handleSearch = (key, { values = [] }) => {
   if (key) {
     if (values === -1 || !values || values[0] === -1 || !values.length) delete query[key]
-    else if (key === 'payScope') query[key] = values?.length ? values[values.length-1] : '' // 单选且传递字符串
+    else if (['payScope', 'positionId'].includes(key)) query[key] = values?.length ? values[values.length-1] : '' // 单选且传递字符串
     else query[key] = values
   }
   dealRouteQuery()

+ 8 - 38
src/components/Enterprise/details.vue → src/views/recruit/personal/companyDetail/index.vue

@@ -7,8 +7,6 @@
           <div class="ml-4">
             <div class="contact-name">
               {{ info.enterprise.name }}
-              <!-- <v-icon :color="statusInfo.color" size="20">{{ statusInfo.mdi }}</v-icon>
-              <span :style="{'color': statusInfo.color,'font-size': '14px'}">{{ statusInfo.label }}</span> -->
             </div>
             <div class="contact-info">
               {{ info.scaleName }}
@@ -68,8 +66,6 @@
 
     <!-- 快速登录 -->
     <loginPage v-if="showLogin" @loginSuccess="loginSuccess" @close="loginClose"></loginPage>
-    <!-- 完善个人信息 -->
-    <!-- <fillPage v-if="showFill" @success="fillSuccess"></fillPage> -->
   </div>
 </template>
 
@@ -78,7 +74,6 @@ defineOptions({ name: 'enterprise-details'})
 import { ref } from 'vue'
 import EnterpriseIntroduction from './components/introduction.vue'
 import recruitmentPositions from './components/positions.vue'
-// import { getEnterpriseAuthDetails } from '@/api/position'
 import { getEnterpriseDetails, getEnterpriseSubscribeCheck, getEnterpriseSubscribe, getEnterpriseUnsubscribe, enterpriseClick } from '@/api/enterprise'
 import { timesTampChange } from '@/utils/date'
 import { dealDictObjData } from '@/utils/position'
@@ -86,22 +81,13 @@ import { useRoute, useRouter } from 'vue-router'
 import { getToken } from '@/utils/auth'
 import Snackbar from '@/plugins/snackbar'
 import loginPage from '@/views/common/loginDialog.vue'
-// import fillPage from '@/views/common/fill/dialog.vue'
-
-const props = defineProps({
-  id: {
-    type: String,
-    default: ''
-  }
-})
-
 
 const route = useRoute()
 const router = useRouter()
+const { id } = router.currentRoute.value.params
 const tab = ref(1)
 const savedTab = new URLSearchParams(window.location.search).get('key')
 tab.value = savedTab ? (savedTab === 'briefIntroduction' ? 1 : 2) : 1
-// router.push(`${route.path}?key=${savedTab ? savedTab : 'briefIntroduction'}`)
 
 const handleTabClick = () => {
   router.push(`${route.path}?key=${tab.value === 1 ? 'briefIntroduction' : 'recruitmentPositions'}`)
@@ -109,41 +95,26 @@ const handleTabClick = () => {
 
 // 企业埋点
 const handleEnterpriseClick = async () => {
-  if (!props.id) return
-  await enterpriseClick({ id: props.id })
+  if (id) return
+  await enterpriseClick({ id })
 }
 handleEnterpriseClick()
 
-// const statusList = [
-//   { label: '未认证', color: '#fb8c00', value: null, mdi: 'mdi-shield-remove' },
-//   { label: '审核中', color: '#fb8c00', value: '0', mdi: 'mdi-shield-half-full' },
-//   { label: '已认证', color: 'var(--v-primary-base)', value: '1', mdi: 'mdi-shield-check' },
-//   { label: '已驳回', color: '#fe574a', value: '2', mdi: 'mdi-shield-off' }
-// ]
-
 // 企业详情
 const info = ref({})
-// const authInfo = ref({})
 const getDetails = async () => {
-  if (!props.id) return
-  const data = await getEnterpriseDetails({ id: props.id })
+  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(props.id)
-  // 企业实名认证信息
-  // authInfo.value = await getEnterpriseAuthDetails(props.id)
+  getCollectionStatus(id)
 }
 getDetails()
 
-// const statusInfo = computed(() => {
-//   const obj = (authInfo.value && Object.keys(authInfo.value).length) ? statusList.find(e => e.value === authInfo.value.status) : statusList[0]
-//   return obj
-// })
-
 // 效验求职者是否关注该企业
 const isCollection = ref(false)
 const getCollectionStatus = async (id) => {
@@ -157,14 +128,13 @@ 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 ? props.id : { enterpriseId: props.id })
-  getCollectionStatus(props.id)
+  await api(isCollection.value ? id : { enterpriseId: id })
+  getCollectionStatus(id)
 }
 
 // 工商信息

+ 1 - 1
src/views/recruit/personal/home/components/advertisement/dynamic/intercontinental.vue

@@ -47,7 +47,7 @@
           </div>
           <div class="job-place">
             <div class="job-title">地点</div>
-            <p class="font-size-14">{{ k.job.areaName || '未填写' }}</p>
+            <p class="font-size-14">{{ !k.job.areaId ? '全国' : k.job.areaName || '' }}</p>
           </div>
           <div class="job-class">
             <div class="job-title">工作经验</div>

+ 1 - 1
src/views/recruit/personal/home/components/advertisement/dynamic/marriott.vue

@@ -34,7 +34,7 @@
           </div>
           <div class="job-place">
             <div class="job-title">地点</div>
-            <p class="font-size-14">{{ k.job.areaName || '未填写' }}</p>
+            <p class="font-size-14">{{ !k.job.areaId ? '全国' : k.job.areaName || '' }}</p>
           </div>
           <div class="job-class">
             <div class="job-title">工作经验</div>

+ 1 - 1
src/views/recruit/personal/position/components/conditionFilter/commonPath.vue

@@ -127,7 +127,7 @@ watch(
     if (!newVal) selectIdArr.value = []
     const str = newVal[props.idName]?.split(',')[0]
     const arr = str ? str.split('_') : []
-    selectIdArr.value = arr?.length? arr : []
+    selectIdArr.value = arr?.length? arr.map(e => Number(e)) : []
     if (!oldVal) { // 仅刷新时触发
       if (props.isRefreshEmit) emits('inputChange', { values: selectIdArr.value, isEmit: true })
     }