mirror of
https://github.com/cool-team-official/cool-admin-midway.git
synced 2024-11-01 14:10:29 +08:00
字典支持多级
This commit is contained in:
parent
93f250f8ef
commit
9710751c19
@ -10,9 +10,12 @@ import { DictInfoService } from '../../service/info';
|
||||
@CoolController({
|
||||
api: ['add', 'delete', 'update', 'info', 'list', 'page'],
|
||||
entity: DictInfoEntity,
|
||||
pageQueryOp: {
|
||||
listQueryOp: {
|
||||
fieldEq: ['typeId'],
|
||||
keyWordLikeFields: ['name'],
|
||||
addOrderBy: {
|
||||
createTime: 'ASC',
|
||||
},
|
||||
},
|
||||
})
|
||||
export class AdminDictInfoController extends BaseController {
|
||||
|
@ -40,6 +40,7 @@ export class DictInfoService extends BaseService {
|
||||
}),
|
||||
})
|
||||
.orderBy('orderNum', 'ASC')
|
||||
.addOrderBy('a.createTime', 'ASC')
|
||||
.getMany();
|
||||
for (const item of typeData) {
|
||||
result[item.key] = _.filter(data, { typeId: item.id });
|
||||
|
Loading…
Reference in New Issue
Block a user