Sfoglia il codice sorgente

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

lifanagju_citu 1 anno fa
parent
commit
a7834fb54e

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

@@ -110,4 +110,11 @@ export const getAreaListData = async (params) => {
     url: '/app-api/menduner/system/area/list',
     params
   })
+}
+
+// 公司检索-获取热门地区
+export const getHotArea = async () => {
+  return await request.get({
+    url: '/app-api/menduner/system/area/get/hot'
+  })
 }

+ 8 - 0
src/api/enterprise.js

@@ -22,4 +22,12 @@ export const getEnterpriseSubscribeCheck = async (params) => {
     url: '/app-api/menduner/system/person/enterprise/subscribe/check',
     params
   })
+}
+
+// 企业检索
+export const getEnterpriseSearch = async (params) => {
+  return await request.get({
+    url: '/app-api/menduner/system/enterprise/search',
+    params
+  })
 }

+ 1 - 1
src/api/position.js

@@ -43,7 +43,7 @@ export const getSimilarPosition = async (params) => {
 // 根据条件搜索招聘职位
 export const getJobAdvertisedSearch = async (params) => {
   return await request.get({
-    url: '/app-api/menduner/system/job/advertised/get/search',
+    url: '/app-api/menduner/system/job/advertised/search',
     params
   })
 }

+ 3 - 1
src/components/CtPagination/index.vue

@@ -6,6 +6,9 @@
       @update:modelValue="handleCurrentChange"
       v-bind="$attrs"
       :total-visible="props.totalVisible"
+      active-color="primary"
+      color="primary"
+      size="small"
     ></v-pagination>
     <span style="color: #666;">共{{ props.total }}条数据</span>
     <div class="search px-3">
@@ -15,7 +18,6 @@
         hide-details
         variant="outlined"
         density="compact"
-        height="35"
         label=""
         placeholder=""
         hide-spin-buttons

+ 0 - 107
src/components/CtVuetify/CtPagination/index.vue

@@ -1,107 +0,0 @@
-<template>
-  <div class="d-flex justify-center align-center pa-5">
-    <v-pagination
-      v-model="currentPage"
-      :length="pageLength"
-      @update:model-value="handleCurrentChange"
-      v-bind="$attrs"
-      :total-visible="props.totalVisible"
-      active-color="primary"
-      color="primary"
-      size="small"
-    ></v-pagination>
-    <span style="color: #666;">共{{ props.total }}条数据</span>
-    <div class="search px-3">
-      <v-text-field
-        v-model="currentJump"
-        type="number"
-        hide-details
-        variant="outlined"
-        density="compact"
-        label=""
-        placeholder=""
-        hide-spin-buttons
-      ></v-text-field>
-    </div>
-    <div>
-      <v-btn color="primary" rounded class="half-button" @click="handleCurrentJump">跳转</v-btn>
-    </div>
-  </div>
-</template>
-
-<script setup>
-defineOptions({ name: 'pagination-page' })
-import { ref, watch, computed } from 'vue'
-const emits = defineEmits(['handleChange'])
-
-const props = defineProps({
-  total: {
-    type: [String, Number],
-    default: 0
-  },
-  page: {
-    type: Number,
-    default: 1
-  },
-  limit: {
-    type: Number,
-    default: 10
-  },
-  pageSizes: {
-    type: Array,
-    default: () => [5, 10, 15, 20]
-  },
-  layout: {
-    type: String,
-    default: 'total, prev, pager, next, jumper'
-  },
-  autoScroll: {
-    type: Boolean,
-    default: true
-  },
-  hidden: {
-    type: Boolean,
-    default: false
-  },
-  totalVisible: {
-    type: Number,
-    default: 7
-  }
-})
-
-const currentPage = ref(1)
-const currentJump = ref(null)
-currentPage.value = props.page
-
-watch(() => props.page, (newVal) => {
-  currentPage.value = newVal
-}, { deep: true })
-
-
-const pageLength = computed(() => {
-  return Math.ceil(props.total / props.limit)
-})
-
-const handleCurrentChange = () => {
-  emits('handleChange', currentPage.value)
-}
-
-const handleCurrentJump = () => {
-  if (currentJump.value > pageLength.value) currentJump.value = pageLength.value
-  if (currentJump.value < 1) currentJump.value = 1
-  currentPage.value = +currentJump.value
-  emits('handleChange', currentPage.value)
-}
-</script>
-
-<style lang="scss" scoped>
-.search {
-  width: 80px;
-  height: 50px;
-  display: flex;
-  align-items: center;
-}
-// ::v-deep  .v-text-field--outlined.v-input--dense.v-text-field--outlined > .v-input__control > .v-input__slot {
-//   min-height: 35px;
-// }
-</style>

+ 55 - 55
src/components/Enterprise/components/positions.vue

@@ -7,8 +7,7 @@
           :class="['category-item', {'default-active': k.active}]" 
           v-for="k in positionCategory" 
           :key="k.id"
-          @mouseenter="k.active = true"
-          @mouseleave="k.active = false"
+          @click="handleClickCategory(k)"
         >{{ k.id === '-1' ? `${k.label}` : `${k.label} (${k.number})` }}</span>
       </div>
     </div>
@@ -20,7 +19,7 @@
       <div style="width: 200px;">
         <v-text-field  variant="outlined" placeholder="请输入职位名称" hide-details>
           <template #append-inner>
-            <v-btn color="primary" size="x-small">搜索</v-btn>
+            <v-btn color="primary" size="x-small" @click="getPositionList">搜索</v-btn>
           </template>
         </v-text-field>
       </div>
@@ -37,21 +36,21 @@
       @click="handlePosition(val)"
     >
       <div>
-        <p :class="['name', {'default-active': val.active }]">{{ val.name }}</p>
+        <p :class="['name', {'default-active': val.active }]">{{ val.job.name }}</p>
         <div style="line-height: 40px;">
           <span v-for="k in desc" :key="k.mdi" class="mr-5">
             <v-icon color="#666" size="15">{{ k.mdi }}</v-icon>
-            <span class="ml-1 tag-text">{{ val[k.value] }}</span>
+            <span class="ml-1 tag-text">{{ val.job[k.value] }}</span>
           </span>
         </div>
       </div>
       <div v-if="!val.active" class="text-right">
-        <p class="salary">{{ val.payFrom }}-{{ val.payTo }}k/{{ val.payName }}</p>
-        <div class="update-time">{{ timesTampChange(val.updateTime) }} 刷新</div>
+        <p class="salary">{{ val.job.payFrom }}-{{ val.job.payTo }}/{{ val.job.payName }}</p>
+        <div class="update-time">{{ timesTampChange(val.job.updateTime) }} 刷新</div>
       </div>
       <div v-else class="account-info">
-        <v-avatar image="https://cdn.vuetifyjs.com/images/john.jpg"></v-avatar>
-        <span class="account-label">陈北方 · 人事经理</span>
+        <v-avatar :image="val.contact.avatar"></v-avatar>
+        <span class="account-label">{{ val.contact.name }} · {{ val.contact.postNameCn }}</span>
         <span>
           <v-btn class="half-button" color="primary" size="small">立即沟通</v-btn>
         </span>
@@ -71,8 +70,9 @@ defineOptions({ name: 'recruitment-positions'})
 import { ref } from 'vue'
 import { timesTampChange } from '@/utils/date'
 import { getDict } from '@/hooks/web/useDictionaries'
-import { getJobAdvertisedPositionCount, getJobAreaByEnterpriseId } from '@/api/position'
-import MPagination from '@/components/CtVuetify/CtPagination'
+import { dealDictData } from '@/views/recruit/position/components/dict'
+import { getJobAdvertisedPositionCount, getJobAreaByEnterpriseId, getJobAdvertisedSearch } from '@/api/position'
+import MPagination from '@/components/CtPagination'
 import expType from '@/views/recruit/position/components/conditionFilter/expType.vue'
 import educationType from '@/views/recruit/position/components/conditionFilter/educationType.vue'
 import payScope from '@/views/recruit/position/components/conditionFilter/payScope.vue'
@@ -85,18 +85,14 @@ const props = defineProps({
   }
 })
 
-const total = ref(12)
+const total = ref(0)
 const pageInfo = ref({
-  size: 3,
+  size: 10,
   current: 1
 })
 
-const handleChangePage = (index) => {
-  console.log(index, 'handle-page')
-}
-
 const handlePosition = (val) => {
-  window.open(`/recruit/position/details/${val.positionId}`)
+  window.open(`/recruit/position/details/${val.job.positionId}`)
 }
 
 // 行业列表
@@ -121,44 +117,45 @@ const getData = async () => {
 }
 getData()
 
-const list = ref([
-  {
-    name: '产品经理',
-    payFrom: 6,
-    payTo: 11,
-    payName: '月',
-    updateTime: 1716175909224,
-    areaName: '广州',
-    eduName: '本科',
-    expName: '1-3年',
-    active: false,
-    positionId: 4
-  },
-  {
-    name: '产品经理',
-    payFrom: 6,
-    payTo: 11,
-    payName: '月',
-    updateTime: 1716175909224,
-    areaName: '广州',
-    eduName: '本科',
-    expName: '1-3年',
-    active: false,
-    positionId: 4
-  },
-  {
-    name: '产品经理',
-    payFrom: 6,
-    payTo: 11,
-    payName: '月',
-    updateTime: 1716175909224,
-    areaName: '广州',
-    eduName: '本科',
-    expName: '1-3年',
-    active: false,
-    positionId: 4
+// 职位类别选中
+const handleClickCategory = (k) => {
+  positionCategory.value.map(e => e.active = false)
+  k.active = !k.active
+}
+
+// 职位列表
+const list = ref([])
+const getPositionList = async () => {
+  const pageReqVO = {
+    ...pageInfo.value,
+    // content: '',
+    // areaIds: [],
+    // expType: 0,
+    // eduType: 0,
+    // payType: 0,
+    // jobType: 0,
+    // positionId: 0,
+    // enterpriseType: 0,
+    // industryIds: [],
+    // scale: 0,
+    // financingStatus: 0,
+    enterpriseId: props.info.enterprise.id
   }
-])
+  const { list: arr, total: number } = await getJobAdvertisedSearch({ ...pageReqVO })
+  total.value = number
+  list.value = arr.map(e => {
+    e.job = { ...e.job, ...dealDictData({}, e.job) }
+    return e
+  })
+}
+getPositionList()
+
+const handleChangePage = (index) => {
+  pageInfo.value.current = index
+  getPositionList()
+}
+
+// 城市、学历、工作经验
 const desc = [
   { mdi: 'mdi-map-marker-outline', value: 'areaName' },
   { mdi: 'mdi-school-outline', value: 'eduName' },
@@ -218,6 +215,9 @@ const desc = [
   color: #888;
   font-weight: 600;
   cursor: pointer;
+  &:hover {
+    color: var(--v-primary-base);
+  }
 }
 :deep(.v-field__input) {
   height: 28px;

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

@@ -110,7 +110,7 @@ const localeStore = useLocaleStore()
 const list = ref([
   { text: '首页', path: '/home' },
   { text: '职位', path: '/recruit/position' },
-  { text: '公司', path: '' }
+  { text: '公司', path: '/recruit/company' }
 ])
 
 import { useRouter } from 'vue-router'

+ 3 - 1
src/permission.js

@@ -14,7 +14,9 @@ const whiteList = [
   '/bind',
   '/register',
   '/privacyPolicy',
-  '/userAgreement'
+  '/userAgreement',
+  '/company/search',
+  '/recruit/position'
 ]
 
 // 路由守卫

+ 8 - 0
src/router/modules/recruit.js

@@ -15,6 +15,14 @@ const recruit = [
           title: '职位'
         }
       },
+      {
+        path: '/recruit/company',
+        component: () => import('@/views/recruit/company'),
+        name: 'recruitCompany',
+        meta: {
+          title: '公司'
+        }
+      },
       {
         path: '/recruit/position/details/:id',
         component: () => import('@/views/recruit/position/components/details'),

+ 101 - 0
src/styles/recruit/company.css

@@ -0,0 +1,101 @@
+.label-title {
+  width: 64px;
+  font-weight: 500;
+  margin-right: 24px;
+  color: #222;
+}
+
+.label-content {
+  flex: 1;
+}
+
+.label-color {
+  color: #222;
+  font-size: 14px;
+  margin-right: 24px;
+  display: inline-block;
+  cursor: pointer;
+}
+
+.label-color:hover {
+  color: var(--v-primary-base);
+}
+
+.actives {
+  color: var(--v-primary-base);
+  font-weight: 600;
+}
+
+.company-box {
+  display: flex;
+  flex-wrap: wrap;
+}
+
+.sub-li {
+  position: relative;
+  width: calc((100% - 36px) / 4);
+  min-width: calc((100% - 36px) / 4);
+  max-width: calc((100% - 36px) / 4);
+  margin: 0 12px 12px 0;
+  height: 130px;
+  border-radius: 12px;
+  padding: 0;
+  overflow: hidden;
+  transition: all .2s linear;
+  background-color: #fff;
+  cursor: pointer;
+}
+
+.sub-li:nth-child(4n) {
+  margin-right: 0;
+}
+
+.sub-li:hover {
+  box-shadow: 0 16px 40px 0 rgba(153, 153, 153, 0.3);
+}
+
+.company-info {
+  float: left;
+  margin-left: 16px;
+  width: 282px;
+}
+
+.company-info-top {
+  display: flex;
+  height: 76px;
+  padding: 16px 20px;
+  overflow: hidden;
+}
+
+.company-info h3 {
+  height: 22px;
+  font-size: 16px;
+  font-weight: 400;
+  color: #222;
+  line-height: 22px;
+  margin: 0 0 4px 0;
+  padding: 0;
+  max-width: 100%;
+  overflow: hidden;
+  white-space: nowrap;
+  text-overflow: ellipsis;
+}
+
+.company-info p {
+  height: 18px;
+  font-size: 13px;
+  font-weight: 400;
+  color: #999;
+  line-height: 18px;
+}
+
+.company-info-bottom {
+  width: 100%;
+  overflow: hidden;
+  white-space: nowrap;
+  text-overflow: ellipsis;
+  padding: 16px 20px;
+  font-size: 14px;
+  color: #999;
+  background-color: #f8fcfb;
+}

+ 1 - 0
src/styles/recruit/company.min.css

@@ -0,0 +1 @@
+.label-title{width:64px;font-weight:500;margin-right:24px;color:#222}.label-content{flex:1}.label-color{color:#222;font-size:14px;margin-right:24px;display:inline-block;cursor:pointer}.label-color:hover{color:var(--v-primary-base)}.actives{color:var(--v-primary-base);font-weight:600}.company-box{display:flex;flex-wrap:wrap}.sub-li{position:relative;width:calc((100% - 36px) / 4);min-width:calc((100% - 36px) / 4);max-width:calc((100% - 36px) / 4);margin:0 12px 12px 0;height:130px;border-radius:12px;padding:0;overflow:hidden;transition:all .2s linear;background-color:#fff;cursor:pointer}.sub-li:nth-child(4n){margin-right:0}.sub-li:hover{box-shadow:0 16px 40px 0 rgba(153,153,153,0.3)}.company-info{float:left;margin-left:16px;width:282px}.company-info-top{display:flex;height:76px;padding:16px 20px;overflow:hidden}.company-info h3{height:22px;font-size:16px;font-weight:400;color:#222;line-height:22px;margin:0 0 4px 0;padding:0;max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.company-info p{height:18px;font-size:13px;font-weight:400;color:#999;line-height:18px}.company-info-bottom{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:16px 20px;font-size:14px;color:#999;background-color:#f8fcfb}

+ 93 - 0
src/styles/recruit/company.scss

@@ -0,0 +1,93 @@
+// 筛选样式
+.label-title {
+  width: 64px;
+  font-weight: 500;
+  margin-right: 24px;
+  color: #222;
+}
+.label-content {
+  flex: 1;
+}
+.label-color {
+  color: #222;
+  font-size: 14px;
+  margin-right: 24px;
+  display: inline-block;
+  cursor: pointer;
+  &:hover {
+    color: var(--v-primary-base);
+  }
+}
+.actives {
+  color: var(--v-primary-base);
+  font-weight: 600;
+}
+
+
+// 公司列表
+.company-box {
+  display: flex;
+  flex-wrap: wrap;
+}
+
+.sub-li {
+  position: relative;
+  width: calc((100% - 36px) / 4);
+  min-width: calc((100% - 36px) / 4);
+  max-width: calc((100% - 36px) / 4);
+  margin: 0 12px 12px 0;
+  height: 130px;
+  border-radius: 12px;
+  padding: 0;
+  overflow: hidden;
+  transition: all .2s linear;
+  background-color: #fff;
+  cursor: pointer;
+  &:nth-child(4n) {
+    margin-right: 0;
+  }
+  &:hover {
+    box-shadow: 0 16px 40px 0 rgba(153, 153, 153, .3);
+  }
+}
+.company-info {
+  float: left;
+  margin-left: 16px;
+  width: 282px;
+}
+.company-info-top {
+  display: flex;
+  height: 76px;
+  padding: 16px 20px;
+  overflow: hidden;
+}
+.company-info h3 {
+  height: 22px;
+  font-size: 16px;
+  font-weight: 400;
+  color: #222;
+  line-height: 22px;
+  margin: 0 0 4px 0;
+  padding: 0;
+  max-width: 100%;
+  overflow: hidden;
+  white-space: nowrap;
+  text-overflow: ellipsis;
+}
+.company-info p {
+  height: 18px;
+  font-size: 13px;
+  font-weight: 400;
+  color: #999;
+  line-height: 18px;
+}
+.company-info-bottom {
+  width: 100%;
+  overflow: hidden;
+  white-space: nowrap;
+  text-overflow: ellipsis;
+  padding: 16px 20px;
+  font-size: 14px;
+  color: #999;
+  background-color: #f8fcfb;
+}

+ 42 - 0
src/views/recruit/company/components/areaType.vue

@@ -0,0 +1,42 @@
+<template>
+  <div class="d-flex">
+    <div class="label-title">公司地点</div>
+    <div class="label-content">
+      <span 
+        v-for="k in items" 
+        :key="k.id"
+        :class="['label-color', {'actives': k.active}]"
+        @click="handleItemClick(k)"
+      >{{ k.name }}</span>
+    </div>
+  </div>
+</template>
+
+<script setup>
+defineOptions({ name: 'search-area-type'})
+import { ref } from 'vue'
+import { getHotArea } from '@/api/common'
+
+const emits = defineEmits(['handleClick'])
+
+const items = ref([])
+const getAreaList = async () => {
+  const data = await getHotArea()
+  const list = data.slice(0, 13).map(e => {
+    e.active = false
+    return e
+  })
+  items.value = [{ id: -1, name: '全国', active: true }, ...list, { id: 'all', name: '更多城市' }]
+}
+getAreaList()
+
+const handleItemClick = (k) => {
+  items.value.map(e => e.active = false)
+  k.active = true
+  emits('handleClick', k, 'scale')
+}
+</script>
+
+<style scoped lang="scss">
+@import '@/styles/recruit/company.scss';
+</style>

+ 79 - 0
src/views/recruit/company/components/companyItem.vue

@@ -0,0 +1,79 @@
+<template>
+  <div class="company-box">
+    <div class="sub-li" v-for="item in list" :key="item.id" @mouseenter="item.active = true" @mouseleave="item.active = false">
+      <div class="company-info-top" @click="handleClickEnterprise(item)">
+        <div class="float-left">
+          <v-img src="https://img.bosszhipin.com/beijin/mcs/banner/3e9d37e9effaa2b6daf43f3f03f7cb15cfcd208495d565ef66e7dff9f98764da.jpg" :alt="item.anotherName" :width="40" style="height: 40px;border-radius: 4px;"/>
+        </div>
+        <div class="company-info">
+          <h3 :class="{'default-active': item.active }">{{ item.anotherName }}</h3>
+          <p>{{ item.financingName }}<span class="mx-2">|</span>{{ item.industryName }}</p>
+        </div>
+      </div>
+      <div class="company-info-bottom">
+        热招 | 
+        <span style="color: var(--v-primary-base)">产品经理</span>
+        <span style="color: #000;"> · 6-11k</span>
+        等
+        <span style="color: var(--v-primary-base)"> 96 </span>
+        个职位
+      </div>
+    </div>
+  </div>
+</template>
+
+<script setup>
+defineOptions({ name: 'company-item'})
+import { ref } from 'vue'
+
+const handleClickEnterprise = (item) => {
+  console.log(item)
+  // window.open(`/enterprise/details/${item.id}`)
+}
+const list = ref([
+  {
+    anotherName: 'xxx科技有限公司',
+    financingName: '未融资',
+    scaleName: '0-20人',
+    industryName: '互联网/AI',
+    id: 1,
+    active: false
+  },
+  {
+    anotherName: 'xxx科技有限公司',
+    financingName: '未融资',
+    scaleName: '0-20人',
+    industryName: '互联网/AI',
+    id: 2,
+    active: false
+  },
+  {
+    anotherName: 'xxx科技有限公司',
+    financingName: '未融资',
+    scaleName: '0-20人',
+    industryName: '互联网/AI',
+    id: 3,
+    active: false
+  },
+  {
+    anotherName: 'xxx科技有限公司',
+    financingName: '未融资',
+    scaleName: '0-20人',
+    industryName: '互联网/AI',
+    id: 4,
+    active: false
+  },
+  {
+    anotherName: 'xxx科技有限公司',
+    financingName: '未融资',
+    scaleName: '0-20人',
+    industryName: '互联网/AI',
+    id: 5,
+    active: false
+  }
+])
+</script>
+
+<style scoped lang="scss">
+@import url('@/styles/recruit/company.scss');
+</style>

+ 42 - 0
src/views/recruit/company/components/industryType.vue

@@ -0,0 +1,42 @@
+<template>
+  <div class="d-flex">
+    <div class="label-title">行业类型</div>
+    <div class="label-content">
+      <span 
+        v-for="k in items" 
+        :key="k.id"
+        :class="['label-color', {'actives': k.active}]"
+        @click="handleItemClick(k)"
+      >{{ k.nameCn }}</span>
+    </div>
+  </div>
+</template>
+
+<script setup>
+defineOptions({ name: 'search-industry-type'})
+import { ref } from 'vue'
+import { getIndustryTreeData } from '@/api/common/index'
+const emits = defineEmits(['handleClick'])
+
+const items = ref([])
+const getList = async () => {
+  const data = await getIndustryTreeData({ level: 1 })
+  const list = data.map(e => {
+    e.active = false
+    return e
+  })
+  items.value = [{ id: -1, nameCn: '不限', active: true }, ...list]
+}
+getList()
+
+
+const handleItemClick = (k) => {
+  items.value.map(e => e.active = false)
+  k.active = true
+  emits('handleClick', k, 'scale')
+}
+</script>
+
+<style scoped lang="scss">
+@import '@/styles/recruit/company.scss';
+</style>

+ 40 - 0
src/views/recruit/company/components/natureType.vue

@@ -0,0 +1,40 @@
+<template>
+  <div class="d-flex">
+    <div class="label-title">企业性质</div>
+    <div class="label-content">
+      <span 
+        v-for="k in items" 
+        :key="k.id"
+        :class="['label-color', {'actives': k.active}]"
+        @click="handleItemClick(k)"
+      >{{ k.label }}</span>
+    </div>
+  </div>
+</template>
+
+<script setup>
+defineOptions({ name: 'search-nature-type'})
+import { ref } from 'vue'
+import { getDict } from '@/hooks/web/useDictionaries'
+const emits = defineEmits(['handleClick'])
+
+const items = ref([])
+getDict('menduner_enterprise_type').then(({ data }) => {
+  data = data?.length && data || []
+  const list = data.map(e => {
+    e.active = false
+    return e
+  })
+  items.value = [{ id: -1, label: '不限', active: true }, ...list]
+})
+
+const handleItemClick = (k) => {
+  items.value.map(e => e.active = false)
+  k.active = true
+  emits('handleClick', k, 'scale')
+}
+</script>
+
+<style scoped lang="scss">
+@import '@/styles/recruit/company.scss';
+</style>

+ 61 - 0
src/views/recruit/company/components/scaleType.vue

@@ -0,0 +1,61 @@
+<template>
+  <div class="d-flex">
+    <div class="label-title">公司规模</div>
+    <div class="label-content">
+      <span 
+        v-for="k in items" 
+        :key="k.id"
+        :class="['label-color', {'actives': k.active}]"
+        @click="handleItemClick(k)"
+      >{{ k.label }}</span>
+    </div>
+  </div>
+</template>
+
+<script setup>
+defineOptions({ name: 'search-scale-type'})
+import { ref, watch } from 'vue'
+import { getDict } from '@/hooks/web/useDictionaries'
+
+const emits = defineEmits(['handleClick', 'clear'])
+const props = defineProps({
+  isClear: {
+    type: Boolean,
+    default: false
+  }
+})
+watch(
+  () => props.isClear, 
+  (newVal) => {
+    // console.log(newVal, 'newVal')
+    if (!newVal) return
+    // 清空筛选条件时默认选中不限
+    items.value.map(e => {
+      e.active = false
+      if (e.id === -1) e.active = true
+      return e
+    })
+    emits('clear')
+  }
+)
+
+const items = ref([])
+getDict('menduner_scale').then(({ data }) => {
+  data = data?.length && data || []
+  const list = data.map(e => {
+    e.active = false
+    return e
+  })
+  items.value = [{ id: -1, label: '不限', active: true }, ...list]
+})
+
+const handleItemClick = (k) => {
+  items.value.map(e => e.active = false)
+  k.active = true
+  emits('handleClick', k, 'scale')
+}
+</script>
+
+<style scoped lang="scss">
+@import '@/styles/recruit/company.scss';
+</style>

+ 39 - 10
src/views/recruit/company/index.vue

@@ -1,16 +1,45 @@
-<!-- 检索列表页 - 公司检索 -->
 <template>
-  <div>
-    检索
-  </div>
-  <div>筛选条件</div>
-  <div>
-    <div>
-      左侧列表
+  <div class="default-width">
+    <div class="white-bgc py-3">
+      <headSearch></headSearch>
+      <div class="px-5 mt-3 clear-parent">
+        <areaType class="mb-3" :isClear="clear"></areaType>
+        <industryType :isClear="clear"></industryType>
+        <natureType class="my-5" :isClear="clear"></natureType>
+        <scaleType :isClear="clear" @clear="clear = false"></scaleType>
+        <div class="clear" @click="clear = true">清空筛选条件</div>
+      </div>
     </div>
-    <div>右侧列表</div>
+    <companyItem class="mt-3"></companyItem>
   </div>
 </template>
+
 <script setup>
 defineOptions({name: 'retrieval-company-page'})
-</script>
+import { ref } from 'vue'
+import headSearch from '@/components/headSearch'
+import scaleType from './components/scaleType'
+import natureType from './components/natureType'
+import industryType from './components/industryType'
+import areaType from './components/areaType'
+import companyItem from './components/companyItem'
+
+const clear = ref(false)
+</script>
+
+<style lang="scss" scoped>
+.clear-parent {
+  position: relative
+}
+.clear {
+  position: absolute;
+  bottom: 0;
+  right: 30px;
+  color: #999;
+  font-size: 14px;
+  cursor: pointer;
+  &:hover {
+    color: var(--v-primary-base);
+  }
+}
+</style>

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

@@ -103,7 +103,7 @@ const getPositionList = async () => {
     scale: 0, // 人员规模(0-20人,20-99人)示例值(1)
     financingStatus: 0 // 融资阶段(未融资,天使轮,A轮,不需要融资),示例值(1)
   }
-  const res = await getJobAdvertisedSearch({ pageReqVO })
+  const res = await getJobAdvertisedSearch({ ...pageReqVO })
   // items.value = res.list
   items.value = [...res.list, test]
   total.value = res.total