mirror of
https://github.com/cool-team-official/cool-admin-midway.git
synced 2024-11-01 22:20:30 +08:00
配合前端完善字典值匹配
This commit is contained in:
parent
d8aa27ecd0
commit
139b6b1063
@ -50,7 +50,13 @@ export class DictInfoService extends BaseService {
|
||||
.addOrderBy('a.createTime', 'ASC')
|
||||
.getMany();
|
||||
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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user