소스 검색

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

Xiao_123 1 년 전
부모
커밋
6890f09db1

+ 1 - 0
components.d.ts

@@ -22,6 +22,7 @@ declare module 'vue' {
     HeadSearch: typeof import('./src/components/headSearch/index.vue')['default']
     HotPromoted: typeof import('./src/components/Enterprise/hotPromoted.vue')['default']
     'Index copy': typeof import('./src/components/CtForm/index copy.vue')['default']
+    IndustryTypeCard: typeof import('./src/components/industryTypeCard/index.vue')['default']
     Info: typeof import('./src/components/Enterprise/info.vue')['default']
     Introduction: typeof import('./src/components/Enterprise/components/introduction.vue')['default']
     Item: typeof import('./src/components/Position/item.vue')['default']

+ 8 - 0
src/api/common/index.js

@@ -81,6 +81,14 @@ export const getPositionTreeData = async (params) => {
   })
 }
 
+// 根据条件搜索招聘职位
+export const getJobAdvertisedSearch = async (params) => {
+  return await request.get({
+    url: '/app-api/menduner/system/job/advertised/get/search',
+    params
+  })
+}
+
 // 获取区域树形
 export const getAreaTreeData = async () => {
   return await request.get({

+ 1 - 2
src/components/CtForm/index.vue

@@ -45,7 +45,7 @@ const isValid = ref(true)
 const formRef = ref()
 
 const handleChange = (item) => {
-  console.log('handleChange', item)
+  // console.log('handleChange', item)
   if (item.type === 'date' && item.value) item.option.validate = false
   if (item?.change) item.change(item.value, item)
   emit('change', false)
@@ -69,7 +69,6 @@ const validateTime = () => {
 }
   
 const validate = () => {
-  console.log('点击调用子组件方法', 1)
   const form = formRef.value.validate()
   const time = validateTime()
   return form && time

+ 11 - 6
src/components/headSearch/index.vue

@@ -17,7 +17,7 @@
       class="px-2"
       style="height: 100%; line-height: 100%;"
     ></v-text-field>
-    <div class="searchBtn">搜索</div>
+    <div class="searchBtn" @click="handleSearch">搜索</div>
   </div>
 </template>
 
@@ -25,9 +25,11 @@
 import { useSharedState } from '@/store/sharedState'
 import jobTypeCard from '@/components/jobTypeCard'
 import { ref, watch } from 'vue'
-// import { useRouter } from 'vue-router'
+import { useRoute, useRouter } from 'vue-router'
 defineOptions({ name:'common-components-headSearch'})
-// const router = useRouter()
+const route = useRoute(); const router = useRouter()
+const emits = defineEmits(['handleSearch'])// 定义一个或多个自定义事件
+
 const text = ref('职位类型')
 const value = ref('')
 let drawer = ref(false)
@@ -38,9 +40,11 @@ watch(() => sharedState.layoutClickCount, () => {
   if (drawer.value) drawer.value = false
 });
 
-// const jobClick = (jobInfo) => {
-//   router.push({ path: '/recruit/position',query: jobInfo })
-// }
+const handleSearch = () => {
+  const path = '/recruit/position'
+  if (path === route.path) emits('handleSearch', {})
+  else router.push({ path: '/recruit/position',query: {} })
+}
 
 </script>
 
@@ -73,6 +77,7 @@ watch(() => sharedState.layoutClickCount, () => {
     font-size: 18px;
     color: #fff;
     background-color: var(--v-primary-base);
+    cursor: pointer;
   }
   .jobTypeCardBox {
     position: absolute;

+ 73 - 0
src/components/industryTypeCard/index.vue

@@ -0,0 +1,73 @@
+<template>
+  <v-card class="card rightCardBox">
+      <div class="rightCard">
+        <div v-for="item in items" :key="item.id">
+          <!-- <v-divider v-if="index" class="divider"></v-divider> -->
+          <div class="rowItem d-flex">
+            <div class="categoryName2">{{ item.nameCn }}</div>
+            <div class="rightContent">
+              <div v-if="!item.children?.length"></div>
+              <div v-else class="jobItem" v-for="val in item.children" :key="val.id">{{ val.nameCn }}</div>
+            </div>
+          </div>
+        </div>
+      </div>
+    </v-card>
+</template>
+
+<script setup>
+import { getDict } from '@/hooks/web/useDictionaries'
+import { ref } from 'vue';
+defineOptions({ name:'common-components-industryTypeCard'})
+
+let items = ref()
+getDict('industryTreeData', null, 'industryTreeData').then(({ data }) => {
+  data = data?.length && data || []
+  items.value = data
+})
+</script>
+<style lang="scss" scoped>
+.card { border-radius: 12px; }
+.rightCard {
+  height: 384px;
+  width: 786px;
+  margin: 4px 0;
+  padding: 0 16px;
+  overflow-y: auto;
+  // .categoryName { font-size: 16px; line-height: 28px; margin-top: 6px; color: var(--v-primary-base)}
+  .categoryName2 { font-size: 14px; color: #000; width: 150px; margin-right: 4px;}
+  .jobItem { font-size: 14px; color: #333333; }
+  .rowItem {
+    padding: 8px 0;
+  }
+  .divider {
+    margin-left: 150px;
+  }
+  .rightContent {
+    flex: 1;
+    div {
+      margin: 4px 28px 2px 0;
+      float: left;
+      cursor: pointer;
+      // color: #000;
+      &:hover {
+        color: var(--v-primary-base);
+      }
+    }
+  }
+}
+
+::-webkit-scrollbar {
+  width: 4px;
+  height: 10px;
+  // display: none;
+}
+::-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>

+ 9 - 1
src/hooks/web/useDictionaries.js

@@ -1,4 +1,11 @@
-import { getDictData, getIndustryListData, getAreaListData, getPositionTreeData, getAreaTreeData } from '@/api/common/index'
+import {
+  getDictData,
+  getIndustryListData,
+  getIndustryTreeData,
+  getAreaListData,
+  getPositionTreeData,
+  getAreaTreeData
+} from '@/api/common/index'
 // 定义对应的api
 // const DICT_CITY_API = {
 //   menduner_exp_type: getDictData
@@ -24,6 +31,7 @@ export const getDict = (type, params, apiType = 'dict') => {
         dict: getDictData,
         positionTreeData: getPositionTreeData, // 职位tree
         areaTreeData: getAreaTreeData, // 区域tree
+        industryTreeData: getIndustryTreeData, // 行业tree
         industryList: getIndustryListData,
         areaList: getAreaListData
       }

+ 2 - 1
src/layout/personal/navBar.vue

@@ -7,7 +7,7 @@
     >
       <div class="innerBox d-flex justify-space-between">
         <div>
-          <div class="nav-logo">
+          <div class="nav-logo" style="cursor: pointer;" @click="handleLogoClick">
             <v-img src="../../assets/logo.png"  aspect-ratio="16/9" cover :width="90" style="height: 40px"></v-img>
           </div>
           <div class="nav-city">
@@ -115,6 +115,7 @@ const list = ref([
 
 import { useRouter } from 'vue-router'
 const router = useRouter()
+const handleLogoClick = () => { router.push({ path: '/home'}) }
 
 const userType = ref(1) // 0企业用户、1个人用户
 const show = ref(false)

+ 6 - 1
src/views/Home/personal/components/hotJobs.vue

@@ -1,14 +1,19 @@
 <template>
   <div class="box text-center">
     <span class="mr-2">热门职位:</span>
-    <v-btn v-for="(item, index) in jobs" :key="index" size="small" class="ml-2" color="primary" variant="tonal">{{ item.nameCn }}</v-btn>
+    <v-btn v-for="(item, index) in jobs" :key="index" size="small" class="ml-2" color="primary" variant="tonal" @click="handleClick(item)">{{ item.nameCn }}</v-btn>
   </div>
 </template>
 
 <script setup>
 import { getHotPositionList } from '@/api/common/index'
+import { useRouter } from 'vue-router'
 import { ref } from 'vue';
 defineOptions({ name:'personal-hotJobs-list'})
+const router = useRouter()
+
+
+const handleClick = (item) => { router.push({ path: '/recruit/position',query: item }) }
 
 // 获取行业树形
 let jobs = ref(null)

+ 17 - 3
src/views/recruit/position/components/conditionFilter.vue

@@ -1,9 +1,23 @@
 <template>
-  <div>
-    筛选
+  <div class="d-flex">
+    <companyIndustry></companyIndustry>
+    <positionType></positionType>
+    <JobType></JobType>
+    <expType></expType>
+    <payScope></payScope>
+    <educationType></educationType>
+    <scale></scale>
+    <financingStatus></financingStatus>
   </div>
 </template>
 <script setup>
-
+import companyIndustry from './conditionFilter/companyIndustry.vue'
+import positionType from './conditionFilter/positionType.vue'
+import JobType from './conditionFilter/JobType.vue'
+import expType from './conditionFilter/expType.vue'
+import payScope from './conditionFilter/payScope.vue'
+import educationType from './conditionFilter/educationType.vue'
+import scale from './conditionFilter/scale.vue'
+import financingStatus from './conditionFilter/financingStatus.vue'
 defineOptions({name: 'retrieval-components-conditionFilter'})
 </script>

+ 19 - 0
src/views/recruit/position/components/conditionFilter/JobType.vue

@@ -0,0 +1,19 @@
+<template>
+  <commonStyle btnTitle="求职类型">
+    <div></div>
+  </commonStyle>
+</template>
+<script setup>
+import commonStyle from './commonStyle.vue'
+import { getDict } from '@/hooks/web/useDictionaries'
+import { ref } from 'vue';
+
+defineOptions({name: 'conditionFilter-JobType'})
+let items = ref()
+getDict('menduner_job_type').then(({ data }) => { // 求职类型
+  data = data?.length && data || []
+  items.value = data
+})
+</script>
+<style lang="scss" scoped>
+</style>

+ 42 - 0
src/views/recruit/position/components/conditionFilter/commonStyle.vue

@@ -0,0 +1,42 @@
+<template>
+  <v-menu open-on-hover>
+    <template v-slot:activator="{ props }">
+      <div class="d-flex align-center" v-bind="props">
+        <div class="btn" @mouseover="drawer = true" @mouseleave="drawer = false">
+          <span class="mr-2">{{ defineProps.btnTitle }}</span>
+          <span v-if="drawer" class="mdi mdi-menu-up"></span>
+          <span v-if="!drawer" class="mdi mdi-menu-down"></span>
+        </div>
+      </div>
+    </template>
+    <!-- <jobTypeCard @click.stop=""></jobTypeCard> -->
+    <slot></slot>
+  </v-menu>
+</template>
+<script setup>
+import { ref } from 'vue';
+
+defineOptions({name: 'conditionFilter-index-page'})
+const defineProps = defineProps({
+  btnTitle: {
+    type: String,
+    default: 'Text'
+  }
+})
+const drawer = ref(false)
+</script>
+<style lang="scss" scoped>
+.btn {
+  color: #333333;
+  background-color: var(--default-bgc);
+  padding: 4px 12px 4px 12px;
+  border-radius: 4px;
+  margin-right: 20px;
+  margin-bottom: 4px;
+  cursor: pointer;
+  &:hover {
+    color: var(--v-primary-base);
+    background-color: #d5e6e8;
+  }
+}
+</style>

+ 13 - 0
src/views/recruit/position/components/conditionFilter/companyIndustry.vue

@@ -0,0 +1,13 @@
+<template>
+  <commonStyle btnTitle="行业类型">
+    <industryTypeCard></industryTypeCard>
+  </commonStyle>
+</template>
+<script setup>
+import commonStyle from './commonStyle.vue'
+import industryTypeCard from '@/components/industryTypeCard'
+
+defineOptions({name: 'conditionFilter-company-industry'})
+</script>
+<style lang="scss" scoped>
+</style>

+ 19 - 0
src/views/recruit/position/components/conditionFilter/educationType.vue

@@ -0,0 +1,19 @@
+<template>
+  <commonStyle btnTitle="学历要求">
+    <div></div>
+  </commonStyle>
+</template>
+<script setup>
+import commonStyle from './commonStyle.vue'
+import { getDict } from '@/hooks/web/useDictionaries'
+import { ref } from 'vue';
+
+defineOptions({name: 'conditionFilter-educationType'})
+let items = ref()
+getDict('menduner_education_type').then(({ data }) => { // 学历要求
+  data = data?.length && data || []
+  items.value = data
+})
+</script>
+<style lang="scss" scoped>
+</style>

+ 19 - 0
src/views/recruit/position/components/conditionFilter/expType.vue

@@ -0,0 +1,19 @@
+<template>
+  <commonStyle btnTitle="工作经验">
+    <div></div>
+  </commonStyle>
+</template>
+<script setup>
+import commonStyle from './commonStyle.vue'
+import { getDict } from '@/hooks/web/useDictionaries'
+import { ref } from 'vue';
+
+defineOptions({name: 'conditionFilter-expType'})
+let items = ref()
+getDict('menduner_exp_type').then(({ data }) => { // 工作经验
+  data = data?.length && data || []
+  items.value = data
+})
+</script>
+<style lang="scss" scoped>
+</style>

+ 19 - 0
src/views/recruit/position/components/conditionFilter/financingStatus.vue

@@ -0,0 +1,19 @@
+<template>
+  <commonStyle btnTitle="融资阶段">
+    <div></div>
+  </commonStyle>
+</template>
+<script setup>
+import commonStyle from './commonStyle.vue'
+import { getDict } from '@/hooks/web/useDictionaries'
+import { ref } from 'vue';
+
+defineOptions({name: 'conditionFilter-financingStatus'})
+let items = ref()
+getDict('menduner_financing_status').then(({ data }) => { // 融资阶段
+  data = data?.length && data || []
+  items.value = data
+})
+</script>
+<style lang="scss" scoped>
+</style>

+ 19 - 0
src/views/recruit/position/components/conditionFilter/payScope.vue

@@ -0,0 +1,19 @@
+<template>
+  <commonStyle btnTitle="薪资待遇">
+    <div></div>
+  </commonStyle>
+</template>
+<script setup>
+import commonStyle from './commonStyle.vue'
+import { getDict } from '@/hooks/web/useDictionaries'
+import { ref } from 'vue';
+
+defineOptions({name: 'conditionFilter-payScope'})
+let items = ref()
+getDict('menduner_pay_scope').then(({ data }) => { // 薪资待遇
+  data = data?.length && data || []
+  items.value = data
+})
+</script>
+<style lang="scss" scoped>
+</style>

+ 13 - 0
src/views/recruit/position/components/conditionFilter/positionType.vue

@@ -0,0 +1,13 @@
+<template>
+  <commonStyle btnTitle="职位类型">
+    <jobTypeCard></jobTypeCard>
+  </commonStyle>
+</template>
+<script setup>
+import commonStyle from './commonStyle.vue'
+import jobTypeCard from '@/components/jobTypeCard'
+
+defineOptions({name: 'conditionFilter-company-industry'})
+</script>
+<style lang="scss" scoped>
+</style>

+ 19 - 0
src/views/recruit/position/components/conditionFilter/scale.vue

@@ -0,0 +1,19 @@
+<template>
+  <commonStyle btnTitle="公司规模">
+    <div></div>
+  </commonStyle>
+</template>
+<script setup>
+import commonStyle from './commonStyle.vue'
+import { getDict } from '@/hooks/web/useDictionaries'
+import { ref } from 'vue';
+
+defineOptions({name: 'conditionFilter-scale'})
+let items = ref()
+getDict('menduner_scale').then(({ data }) => { // 公司规模
+  data = data?.length && data || []
+  items.value = data
+})
+</script>
+<style lang="scss" scoped>
+</style>

+ 2 - 2
src/views/recruit/position/index.vue

@@ -2,11 +2,11 @@
 <template>
   <div class="default-width">
     <div style="width: 100%; height: 20px;"></div>
-    <v-card>
+    <v-card style="z-index: 998">
       <div class="stickyBox my-5">
         <headSearch></headSearch>
       </div>
-      <cityFilter class="mx-5 mb-5"></cityFilter>
+      <cityFilter class="mx-5 mb-3"></cityFilter>
       <conditionFilter class="mx-5 mb-5"></conditionFilter>
     </v-card>
     <div>