mirror of
https://github.com/cool-team-official/cool-admin-midway.git
synced 2025-12-12 17:42:49 +00:00
配合前端完善字典值匹配
This commit is contained in:
parent
d8aa27ecd0
commit
139b6b1063
@ -50,7 +50,13 @@ export class DictInfoService extends BaseService {
|
|||||||
.addOrderBy('a.createTime', 'ASC')
|
.addOrderBy('a.createTime', 'ASC')
|
||||||
.getMany();
|
.getMany();
|
||||||
for (const item of typeData) {
|
for (const item of typeData) {
|
||||||
result[item.key] = _.filter(data, { typeId: item.id });
|
result[item.key] = _.filter(data, { typeId: item.id }).map(e => {
|
||||||
|
const value = Number(e.value);
|
||||||
|
return {
|
||||||
|
...e,
|
||||||
|
value: isNaN(value) ? e.value : value,
|
||||||
|
};
|
||||||
|
});
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user