xframelib 0.5.6 → 0.5.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -20,12 +20,18 @@ export interface IUIObject {
20
20
  WebSite?: string;
21
21
  /**
22
22
  * 超时锁屏时间(单位:秒s)
23
+ * 自动锁屏时间,为0不锁屏。
23
24
  */
24
25
  LockTime?: number;
25
26
  /**
26
27
  * 是否是能访问互联网,还是内网部署应用
27
28
  * */
28
29
  IsInternet?: boolean;
30
+ /**
31
+ * 网站灰色模式,用于可能悼念的日期开启
32
+ * 默认为false
33
+ */
34
+ GrayMode?: boolean;
29
35
  /**
30
36
  * 其他扩展的属性
31
37
  */
@@ -38,7 +44,19 @@ export interface IServiceURL {
38
44
  /**
39
45
  * 用户登录(统一用户登录)
40
46
  */
41
- LoginAuthURL: string;
47
+ LoginAuthURL?: string;
48
+ /**
49
+ * 文件管理服务地址(统一文件管理:后台)
50
+ */
51
+ FileServiceURL?: string;
52
+ /**
53
+ * 文件管理(统一文件管理:前台)
54
+ */
55
+ FileOnlineURL?: string;
56
+ /**
57
+ * 在线日志服务(统一文件管理)
58
+ */
59
+ LogServiceURL?: string;
42
60
  /**
43
61
  * Axios普通WebAPI的BaseURL
44
62
  * 全局默认的http请求地址(一般与主hprose相同或不同);文件上传地址
@@ -100,3 +118,26 @@ export interface ISystemConfig {
100
118
  APIPath?: object;
101
119
  [props: string]: any;
102
120
  }
121
+ import { Component } from 'vue';
122
+ export declare type Lazy<T> = () => Promise<T>;
123
+ /**
124
+ * 窗体内容配置接口
125
+ */
126
+ export interface IModalConfig {
127
+ /**
128
+ * 唯一ID,与组件名一致
129
+ */
130
+ id: string;
131
+ /**
132
+ * 说明信息
133
+ */
134
+ label?: string;
135
+ /**
136
+ * 动态加载的组件
137
+ */
138
+ component: Lazy<Component>;
139
+ /**
140
+ * 其他可扩展的属性
141
+ */
142
+ [props: string]: any;
143
+ }
@@ -7,9 +7,9 @@ export declare const TOKEN_REFRESH_TIME: number;
7
7
  */
8
8
  export declare const USER_TOKEN_API: {
9
9
  Login: string;
10
- CheckLogin: string;
10
+ ChangeMyPwd: string;
11
11
  Logout: string;
12
- ChangePWD: string;
13
12
  RefreshToken: string;
14
13
  CheckToken: string;
14
+ GetSystemRights: string;
15
15
  };
@@ -8,6 +8,7 @@ export interface IRoleRoute {
8
8
  title?: string;
9
9
  index?: number;
10
10
  children?: IRoleRoute[];
11
+ selected?: boolean;
11
12
  }
12
13
  /**
13
14
  * Widget菜单控制
@@ -18,6 +19,7 @@ export interface IRoleWidgetMenu {
18
19
  path?: string;
19
20
  type?: number;
20
21
  children?: Array<IRoleWidgetMenu>;
22
+ selected?: boolean;
21
23
  }
22
24
  /**
23
25
  * Widget组件权限控制
@@ -51,6 +53,7 @@ export interface IRoleWidget {
51
53
  * 所属组,用于业务分类
52
54
  */
53
55
  group?: string;
56
+ selected?: boolean;
54
57
  }
55
58
  /**
56
59
  * 功能点列表,用于功能点上报和权限过滤
@@ -59,6 +62,7 @@ export interface IRoleFunction {
59
62
  id: string;
60
63
  name: string;
61
64
  children?: Array<IRoleFunction>;
65
+ selected?: boolean;
62
66
  }
63
67
  /**
64
68
  * 系统权限路由菜单-总对象
@@ -2,15 +2,10 @@
2
2
  * 当前存储的token对象
3
3
  */
4
4
  export interface ITokenInfo {
5
- id: string;
6
- name: string;
7
5
  token: string;
8
6
  expire: string;
9
7
  refresh: string;
10
- issystem?: boolean;
11
- issecurity?: boolean;
12
8
  appkey?: string;
13
- role?: string;
14
9
  }
15
10
  /**
16
11
  * 单个token对象内容
@@ -46,25 +41,27 @@ export interface ISystemUser {
46
41
  /**
47
42
  * 用户ID
48
43
  */
49
- id: string;
44
+ id?: string;
50
45
  /**
51
46
  * 用户名
52
47
  */
53
- name: string;
48
+ name?: string;
49
+ doubletoken?: IDoubleToken;
50
+ roles?: IUserRole[];
54
51
  /**
55
- * 用户组ID
52
+ * 外部绑定用户信息ID
56
53
  */
57
- groupid?: string;
58
- photo?: string;
59
- mobile?: string;
60
- qq?: string;
61
- email?: string;
62
- img?: string;
63
- issystem?: boolean;
64
- createtime?: string;
65
- updatetime?: string;
66
- issecurity?: boolean;
67
- appkey?: string;
68
- role?: string;
69
- doubleToken?: IDoubleToken;
54
+ bindid?: string;
55
+ }
56
+ export interface IUserRole {
57
+ id: string;
58
+ name: string;
59
+ level: number;
60
+ createrid?: string;
61
+ syslist?: IUserSystem[];
62
+ }
63
+ export interface IUserSystem {
64
+ id: string;
65
+ name: string;
66
+ version: string;
70
67
  }
@@ -1,5 +1,5 @@
1
1
  import { Component } from 'vue';
2
- export declare type Lazy<T> = () => Promise<T>;
2
+ import type { Lazy } from './Config';
3
3
  /**
4
4
  *布局枚举类型
5
5
  */
@@ -24,6 +24,10 @@ export interface IWidgetLayout {
24
24
  height?: string;
25
25
  }
26
26
  export interface IWidgetConfig {
27
+ /**
28
+ * Layout标识名,以支撑多个布局使用
29
+ */
30
+ layoutID?: string;
27
31
  /**
28
32
  * 唯一ID,与组件名一致
29
33
  */
@@ -57,13 +61,13 @@ export interface IWidgetConfig {
57
61
  */
58
62
  preload?: boolean;
59
63
  /**
60
- * 前置容器ID,一般也就是bindid
64
+ * 前置组件 ID,一般也就是bindid
61
65
  */
62
66
  afterid?: string;
63
67
  /**
64
- * 绑定依赖容器ID,不一定有afterid
68
+ * 20220424 WM:暂时去掉,容易混乱和循环引用
69
+ * 绑定依赖组件ID,不一定有afterid
65
70
  */
66
- bindid?: string;
67
71
  /**
68
72
  * 所属组,用于业务分类
69
73
  */
@@ -72,4 +76,8 @@ export interface IWidgetConfig {
72
76
  * 外部定义布局(备用)
73
77
  */
74
78
  layout?: IWidgetLayout;
79
+ /**
80
+ * 扩展属性,支持应用
81
+ */
82
+ [props: string]: any;
75
83
  }
@@ -1,4 +1,5 @@
1
1
  export * from './Config';
2
- export * from './Token';
2
+ export * from './IUserModel';
3
3
  export * from './Constants';
4
4
  export * from './Layout';
5
+ export * from './IRole';
@@ -0,0 +1,27 @@
1
+ import { ISysRoleRight } from '../model/IRole';
2
+ /**
3
+ * 删除非选中节点
4
+ * @param childrenNodes
5
+ */
6
+ export declare function handleNodes(childrenNodes: any[]): void;
7
+ /**
8
+ * 新旧合并
9
+ * @param newNodes
10
+ * @param oldNodes
11
+ * @param fieldName
12
+ */
13
+ export declare function mergeNodes(newNodes: any[], oldNodes: any[], fieldName?: string): void;
14
+ /**
15
+ *
16
+ * @param jsonObj
17
+ * @param jsonObjOld
18
+ * @param groupName 'routes'|'widgetMenu'|'widgets'|'functions'
19
+ * @param fieldName 主键字段名
20
+ */
21
+ export declare function mergeNodesAll(jsonObj: ISysRoleRight, jsonObjOld: ISysRoleRight, groupName: string, fieldName?: string): void;
22
+ /**
23
+ * 融合过滤角色权限功能
24
+ * @param jsonObjArray ISysRoleRight对象数组
25
+ * @returns
26
+ */
27
+ export declare function mergeFilterRoleSysRight(jsonObjArray: any[]): ISysRoleRight | undefined;
@@ -8,31 +8,38 @@ declare type IWidgetMenu = any;
8
8
  */
9
9
  export declare function getCurrentSystemRight(): ISysRoleRight | undefined;
10
10
  /**
11
- * 获取用户角色权限菜单
11
+ * 获取用户角色权限列表对象
12
12
  * @param sysID 系统ID
13
- * @param roleAPI 获取系统角色权限的API
14
- * @param fullSysRights 默认全部,调试开发使用
13
+ * @param isSuperLevel 当前用户的最高等级
15
14
  * @returns
16
15
  */
17
- export declare function getSystemRoleRight(sysID: string, roleAPI: string, baseLoginURL?: string, fullSysRights?: ISysRoleRight): Promise<ISysRoleRight | undefined>;
16
+ export declare function getSystemRoleRight(sysID: string, isSuperLevel?: boolean): Promise<ISysRoleRight | undefined>;
18
17
  /**
19
18
  * 获取授权的Route 集合
19
+ * @param bussinessRoutes 全部业务路由
20
+ * @param roleLevel 角色级别,默认为普通用户,如果为0,则是超级管理员
20
21
  * @returns
21
22
  */
22
- export declare function getRoutes(bussinessRoutes: Array<RouteRecordRaw>): Array<RouteRecordRaw> | undefined;
23
+ export declare function getRoutes(bussinessRoutes: Array<RouteRecordRaw>, roleLevel?: number): Array<RouteRecordRaw> | undefined;
23
24
  /**
24
25
  * 获取授权的Widget Menu集合
26
+ * @param widgetMenuConfig 全部widget配置
27
+ * @param roleLevel 角色级别,默认为普通用户,如果为0,则是超级管理员
25
28
  * @returns
26
29
  */
27
- export declare function getWidgetMenus(widgetMenuConfig: Array<IWidgetMenu>): Array<IWidgetMenu> | undefined;
30
+ export declare function getWidgetMenus(widgetMenuConfig: Array<IWidgetMenu>, roleLevel?: number): Array<IWidgetMenu> | undefined;
28
31
  /**
29
32
  * 获取授权的 widget配置对象集合
33
+ * @param widgetConfig 全部
34
+ * @param roleLevel 角色级别,默认为普通用户,如果为0,则是超级管理员
30
35
  * @returns
31
36
  */
32
- export declare function getWidgetConfig(widgetConfig?: Array<IWidgetConfig>): Array<IWidgetConfig> | undefined;
37
+ export declare function getWidgetConfig(widgetConfig?: Array<IWidgetConfig>, roleLevel?: number): Array<IWidgetConfig> | undefined;
33
38
  /**
34
39
  * 获取授权的功能点集合
40
+ * @param functionList 全部功能列表
41
+ * @param roleLevel 角色级别,默认为普通用户,如果为0,则是超级管理员
35
42
  * @returns
36
43
  */
37
- export declare function getFunctions(functionList?: Array<IRoleFunction>): IRoleFunction[] | undefined;
44
+ export declare function getFunctions(functionList?: Array<IRoleFunction>, roleLevel?: number): IRoleFunction[] | undefined;
38
45
  export {};
@@ -1,3 +1,4 @@
1
1
  export * from './register';
2
2
  export * from './filter';
3
3
  export * from './right';
4
+ export * from './RoleSysRightHelper';
@@ -8,7 +8,7 @@ export declare function getRight(): ISysRoleRight | undefined;
8
8
  * 设置 系统角色权限 对象
9
9
  * @param sysRoleRight 系统角色权限对象
10
10
  */
11
- export declare function setRight(sysRoleRight: ISysRoleRight): void;
11
+ export declare function setRight(sysRoleRight?: ISysRoleRight): void;
12
12
  /**
13
13
  * 清除
14
14
  */