Xiao_123 1 vuosi sitten
vanhempi
commit
bf0d1c09a1

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

@@ -71,4 +71,12 @@ export const getIndustryListData = async (params) => {
     url: '/app-api/menduner/system/industry/list',
     url: '/app-api/menduner/system/industry/list',
     params
     params
   })
   })
+}
+
+// 获取地区列表
+export const getAreaListData = async (params) => {
+  return await request.get({
+    url: '/app-api/menduner/system/area/list',
+    params
+  })
 }
 }

+ 17 - 5
src/components/Position/item.vue

@@ -10,8 +10,11 @@
           </div>
           </div>
           <p class="salary">{{ item.payFrom }}-{{ item.payTo }}/{{ item.payName }}</p>
           <p class="salary">{{ item.payFrom }}-{{ item.payTo }}/{{ item.payName }}</p>
         </div>
         </div>
-        <div style="height: 24px;">
-          <v-chip size="x-small" label v-for="(k, i) in tagList" :key="i" class="mr-1" color="#666">{{ k }}</v-chip>
+        <div style="height: 24px;overflow: hidden;">
+          <v-chip size="x-small" label v-for="(k, i) in item.tagList" :key="i" class="mr-1" color="#666">{{ k }}</v-chip>
+        </div>
+        <div>
+          <v-chip size="x-small" label v-for="(j, i) in desc" :key="i" class="mr-1" color="#666" :prepend-icon="j.mdi">{{ item[j.value] }}</v-chip>
         </div>
         </div>
       </div>
       </div>
       <div class="sub-li-bottom">
       <div class="sub-li-bottom">
@@ -40,7 +43,6 @@ const props = defineProps({
     default: () => []
     default: () => []
   }
   }
 })
 })
-const tagList = ['广州','本科','1-3年']
 const list = ref([])
 const list = ref([])
 watch(
 watch(
   () => props.items, 
   () => props.items, 
@@ -50,6 +52,11 @@ watch(
   { immediate: true },
   { immediate: true },
   { deep: true }
   { deep: true }
 )
 )
+const desc = [
+  { mdi: 'mdi-map-marker-outline', value: 'areaName' },
+  { mdi: 'mdi-school-outline', value: 'eduName' },
+  { mdi: 'mdi-clock-time-ten-outline', value: 'expName' }
+]
 </script>
 </script>
 
 
 <style lang="scss" scoped>
 <style lang="scss" scoped>
@@ -58,11 +65,12 @@ watch(
   flex-wrap: wrap;
   flex-wrap: wrap;
 }
 }
 .sub-li {
 .sub-li {
+  position: relative;
   width: calc((100% - 24px) / 3);
   width: calc((100% - 24px) / 3);
   min-width: calc((100% - 24px) / 3);
   min-width: calc((100% - 24px) / 3);
   max-width: calc((100% - 24px) / 3);
   max-width: calc((100% - 24px) / 3);
   margin: 0 12px 12px 0;
   margin: 0 12px 12px 0;
-  height: 150px;
+  height: 165px;
   border-radius: 12px;
   border-radius: 12px;
   padding: 0;
   padding: 0;
   overflow: hidden;
   overflow: hidden;
@@ -122,8 +130,12 @@ watch(
   }
   }
 }
 }
 .sub-li-bottom {
 .sub-li-bottom {
+  position: absolute;
+  width: 100%;
+  bottom: -6px;
+  left: 0;
   background: linear-gradient(90deg, #f5fcfc 0, #fcfbfa 100%);
   background: linear-gradient(90deg, #f5fcfc 0, #fcfbfa 100%);
-  margin-top: 0;
+  margin-top: 10px;
   padding-top: 0;
   padding-top: 0;
   display: block;
   display: block;
   border: none;
   border: none;

+ 3 - 2
src/hooks/web/useDictionaries.js

@@ -1,4 +1,4 @@
-import { getDictData, getIndustryListData } from '@/api/common/index'
+import { getDictData, getIndustryListData, getAreaListData } from '@/api/common/index'
 // 定义对应的api
 // 定义对应的api
 // const DICT_CITY_API = {
 // const DICT_CITY_API = {
 //   menduner_exp_type: getDictData
 //   menduner_exp_type: getDictData
@@ -22,7 +22,8 @@ export const getDict = (type, params, apiType = 'dict') => {
       const query = params ? params : { type }
       const query = params ? params : { type }
       const apiFn = {
       const apiFn = {
         dict: getDictData,
         dict: getDictData,
-        industryList: getIndustryListData
+        industryList: getIndustryListData,
+        areaList: getAreaListData
       }
       }
       apiFn[apiType](query).then(data => {
       apiFn[apiType](query).then(data => {
         setDict(type, data, Date.now())
         setDict(type, data, Date.now())

+ 10 - 4
src/views/Home/personal/components/hotPromotedPositions.vue

@@ -33,12 +33,18 @@ const items = ref([])
 const dictObj = reactive({
 const dictObj = reactive({
   payUnit: [], // 薪资单位
   payUnit: [], // 薪资单位
   scale: [], // 规模
   scale: [], // 规模
-  industry: [] // 行业
+  industry: [], // 行业
+  edu: [], // 学历
+  exp: [], // 工作经验
+  area: [] // 地区
 })
 })
 const dictList = [
 const dictList = [
   { type: 'menduner_pay_unit', value: 'payUnit', key: 'payUnit', label: 'payName' },
   { type: 'menduner_pay_unit', value: 'payUnit', key: 'payUnit', label: 'payName' },
   { type: 'menduner_scale', value: 'scale', key: 'scale', label: 'scaleName' },
   { type: 'menduner_scale', value: 'scale', key: 'scale', label: 'scaleName' },
-  { type: 'menduner_industry_type', value: 'industry', key: 'industryId', label: 'industryName', params: {}, apiType: 'industryList' }
+  { type: 'menduner_industry_type', value: 'industry', key: 'industryId', label: 'industryName', params: {}, apiType: 'industryList', nameKey: 'nameCn', valueKey: 'id' },
+  { type: 'menduner_education_type', value: 'edu', key: 'eduType', label: 'eduName' },
+  { type: 'menduner_exp_type', value: 'exp', key: 'expType', label: 'expName' },
+  { type: 'menduner_area_type', value: 'area', key: 'areaId', label: 'areaName', params: {}, apiType: 'areaList', nameKey: 'name', valueKey: 'id' }
 ]
 ]
 
 
 // 推荐职位
 // 推荐职位
@@ -47,8 +53,8 @@ const getPositionList = async () => {
   const { list } = await api({ pageNo: 1, pageSize: 9 })
   const { list } = await api({ pageNo: 1, pageSize: 9 })
   dictList.forEach(item => {
   dictList.forEach(item => {
     items.value = list.map(e => {
     items.value = list.map(e => {
-      const valueKey = item.type === 'menduner_industry_type' ? 'nameCn' : 'label'
-      const idKey = item.type === 'menduner_industry_type' ? 'id' : 'value'
+      const valueKey = item.nameKey ? item.nameKey : 'label'
+      const idKey = item.valueKey ? item.valueKey : 'value'
       e[item.label] = dictObj[item.value].find(k => Number(k[idKey]) === e[item.key])[valueKey]
       e[item.label] = dictObj[item.value].find(k => Number(k[idKey]) === e[item.key])[valueKey]
       e.active = false
       e.active = false
       return e
       return e