字典支持多级

This commit is contained in:
小鹏 2022-07-15 18:22:44 +08:00
parent 93f250f8ef
commit 9710751c19
2 changed files with 5 additions and 1 deletions

View File

@ -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 {

View File

@ -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 });