优化字典

This commit is contained in:
cool 2023-12-01 11:07:08 +08:00
parent 9326dd8e9c
commit 79e0f21545

View File

@ -51,7 +51,7 @@ export class DictInfoService extends BaseService {
.getMany();
for (const item of typeData) {
result[item.key] = _.filter(data, { typeId: item.id }).map(e => {
const value = Number(e.value);
const value = Number(e.value ? e.value : e.id);
return {
...e,
value: isNaN(value) ? e.value : value,