优化字典自定义值判断

This commit is contained in:
cool 2023-12-08 19:00:32 +08:00
parent 79e0f21545
commit bb94d5dcb4

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 ? e.value : e.id);
const value = e.value ? Number(e.value) : e.value;
return {
...e,
value: isNaN(value) ? e.value : value,