mirror of
https://github.com/certd/certd.git
synced 2025-11-25 09:10:11 +08:00
perf: 选项显示图标
This commit is contained in:
@@ -2,6 +2,7 @@ import { ALL, Body, Controller, Inject, Post, Provide, Query } from '@midwayjs/c
|
||||
import { Constants, CrudController } from '@certd/lib-server';
|
||||
import { AccessService } from '../../modules/pipeline/service/access-service.js';
|
||||
import { AuthService } from '../../modules/sys/authority/service/auth-service.js';
|
||||
import { AccessDefine } from '@certd/pipeline';
|
||||
|
||||
/**
|
||||
* 授权
|
||||
@@ -77,12 +78,13 @@ export class AccessController extends CrudController<AccessService> {
|
||||
|
||||
@Post('/accessTypeDict', { summary: Constants.per.authOnly })
|
||||
async getAccessTypeDict() {
|
||||
const list = this.service.getDefineList();
|
||||
const list: AccessDefine[] = this.service.getDefineList();
|
||||
const dict = [];
|
||||
for (const item of list) {
|
||||
dict.push({
|
||||
value: item.name,
|
||||
label: item.title,
|
||||
icon: item.icon,
|
||||
});
|
||||
}
|
||||
return this.ok(dict);
|
||||
|
||||
Reference in New Issue
Block a user