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({
|
@CoolController({
|
||||||
api: ['add', 'delete', 'update', 'info', 'list', 'page'],
|
api: ['add', 'delete', 'update', 'info', 'list', 'page'],
|
||||||
entity: DictInfoEntity,
|
entity: DictInfoEntity,
|
||||||
pageQueryOp: {
|
listQueryOp: {
|
||||||
fieldEq: ['typeId'],
|
fieldEq: ['typeId'],
|
||||||
keyWordLikeFields: ['name'],
|
keyWordLikeFields: ['name'],
|
||||||
|
addOrderBy: {
|
||||||
|
createTime: 'ASC',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
export class AdminDictInfoController extends BaseController {
|
export class AdminDictInfoController extends BaseController {
|
||||||
|
@ -40,6 +40,7 @@ export class DictInfoService extends BaseService {
|
|||||||
}),
|
}),
|
||||||
})
|
})
|
||||||
.orderBy('orderNum', 'ASC')
|
.orderBy('orderNum', 'ASC')
|
||||||
|
.addOrderBy('a.createTime', 'ASC')
|
||||||
.getMany();
|
.getMany();
|
||||||
for (const item of typeData) {
|
for (const item of typeData) {
|
||||||
result[item.key] = _.filter(data, { typeId: item.id });
|
result[item.key] = _.filter(data, { typeId: item.id });
|
||||||
|
Loading…
Reference in New Issue
Block a user