|
@@ -37,8 +37,8 @@ const dictObj = reactive({
|
|
|
})
|
|
|
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: {} }
|
|
|
+ { type: 'menduner_scale', value: 'scale', key: 'scale', label: 'scaleName' },
|
|
|
+ { type: 'menduner_industry_type', value: 'industry', key: 'industryId', label: 'industryName', params: {}, apiType: 'industryList' }
|
|
|
]
|
|
|
|
|
|
// 推荐职位
|
|
@@ -47,9 +47,9 @@ 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'
|
|
|
- e[item.label] = dictObj[item.value].find(k => Number(k.value) === e[item.key]).label
|
|
|
+ const valueKey = item.type === 'menduner_industry_type' ? 'nameCn' : 'label'
|
|
|
+ const idKey = item.type === 'menduner_industry_type' ? 'id' : 'value'
|
|
|
+ e[item.label] = dictObj[item.value].find(k => Number(k[idKey]) === e[item.key])[valueKey]
|
|
|
return e
|
|
|
})
|
|
|
})
|
|
@@ -58,7 +58,7 @@ const getPositionList = async () => {
|
|
|
// 字典
|
|
|
const getDictList = async () => {
|
|
|
dictList.forEach(async (val) => {
|
|
|
- const { data } = await getDict(val.type, val.params)
|
|
|
+ const { data } = await getDict(val.type, val.params, val.apiType)
|
|
|
dictObj[val.value] = data
|
|
|
})
|
|
|
}
|