|
@@ -33,12 +33,18 @@ const items = ref([])
|
|
|
const dictObj = reactive({
|
|
|
payUnit: [], // 薪资单位
|
|
|
scale: [], // 规模
|
|
|
- industry: [] // 行业
|
|
|
+ industry: [], // 行业
|
|
|
+ edu: [], // 学历
|
|
|
+ exp: [], // 工作经验
|
|
|
+ area: [] // 地区
|
|
|
})
|
|
|
const dictList = [
|
|
|
{ type: 'menduner_pay_unit', value: 'payUnit', key: 'payUnit', label: 'payName' },
|
|
|
{ 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 })
|
|
|
dictList.forEach(item => {
|
|
|
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.active = false
|
|
|
return e
|