30 lines
866 B
TypeScript
30 lines
866 B
TypeScript
import { AbstractDictionaryCache } from './AbstractDictionaryCache'
|
|
import { DefaultOptionType } from "ant-design-vue/es/select";
|
|
/**
|
|
* 多租户配置
|
|
*/
|
|
class AppDictionaryLablesCache extends AbstractDictionaryCache {
|
|
protected code: string = "personality";
|
|
public static _lock: Promise<void> | null = null;
|
|
constructor() {
|
|
super(AppDictionaryLablesCache._lock);
|
|
}
|
|
/**
|
|
* 获取字典服务
|
|
* @returns Promise<any>
|
|
*/
|
|
protected override async getSysDictionaryService(): Promise<any> {
|
|
return [];
|
|
}
|
|
|
|
|
|
public async getDataListSelect(): Promise<DefaultOptionType[]> {
|
|
const _data = await this.getDataList();
|
|
return _data.map((item) => {
|
|
return { label: item.name, value: item.value, name: item.code, } as DefaultOptionType;
|
|
});
|
|
}
|
|
|
|
}
|
|
|
|
export default AppDictionaryLablesCache; |