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
9326dd8e9c
commit
79e0f21545
@ -51,7 +51,7 @@ export class DictInfoService extends BaseService {
|
|||||||
.getMany();
|
.getMany();
|
||||||
for (const item of typeData) {
|
for (const item of typeData) {
|
||||||
result[item.key] = _.filter(data, { typeId: item.id }).map(e => {
|
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 {
|
return {
|
||||||
...e,
|
...e,
|
||||||
value: isNaN(value) ? e.value : value,
|
value: isNaN(value) ? e.value : value,
|
||||||
|
Loading…
Reference in New Issue
Block a user