Bläddra i källkod

公司检索-公司规模

Xiao_123 1 år sedan
förälder
incheckning
cc4d9286db

+ 2 - 3
src/components/Enterprise/components/positions.vue

@@ -46,8 +46,7 @@
       </div>
       <div v-if="!val.active" class="text-right">
         <p class="salary">{{ val.job.payFrom }}-{{ val.job.payTo }}/{{ val.job.payName }}</p>
-        <!-- <div class="update-time">{{ timesTampChange(val.updateTime) }} 刷新</div> -->
-        <div class="update-time">2024-05-21 18:09:31 刷新</div>
+        <div class="update-time">{{ timesTampChange(val.job.updateTime) }} 刷新</div>
       </div>
       <div v-else class="account-info">
         <v-avatar :image="val.contact.avatar"></v-avatar>
@@ -69,7 +68,7 @@
 <script setup>
 defineOptions({ name: 'recruitment-positions'})
 import { ref } from 'vue'
-// import { timesTampChange } from '@/utils/date'
+import { timesTampChange } from '@/utils/date'
 import { getDict } from '@/hooks/web/useDictionaries'
 import { dealDictData } from '@/views/recruit/position/components/dict'
 import { getJobAdvertisedPositionCount, getJobAreaByEnterpriseId, getJobAdvertisedSearch } from '@/api/position'

+ 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'),

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

@@ -0,0 +1,26 @@
+.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;
+  cursor: pointer;
+}
+
+.label-color:hover {
+  color: var(--v-primary-base);
+}
+
+.actives {
+  color: var(--v-primary-base);
+  font-weight: 600;
+}

+ 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;cursor:pointer}.label-color:hover{color:var(--v-primary-base)}.actives{color:var(--v-primary-base);font-weight:600}

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

@@ -0,0 +1,22 @@
+.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;
+  cursor: pointer;
+  &:hover {
+    color: var(--v-primary-base);
+  }
+}
+.actives {
+  color: var(--v-primary-base);
+  font-weight: 600;
+}

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

@@ -0,0 +1,31 @@
+<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-area-type'})
+import { ref } from 'vue'
+const emits = defineEmits(['handleClick'])
+
+const items = ref([])
+
+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>

+ 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>

+ 40 - 0
src/views/recruit/company/components/scaleType.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-scale-type'})
+import { ref } from 'vue'
+import { getDict } from '@/hooks/web/useDictionaries'
+const emits = defineEmits(['handleClick'])
+
+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>

+ 13 - 9
src/views/recruit/company/index.vue

@@ -1,16 +1,20 @@
-<!-- 检索列表页 - 公司检索 -->
 <template>
-  <div>
-    检索
-  </div>
-  <div>筛选条件</div>
-  <div>
-    <div>
-      左侧列表
+  <div class="default-width py-3 white-bgc">
+    <headSearch></headSearch>
+    <div class="px-5 mt-3">
+      <areaType class="mb-3"></areaType>
+      <industryType></industryType>
+      <natureType class="my-5"></natureType>
+      <scaleType></scaleType>
     </div>
-    <div>右侧列表</div>
   </div>
 </template>
+
 <script setup>
 defineOptions({name: 'retrieval-company-page'})
+import headSearch from '@/components/headSearch'
+import scaleType from './components/scaleType'
+import natureType from './components/natureType.vue'
+import industryType from './components/industryType.vue'
+import areaType from './components/areaType.vue'
 </script>