浏览代码

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

lifanagju_citu 9 月之前
父节点
当前提交
85fdd7b959

+ 0 - 1
components.d.ts

@@ -10,7 +10,6 @@ declare module 'vue' {
     AreaSelect: typeof import('./src/components/AreaSelect/index.vue')['default']
     Autocomplete: typeof import('./src/components/FormUI/autocomplete/index.vue')['default']
     Cascade: typeof import('./src/components/FormUI/cascade/index.vue')['default']
-    Cascader: typeof import('./src/components/FormUI/cascader/index.vue')['default']
     Checkbox: typeof import('./src/components/FormUI/checkbox/index.vue')['default']
     Combobox: typeof import('./src/components/FormUI/combobox/index.vue')['default']
     ComboboxZhAndEn: typeof import('./src/components/FormUI/comboboxZhAndEn/index.vue')['default']

+ 70 - 0
src/views/recruit/personal/company/components/financingStatus.vue

@@ -0,0 +1,70 @@
+<template>
+  <div class="d-flex">
+    <div class="label-title">融资阶段</div>
+    <div class="label-content">
+      <span 
+        v-for="k in items" 
+        :key="k.value"
+        :class="['label-color', {'actives': k.active}]"
+        @click="handleItemClick(k)"
+      >{{ k.label }}</span>
+    </div>
+  </div>
+</template>
+
+<script setup>
+defineOptions({ name: 'search-financing-status'})
+import { ref, watch } from 'vue'
+import { useRoute } from 'vue-router'
+import { getDict } from '@/hooks/web/useDictionaries'
+
+const emits = defineEmits(['handleClick', 'clear'])
+const props = defineProps({
+  isClear: {
+    type: Boolean,
+    default: false
+  }
+})
+watch(
+  () => props.isClear, 
+  (newVal) => {
+    if (!newVal) return
+    // 清空筛选条件时默认选中不限
+    items.value.map(e => {
+      e.active = false
+      if (e.value === -1) e.active = true
+      return e
+    })
+    emits('clear')
+  }
+)
+
+const route = useRoute()
+const routeQuery = route.query
+
+const items = ref([])
+getDict('menduner_financing_status').then(({ data }) => {
+  data = data?.length && data || []
+  const list = data.map(e => {
+    e.active = false
+    return e
+  })
+  items.value = [{ value: -1, label: '不限', active: true }, ...list]
+  // 刷新回显
+  if (routeQuery.financingStatus) {
+    const obj = items.value.find(e => e.value === routeQuery.financingStatus)
+    items.value.map(e => e.active = false)
+    if (obj) obj.active = true
+  }
+})
+
+const handleItemClick = (k) => {
+  items.value.map(e => e.active = false)
+  k.active = true
+  emits('handleClick', k.value, 'financingStatus')
+}
+</script>
+
+<style scoped lang="scss">
+@import '@/styles/recruit/company.scss';
+</style>

+ 11 - 5
src/views/recruit/personal/company/index.vue

@@ -3,9 +3,10 @@
     <div class="white-bgc py-3">
       <headSearch placeholder="搜索公司" @handleSearch="val => handleSearch(val, 'name')"></headSearch>
       <div class="px-5 mt-3 clear-parent">
-        <areaType class="mb-3" :isClear="clear" @handleClick="handleSearch"></areaType>
-        <industryType :isClear="clear" @handleClick="handleSearch"></industryType>
+        <areaType :isClear="clear" @handleClick="handleSearch"></areaType>
+        <!-- <industryType :isClear="clear" @handleClick="handleSearch"></industryType> -->
         <natureType class="my-5" :isClear="clear" @handleClick="handleSearch"></natureType>
+        <financingStatus class="mb-5" :isClear="clear" @clear="clear = false" @handleClick="handleSearch"></financingStatus>
         <scaleType :isClear="clear" @clear="clear = false" @handleClick="handleSearch"></scaleType>
         <div class="clear" @click="handleClear">清空筛选条件</div>
       </div>
@@ -32,7 +33,8 @@ import { dealDictArrayData } from '@/utils/position'
 import headSearch from '@/components/headSearch'
 import scaleType from './components/scaleType'
 import natureType from './components/natureType'
-import industryType from './components/industryType'
+import financingStatus from './components/financingStatus.vue'
+// import industryType from './components/industryType'
 import areaType from './components/areaType'
 import companyItem from './components/companyItem'
 import MPagination from '@/components/CtPagination'
@@ -83,7 +85,10 @@ const getCompanyData = async () => {
 
 const handleClear = () => {
   clear.value = true
-  query.value.pageNo = 1
+  query.value = {
+    pageNo: 1,
+    pageSize: 12
+  }
   router.push(route.path)
   getCompanyData()
 }
@@ -92,7 +97,8 @@ const handleClear = () => {
 if (Object.keys(route.query).length) {
   const objData = {}
   Object.keys(route.query).map(e => {
-    if (e === 'areaIds' || e === 'industryIds') return objData[e] = [route.query[e]]
+    // if (e === 'areaIds' || e === 'industryIds') return objData[e] = [route.query[e]]
+    if (e === 'areaIds') return objData[e] = [route.query[e]]
     else objData[e] = route.query[e]
   })
   if (Object.keys(objData).length) {