xframelib
Version:
The accumulated front-end development foundation library originates from projects and serves projects.
53 lines (52 loc) • 2.17 kB
TypeScript
import { RouteRecordRaw } from 'vue-router';
import { IRoleFunction, ISysRoleRight } from '../model/IRole';
import { IWidgetConfig } from '../model/Layout';
type IWidgetMenu = any;
/**
* 获得当前系统的授权信息
* @returns
*/
export declare function getCurrentSystemRight(): ISysRoleRight | undefined;
/**
* 获取用户角色权限列表对象
* @param sysID 系统ID
* @param isSuperLevel 当前用户的最高等级
* @returns
*/
export declare function getSystemRoleRight(sysID: string, isSuperLevel?: boolean): Promise<ISysRoleRight | undefined>;
/**
* 获取授权的Route 集合
* @param bussinessRoutes 全部业务路由
* @param roleLevel 角色级别,默认为普通用户,如果为0,则是超级管理员
* @returns
*/
export declare function getRoutes(bussinessRoutes: Array<RouteRecordRaw>, roleLevel?: number): Array<RouteRecordRaw> | undefined;
/**
* 获取授权的Widget Menu集合
* @param widgetMenuConfig 全部widget配置
* @param roleLevel 角色级别,默认为普通用户,如果为0,则是超级管理员
* @returns
*/
export declare function getWidgetMenus(widgetMenuConfig: Array<IWidgetMenu>, roleLevel?: number): Array<IWidgetMenu> | undefined;
/**
* 获取授权的 widget配置对象集合
* @param widgetConfig 全部
* @param roleLevel 角色级别,默认为普通用户,如果为0,则是超级管理员
* @returns
*/
export declare function getWidgetConfig(widgetConfig?: Array<IWidgetConfig>, roleLevel?: number): Array<IWidgetConfig> | undefined;
/**
* 获取授权后的WidgetConfig字典,并内部赋值Global.RightWidgetConfigMap
* @param widgetConfigMap
* @param roleLevel
* @returns
*/
export declare function getWidgetConfigMap(widgetConfigMap: Map<string, Array<IWidgetConfig>>, roleLevel?: number): Map<string, Array<IWidgetConfig>> | undefined;
/**
* 获取授权的功能点集合
* @param functionList 全部功能列表
* @param roleLevel 角色级别,默认为普通用户,如果为0,则是超级管理员
* @returns
*/
export declare function getFunctions(functionList?: Array<IRoleFunction>, roleLevel?: number): IRoleFunction[] | undefined;
export {};