smartbi-toolkit 1.1.4 → 1.2.1

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.
Files changed (111) hide show
  1. package/README.md +59 -12
  2. package/dist/common-Cnq1SoER.d.ts +25 -0
  3. package/dist/console-BJttltN4.js +93 -0
  4. package/dist/index.d.ts +23 -14
  5. package/dist/index.js +97 -127
  6. package/dist/{methods → service}/AnalysisReportService.d.ts +18 -14
  7. package/dist/service/AnalysisReportService.js +138 -0
  8. package/dist/service/BusinessThemeService.d.ts +11 -0
  9. package/dist/service/BusinessThemeService.js +20 -0
  10. package/dist/{methods → service}/BusinessViewService.d.ts +18 -14
  11. package/dist/service/BusinessViewService.js +146 -0
  12. package/dist/{methods → service}/CatalogService.d.ts +26 -22
  13. package/dist/service/CatalogService.js +300 -0
  14. package/dist/{methods → service}/ClientCombinedReportService.d.ts +14 -10
  15. package/dist/service/ClientCombinedReportService.js +96 -0
  16. package/dist/{methods → service}/ClientInsightService.d.ts +17 -13
  17. package/dist/service/ClientInsightService.js +123 -0
  18. package/dist/{methods → service}/ClientReportService.d.ts +27 -23
  19. package/dist/service/ClientReportService.js +244 -0
  20. package/dist/service/CombinedReportService.d.ts +11 -0
  21. package/dist/service/CombinedReportService.js +14 -0
  22. package/dist/{methods → service}/DataSourceService.d.ts +26 -22
  23. package/dist/service/DataSourceService.js +306 -0
  24. package/dist/service/GraphicReportService.d.ts +11 -0
  25. package/dist/service/GraphicReportService.js +14 -0
  26. package/dist/service/InsightReport.d.ts +75 -0
  27. package/dist/service/InsightReport.js +118 -0
  28. package/dist/{methods → service}/MetadataService.d.ts +10 -6
  29. package/dist/service/MetadataService.js +60 -0
  30. package/dist/service/OfficeReport.d.ts +53 -0
  31. package/dist/service/OfficeReport.js +74 -0
  32. package/dist/{methods → service}/OfficeReportService.d.ts +10 -6
  33. package/dist/service/OfficeReportService.js +56 -0
  34. package/dist/service/OltpMetadataService.d.ts +23 -0
  35. package/dist/service/OltpMetadataService.js +30 -0
  36. package/dist/service/ParameterService.d.ts +15 -0
  37. package/dist/service/ParameterService.js +22 -0
  38. package/dist/service/PoolService.d.ts +14 -0
  39. package/dist/service/PoolService.js +21 -0
  40. package/dist/{methods → service}/PortalService.d.ts +14 -10
  41. package/dist/service/PortalService.js +106 -0
  42. package/dist/{methods → service}/Report.d.ts +31 -27
  43. package/dist/service/Report.js +275 -0
  44. package/dist/service/SSReport.d.ts +90 -0
  45. package/dist/service/SSReport.js +127 -0
  46. package/dist/service/ScheduleTaskService.d.ts +15 -0
  47. package/dist/service/ScheduleTaskService.js +22 -0
  48. package/dist/service/SimpleReportService.d.ts +15 -0
  49. package/dist/service/SimpleReportService.js +22 -0
  50. package/dist/service/SpreadSheetReportService.d.ts +47 -0
  51. package/dist/service/SpreadSheetReportService.js +65 -0
  52. package/dist/service/SystemConfigService.d.ts +21 -0
  53. package/dist/service/SystemConfigService.js +28 -0
  54. package/dist/service/TimeConsuming.d.ts +10 -0
  55. package/dist/service/TimeConsuming.js +13 -0
  56. package/dist/service/TimeConsumingService.d.ts +8 -0
  57. package/dist/service/TimeConsumingService.js +13 -0
  58. package/dist/{methods → service}/UserManagerService.d.ts +40 -36
  59. package/dist/service/UserManagerService.js +365 -0
  60. package/dist/types-C2_iES_3.d.ts +363 -0
  61. package/dist/vite-plugin/vite-plugin-smartbi.d.ts +21 -0
  62. package/dist/vite-plugin/vite-plugin-smartbi.js +54 -0
  63. package/dist/vite-plugin/vite-plugin-smartbix.d.ts +17 -0
  64. package/dist/vite-plugin/vite-plugin-smartbix.js +101 -0
  65. package/package.json +59 -141
  66. package/dist/methods/AnalysisReportService.js +0 -126
  67. package/dist/methods/BusinessThemeService.d.ts +0 -8
  68. package/dist/methods/BusinessThemeService.js +0 -11
  69. package/dist/methods/BusinessViewService.js +0 -120
  70. package/dist/methods/CatalogService.js +0 -230
  71. package/dist/methods/ClientCombinedReportService.js +0 -82
  72. package/dist/methods/ClientInsightService.js +0 -107
  73. package/dist/methods/ClientReportService.js +0 -206
  74. package/dist/methods/CombinedReportService.d.ts +0 -7
  75. package/dist/methods/CombinedReportService.js +0 -10
  76. package/dist/methods/DataSourceService.js +0 -220
  77. package/dist/methods/GraphicReportService.d.ts +0 -7
  78. package/dist/methods/GraphicReportService.js +0 -10
  79. package/dist/methods/InsightReport.d.ts +0 -71
  80. package/dist/methods/InsightReport.js +0 -98
  81. package/dist/methods/MetadataService.js +0 -47
  82. package/dist/methods/OfficeReport.d.ts +0 -49
  83. package/dist/methods/OfficeReport.js +0 -65
  84. package/dist/methods/OfficeReportService.js +0 -46
  85. package/dist/methods/OltpMetadataService.d.ts +0 -19
  86. package/dist/methods/OltpMetadataService.js +0 -25
  87. package/dist/methods/ParameterService.d.ts +0 -12
  88. package/dist/methods/ParameterService.js +0 -18
  89. package/dist/methods/PoolService.d.ts +0 -11
  90. package/dist/methods/PoolService.js +0 -17
  91. package/dist/methods/PortalService.js +0 -89
  92. package/dist/methods/Report.js +0 -230
  93. package/dist/methods/SSReport.d.ts +0 -86
  94. package/dist/methods/SSReport.js +0 -114
  95. package/dist/methods/ScheduleTaskService.d.ts +0 -12
  96. package/dist/methods/ScheduleTaskService.js +0 -18
  97. package/dist/methods/SimpleReportService.d.ts +0 -12
  98. package/dist/methods/SimpleReportService.js +0 -18
  99. package/dist/methods/SpreadSheetReportService.d.ts +0 -43
  100. package/dist/methods/SpreadSheetReportService.js +0 -55
  101. package/dist/methods/SystemConfigService.d.ts +0 -17
  102. package/dist/methods/SystemConfigService.js +0 -23
  103. package/dist/methods/TimeConsuming.d.ts +0 -6
  104. package/dist/methods/TimeConsuming.js +0 -9
  105. package/dist/methods/TimeConsumingService.d.ts +0 -5
  106. package/dist/methods/TimeConsumingService.js +0 -9
  107. package/dist/methods/UserManagerService.js +0 -312
  108. package/dist/types.d.ts +0 -412
  109. package/dist/types.js +0 -61
  110. package/dist/vite-plugin-smartbi/index.d.ts +0 -36
  111. package/dist/vite-plugin-smartbi/index.js +0 -107
@@ -1,114 +0,0 @@
1
- import { smartbi } from "../index";
2
- /**
3
- * 打开电子表格报表
4
- * @param id 报表ID
5
- * @returns 无返回值
6
- */
7
- export const openSSReport = (id) => {
8
- return smartbi('SSReport', 'open', [id]);
9
- };
10
- /**
11
- * 关闭电子表格报表
12
- * @returns 无返回值
13
- */
14
- export const closeSSReport = () => {
15
- return smartbi('SSReport', 'close', []);
16
- };
17
- /**
18
- * 获取参数列表
19
- * @returns 返回参数列表
20
- */
21
- export const getSSReportParamList = () => {
22
- return smartbi('SSReport', 'getParamList', []);
23
- };
24
- /**
25
- * 根据参数ID获取参数备选值
26
- * @param paramId 参数ID
27
- * @returns 返回参数键值对
28
- */
29
- export const getSSReportParamStandbyValue = (paramId) => {
30
- return smartbi('SSReport', 'getParamStandbyValue', [paramId]);
31
- };
32
- /**
33
- * 根据参数ID获取参数默认值
34
- * @param pid 参数ID
35
- * @returns 返回参数默认值
36
- */
37
- export const getSSReportParamDefaultValueByPID = (pid) => {
38
- return smartbi('SSReport', 'getParamDefaultValueByPID', [pid]);
39
- };
40
- /**
41
- * 导出电子表格(基础版)
42
- * @param type 导出类型
43
- * @param os 输出流
44
- * @returns 无返回值
45
- */
46
- export const exportSSReport = (type, os) => {
47
- return smartbi('SSReport', 'doExport', [type, os]);
48
- };
49
- /**
50
- * 导出电子表格(带参数版)
51
- * @param type 导出格式
52
- * @param os 输出流
53
- * @param postData 请求参数
54
- * @returns 无返回值
55
- */
56
- export const exportSSReportWithPostData = (type, os, postData) => {
57
- return smartbi('SSReport', 'doExport', [type, os, postData]);
58
- };
59
- /**
60
- * 设置参数值
61
- * @param id 参数ID
62
- * @param value 值
63
- * @param displayValue 显示值
64
- * @returns 无返回值
65
- */
66
- export const setSSReportParamValue = (id, value, displayValue) => {
67
- return smartbi('SSReport', 'setParamValue', [id, value, displayValue]);
68
- };
69
- /**
70
- * 设置导出工作单的索引
71
- * @param exportSheetIndexes 导出工作单的索引
72
- * @returns 无返回值
73
- */
74
- export const setSSReportExportSheetIndexes = (exportSheetIndexes) => {
75
- return smartbi('SSReport', 'setExportSheetIndexes', [exportSheetIndexes]);
76
- };
77
- /**
78
- * 设置是否导出公式
79
- * @param exportFormula 是否导出公式
80
- * @returns 无返回值
81
- */
82
- export const setSSReportExportFormula = (exportFormula) => {
83
- return smartbi('SSReport', 'setExportFormula', [exportFormula]);
84
- };
85
- /**
86
- * 获取执行状态
87
- * @returns 返回执行状态
88
- */
89
- export const getSSReportExecutingState = () => {
90
- return smartbi('SSReport', 'getExecutingState', []);
91
- };
92
- /**
93
- * 获取操作
94
- * @returns 返回操作
95
- */
96
- export const getSSReportOperation = () => {
97
- return smartbi('SSReport', 'getOperation', []);
98
- };
99
- /**
100
- * 设置操作
101
- * @param operation 操作
102
- * @returns 无返回值
103
- */
104
- export const setSSReportOperation = (operation) => {
105
- return smartbi('SSReport', 'setOperation', [operation]);
106
- };
107
- /**
108
- * 设置筛选条件
109
- * @param filtersRule 筛选条件json
110
- * @returns 无返回值
111
- */
112
- export const setSSReportFiltersRule = (filtersRule) => {
113
- return smartbi('SSReport', 'setFiltersRule', [filtersRule]);
114
- };
@@ -1,12 +0,0 @@
1
- /**
2
- * 执行计划任务
3
- * @param scheduleId 计划ID
4
- * @returns 返回执行结果的布尔值
5
- */
6
- export declare const executeSchedule: (scheduleId: string) => Promise<boolean>;
7
- /**
8
- * 执行任务
9
- * @param taskId 任务ID
10
- * @returns 返回执行结果的布尔值
11
- */
12
- export declare const executeTask: (taskId: string) => Promise<boolean>;
@@ -1,18 +0,0 @@
1
- // 定义SmartBI计划任务服务相关的类型接口
2
- import { smartbi } from "../index";
3
- /**
4
- * 执行计划任务
5
- * @param scheduleId 计划ID
6
- * @returns 返回执行结果的布尔值
7
- */
8
- export const executeSchedule = (scheduleId) => {
9
- return smartbi('ScheduleTaskService', 'executeSchedule', [scheduleId]);
10
- };
11
- /**
12
- * 执行任务
13
- * @param taskId 任务ID
14
- * @returns 返回执行结果的布尔值
15
- */
16
- export const executeTask = (taskId) => {
17
- return smartbi('ScheduleTaskService', 'executeTask', [taskId]);
18
- };
@@ -1,12 +0,0 @@
1
- /**
2
- * 创建并打开一个报表
3
- * @param reportId 报表ID
4
- * @returns 返回打开的报表对象
5
- */
6
- export declare const openReport: (reportId: string) => Promise<any>;
7
- /**
8
- * 打开一个报表不初始化数据库链接
9
- * @param reportId 报表ID
10
- * @returns 返回打开的报表对象
11
- */
12
- export declare const openReportWithoutInit: (reportId: string) => Promise<any>;
@@ -1,18 +0,0 @@
1
- // 定义SmartBI简单报表服务相关的类型接口
2
- import { smartbi } from "../index";
3
- /**
4
- * 创建并打开一个报表
5
- * @param reportId 报表ID
6
- * @returns 返回打开的报表对象
7
- */
8
- export const openReport = (reportId) => {
9
- return smartbi('SimpleReportService', 'openReport', [reportId]);
10
- };
11
- /**
12
- * 打开一个报表不初始化数据库链接
13
- * @param reportId 报表ID
14
- * @returns 返回打开的报表对象
15
- */
16
- export const openReportWithoutInit = (reportId) => {
17
- return smartbi('SimpleReportService', 'openReportWithoutInit', [reportId]);
18
- };
@@ -1,43 +0,0 @@
1
- import type { NameValuePair } from '../types';
2
- /**
3
- * 打开电子表格报表
4
- * @param reportId 报表ID
5
- * @returns 返回客户端ID
6
- */
7
- export declare const openSpreadSheetReportQuery: (reportId: string) => Promise<any>;
8
- /**
9
- * 关闭电子表格报表
10
- * @param clientId 客户端ID
11
- * @returns 无返回值
12
- */
13
- export declare const closeSpreadSheetReportQuery: (clientId: string) => Promise<void>;
14
- /**
15
- * 根据参数ID获取参数默认值
16
- * @param panelId 参数面板ID
17
- * @param paramId 参数ID
18
- * @returns 返回参数默认值
19
- */
20
- export declare const getSpreadSheetReportParamDefaultValueByPID: (panelId: string, paramId: string) => Promise<any[]>;
21
- /**
22
- * 获取参数备选值
23
- * @param panelId 参数面板ID
24
- * @param paramId 参数ID
25
- * @returns 返回参数标准值
26
- */
27
- export declare const getSpreadSheetReportParamStandbyValue: (panelId: string, paramId: string) => Promise<NameValuePair[]>;
28
- /**
29
- * 获取报表层面的参数默认值
30
- * @param contextId 报表上下文会话id
31
- * @param paramId 参数id
32
- * @returns 返回报表参数默认值
33
- */
34
- export declare const getSpreadSheetReportParamDefaultValueByContext: (contextId: string, paramId: string) => Promise<any[]>;
35
- /**
36
- * 设置参数值
37
- * @param panelId 参数面板ID
38
- * @param paramId 参数ID
39
- * @param value 值
40
- * @param displayValue 显示值
41
- * @returns 返回是否设置成功的布尔值
42
- */
43
- export declare const setSpreadSheetReportParamValue: (panelId: string, paramId: string, value: string, displayValue: string) => Promise<boolean>;
@@ -1,55 +0,0 @@
1
- import { smartbi } from "../index";
2
- /**
3
- * 打开电子表格报表
4
- * @param reportId 报表ID
5
- * @returns 返回客户端ID
6
- */
7
- export const openSpreadSheetReportQuery = (reportId) => {
8
- return smartbi('SpreadSheetReportService', 'openQuery', [reportId]);
9
- };
10
- /**
11
- * 关闭电子表格报表
12
- * @param clientId 客户端ID
13
- * @returns 无返回值
14
- */
15
- export const closeSpreadSheetReportQuery = (clientId) => {
16
- return smartbi('SpreadSheetReportService', 'closeQuery', [clientId]);
17
- };
18
- /**
19
- * 根据参数ID获取参数默认值
20
- * @param panelId 参数面板ID
21
- * @param paramId 参数ID
22
- * @returns 返回参数默认值
23
- */
24
- export const getSpreadSheetReportParamDefaultValueByPID = (panelId, paramId) => {
25
- return smartbi('SpreadSheetReportService', 'getParamDefaultValueByPID', [panelId, paramId]);
26
- };
27
- /**
28
- * 获取参数备选值
29
- * @param panelId 参数面板ID
30
- * @param paramId 参数ID
31
- * @returns 返回参数标准值
32
- */
33
- export const getSpreadSheetReportParamStandbyValue = (panelId, paramId) => {
34
- return smartbi('SpreadSheetReportService', 'getParamStandbyValue', [panelId, paramId]);
35
- };
36
- /**
37
- * 获取报表层面的参数默认值
38
- * @param contextId 报表上下文会话id
39
- * @param paramId 参数id
40
- * @returns 返回报表参数默认值
41
- */
42
- export const getSpreadSheetReportParamDefaultValueByContext = (contextId, paramId) => {
43
- return smartbi('SpreadSheetReportService', 'getReportParamDefaultValueByPID', [contextId, paramId]);
44
- };
45
- /**
46
- * 设置参数值
47
- * @param panelId 参数面板ID
48
- * @param paramId 参数ID
49
- * @param value 值
50
- * @param displayValue 显示值
51
- * @returns 返回是否设置成功的布尔值
52
- */
53
- export const setSpreadSheetReportParamValue = (panelId, paramId, value, displayValue) => {
54
- return smartbi('SpreadSheetReportService', 'setParamValue', [panelId, paramId, value, displayValue]);
55
- };
@@ -1,17 +0,0 @@
1
- import type { SystemConfig } from '../types';
2
- /**
3
- * 获取系统设置
4
- * @returns 返回系统设置对象列表
5
- */
6
- export declare const getSystemConfigs: () => Promise<SystemConfig[]>;
7
- /**
8
- * 根据键获取系统配置
9
- * @param key 配置键
10
- * @returns 返回系统配置对象
11
- */
12
- export declare const getSystemConfig: (key: string) => Promise<SystemConfig>;
13
- /**
14
- * 清空缓存
15
- * @returns 无返回值
16
- */
17
- export declare const clearSystemConfigCache: () => Promise<void>;
@@ -1,23 +0,0 @@
1
- import { smartbi } from "../index";
2
- /**
3
- * 获取系统设置
4
- * @returns 返回系统设置对象列表
5
- */
6
- export const getSystemConfigs = () => {
7
- return smartbi('SystemConfigService', 'getSystemConfigs', []);
8
- };
9
- /**
10
- * 根据键获取系统配置
11
- * @param key 配置键
12
- * @returns 返回系统配置对象
13
- */
14
- export const getSystemConfig = (key) => {
15
- return smartbi('SystemConfigService', 'getSystemConfig', [key]);
16
- };
17
- /**
18
- * 清空缓存
19
- * @returns 无返回值
20
- */
21
- export const clearSystemConfigCache = () => {
22
- return smartbi('SystemConfigService', 'clearCache', []);
23
- };
@@ -1,6 +0,0 @@
1
- import type { RunningInfo } from '../types';
2
- /**
3
- * 获取状态信息
4
- * @returns 返回执行状态信息
5
- */
6
- export declare const loadTimeConsuming: () => Promise<RunningInfo>;
@@ -1,9 +0,0 @@
1
- // 定义SmartBI耗时分析相关的类型接口
2
- import { smartbi } from "../index";
3
- /**
4
- * 获取状态信息
5
- * @returns 返回执行状态信息
6
- */
7
- export const loadTimeConsuming = () => {
8
- return smartbi('TimeConsuming', 'load', []);
9
- };
@@ -1,5 +0,0 @@
1
- /**
2
- * 获取执行时间信息
3
- * @returns 返回执行时间信息的JSON对象
4
- */
5
- export declare const loadRunningTimeConsuming: () => Promise<any>;
@@ -1,9 +0,0 @@
1
- // 导入公共类型
2
- import { smartbi } from "../index";
3
- /**
4
- * 获取执行时间信息
5
- * @returns 返回执行时间信息的JSON对象
6
- */
7
- export const loadRunningTimeConsuming = () => {
8
- return smartbi('TimeConsumingService', 'loadRunning', []);
9
- };
@@ -1,312 +0,0 @@
1
- import { smartbi } from "../index";
2
- /**
3
- * 创建用户
4
- * @param parentGroupId 父组ID
5
- * @param userName 用户名
6
- * @param userAlias 用户别名
7
- * @param desc 描述
8
- * @param password 密码
9
- * @param isEnabled 是否启用
10
- * @param forceChangePassword 是否强制修改密码(可选)
11
- * @returns 返回新创建的用户ID
12
- */
13
- export const createUser = (parentGroupId, userName, userAlias, desc, password, isEnabled, forceChangePassword) => {
14
- const params = forceChangePassword !== undefined
15
- ? [parentGroupId, userName, userAlias, desc, password, isEnabled, forceChangePassword]
16
- : [parentGroupId, userName, userAlias, desc, password, isEnabled];
17
- return smartbi('UserManagerService', 'createUser', params);
18
- };
19
- /**
20
- * 指定ID创建用户
21
- * @param parentGroupId 父组ID
22
- * @param userId 用户ID
23
- * @param userName 用户名
24
- * @param userAlias 用户别名
25
- * @param desc 描述
26
- * @param password 密码
27
- * @param isEnabled 是否启用
28
- * @param forceChangePassword 是否强制修改密码(可选)
29
- */
30
- export const createUserById = (parentGroupId, userId, userName, userAlias, desc, password, isEnabled, forceChangePassword) => {
31
- const params = forceChangePassword !== undefined
32
- ? [parentGroupId, userId, userName, userAlias, desc, password, isEnabled, forceChangePassword]
33
- : [parentGroupId, userId, userName, userAlias, desc, password, isEnabled];
34
- return smartbi('UserManagerService', 'createUserById', params);
35
- };
36
- /**
37
- * 删除用户
38
- * @param userId 用户ID
39
- * @returns 返回是否删除成功的布尔值
40
- */
41
- export const deleteUser = (userId) => {
42
- return smartbi('UserManagerService', 'deleteUser', [userId]);
43
- };
44
- /**
45
- * 通过用户ID获取用户信息
46
- * @param id 用户ID
47
- * @returns 返回用户信息
48
- */
49
- export const getUserById = (id) => {
50
- return smartbi('UserManagerService', 'getUserById', [id]);
51
- };
52
- /**
53
- * 通过用户名称获取用户信息
54
- * @param name 用户名称
55
- * @returns 返回用户信息
56
- */
57
- export const getUserByName = (name) => {
58
- return smartbi('UserManagerService', 'getUserByName', [name]);
59
- };
60
- /**
61
- * 根据用户扩展属性获取用户信息
62
- * @param key 属性键
63
- * @param value 属性值
64
- * @returns 返回用户列表
65
- */
66
- export const getUserByAttribute = (key, value) => {
67
- return smartbi('UserManagerService', 'getUserByAttribute', [key, value]);
68
- };
69
- /**
70
- * 获取系统中的用户列表
71
- * @returns 返回用户列表
72
- */
73
- export const getAllUsers = () => {
74
- return smartbi('UserManagerService', 'getAllUsers', []);
75
- };
76
- /**
77
- * 获取当前登录用户信息
78
- * @returns 返回当前用户信息
79
- */
80
- export const getCurrentUser = () => {
81
- return smartbi('UserManagerService', 'getCurrentUser', []);
82
- };
83
- /**
84
- * 修改当前用户的密码
85
- * @param oldPassword 旧密码
86
- * @param newPassword 新密码
87
- */
88
- export const changePassword = (oldPassword, newPassword) => {
89
- return smartbi('UserManagerService', 'changePassword', [oldPassword, newPassword]);
90
- };
91
- /**
92
- * 获取用户密码
93
- * @param userName 用户名
94
- * @returns 返回用户密码
95
- */
96
- export const getPassword = (userName) => {
97
- return smartbi('UserManagerService', 'getPassword', [userName]);
98
- };
99
- /**
100
- * 创建角色
101
- * @param roleName 角色名称
102
- * @param roleAlias 角色别名
103
- * @param desc 描述
104
- * @param groupId 组ID
105
- * @returns 返回新创建的角色ID
106
- */
107
- export const createRole = (roleName, roleAlias, desc, groupId) => {
108
- return smartbi('UserManagerService', 'createRole', [roleName, roleAlias, desc, groupId]);
109
- };
110
- /**
111
- * 删除角色
112
- * @param roleId 角色ID
113
- * @returns 返回是否删除成功的布尔值
114
- */
115
- export const deleteRole = (roleId) => {
116
- return smartbi('UserManagerService', 'deleteRole', [roleId]);
117
- };
118
- /**
119
- * 通过ID获取角色
120
- * @param id 角色ID
121
- * @returns 返回角色信息
122
- */
123
- export const getRoleById = (id) => {
124
- return smartbi('UserManagerService', 'getRoleById', [id]);
125
- };
126
- /**
127
- * 通过角色名称获取角色对象
128
- * @param name 角色名称
129
- * @returns 返回角色信息
130
- */
131
- export const getRoleByName = (name) => {
132
- return smartbi('UserManagerService', 'getRoleByName', [name]);
133
- };
134
- /**
135
- * 获取系统中的角色列表
136
- * @returns 返回角色列表
137
- */
138
- export const getAllRoles = () => {
139
- return smartbi('UserManagerService', 'getAllRoles', []);
140
- };
141
- /**
142
- * 给用户分配角色
143
- * @param userId 用户ID
144
- * @param roleIdList 角色ID列表
145
- * @returns 返回是否分配成功的布尔值
146
- */
147
- export const assignRolesToUser = (userId, roleIdList) => {
148
- return smartbi('UserManagerService', 'assignRolesToUser', [userId, roleIdList.toString()]);
149
- };
150
- /**
151
- * 给角色分配用户
152
- * @param roleId 角色ID
153
- * @param userIdList 用户ID列表
154
- * @returns 返回是否分配成功的布尔值
155
- */
156
- export const assignUsersToRole = (roleId, userIdList) => {
157
- return smartbi('UserManagerService', 'assignUsersToRole', [roleId, userIdList.toString()]);
158
- };
159
- /**
160
- * 创建组
161
- * @param parentGroupId 父组ID
162
- * @param groupName 组名称
163
- * @param groupAlias 组别名
164
- * @param desc 描述
165
- * @param departmentCode 组编号
166
- * @returns 返回新创建的组ID
167
- */
168
- export const createDepartment = (parentGroupId, groupName, groupAlias, desc, departmentCode) => {
169
- return smartbi('UserManagerService', 'createDepartment', [parentGroupId, groupName, groupAlias, desc, departmentCode]);
170
- };
171
- /**
172
- * 删除组
173
- * @param groupId 组ID
174
- * @returns 返回是否删除成功的布尔值
175
- */
176
- export const deleteDepartment = (groupId) => {
177
- return smartbi('UserManagerService', 'deleteDepartment', [groupId]);
178
- };
179
- /**
180
- * 通过ID获取组对象
181
- * @param id 组ID
182
- * @returns 返回组信息
183
- */
184
- export const getDepartmentById = (id) => {
185
- return smartbi('UserManagerService', 'getDepartmentById', [id]);
186
- };
187
- /**
188
- * 通过组名称获取组对象
189
- * @param name 组名称
190
- * @returns 返回组信息
191
- */
192
- export const getDepartmentByName = (name) => {
193
- return smartbi('UserManagerService', 'getDepartmentByName', [name]);
194
- };
195
- /**
196
- * 通过组编号获取组对象
197
- * @param code 组编号
198
- * @returns 返回组信息
199
- */
200
- export const getDepartmentByCode = (code) => {
201
- return smartbi('UserManagerService', 'getDepartmentByCode', [code]);
202
- };
203
- /**
204
- * 获取系统中的组列表
205
- * @returns 返回组列表
206
- */
207
- export const getAllDepartments = () => {
208
- return smartbi('UserManagerService', 'getAllDepartments', []);
209
- };
210
- /**
211
- * 获取用户的所属组
212
- * @param userId 用户ID
213
- * @returns 返回用户所属组列表
214
- */
215
- export const getDepartmentsOfUser = (userId) => {
216
- return smartbi('UserManagerService', 'getDepartmentsOfUser', [userId]);
217
- };
218
- /**
219
- * 修改组所拥有的用户
220
- * @param groupId 组ID
221
- * @param userIdList 用户ID列表
222
- * @returns 返回是否修改成功的布尔值
223
- */
224
- export const assignUsersToGroup = (groupId, userIdList) => {
225
- return smartbi('UserManagerService', 'assignUsersToGroup', [groupId, userIdList.toString()]);
226
- };
227
- /**
228
- * 修改用户的所属组
229
- * @param userId 用户ID
230
- * @param groupId 组ID列表
231
- * @returns 返回是否修改成功的布尔值
232
- */
233
- export const assignDepartmentsToUser = (userId, groupId) => {
234
- return smartbi('UserManagerService', 'assignDepartmentsToUser', [userId, groupId.toString()]);
235
- };
236
- /**
237
- * 添加扩展属性
238
- * @param userId 用户ID
239
- * @param key 属性键
240
- * @param value 属性值
241
- * @param longValue 长值
242
- * @returns 返回是否添加成功的布尔值
243
- */
244
- export const addUserAttribute = (userId, key, value, longValue) => {
245
- return smartbi('UserManagerService', 'addUserAttribute', [userId, key, value, longValue]);
246
- };
247
- /**
248
- * 获取指定的属性值
249
- * @param userId 用户ID
250
- * @param key 属性键
251
- * @returns 返回扩展属性
252
- */
253
- export const getUserAttribute = (userId, key) => {
254
- return smartbi('UserManagerService', 'getUserAttribute', [userId, key]);
255
- };
256
- /**
257
- * 获取某用户所有的属性值
258
- * @param userId 用户ID
259
- * @returns 返回用户所有扩展属性列表
260
- */
261
- export const getAllUserAttributes = (userId) => {
262
- return smartbi('UserManagerService', 'getAllUserAttributes', [userId]);
263
- };
264
- /**
265
- * 创建操作权限
266
- * @param funcId 权限ID
267
- * @param parentFuncId 父权限ID
268
- * @param funcName 权限名称
269
- * @param funcAlias 权限别名
270
- * @param funcDesc 权限描述
271
- * @returns 返回是否创建成功的布尔值
272
- */
273
- export const createFunction = (funcId, parentFuncId, funcName, funcAlias, funcDesc) => {
274
- return smartbi('UserManagerService', 'createFunction', [funcId, parentFuncId, funcName, funcAlias, funcDesc]);
275
- };
276
- /**
277
- * 删除操作权限
278
- * @param funcId 权限ID
279
- * @returns 返回是否删除成功的布尔值
280
- */
281
- export const deleteFunction = (funcId) => {
282
- return smartbi('UserManagerService', 'deleteFunction', [funcId]);
283
- };
284
- /**
285
- * 通过操作权限ID获取操作权限对象
286
- * @param funcId 权限ID
287
- * @returns 返回权限信息
288
- */
289
- export const getFunctionById = (funcId) => {
290
- return smartbi('UserManagerService', 'getFunctionById', [funcId]);
291
- };
292
- /**
293
- * 获取所有操作权限列表
294
- * @returns 返回权限列表
295
- */
296
- export const getAllFunctions = () => {
297
- return smartbi('UserManagerService', 'getAllFunctions', []);
298
- };
299
- /**
300
- * 获取License中的关键信息
301
- * @returns 返回License信息
302
- */
303
- export const getLicenseInfo = () => {
304
- return smartbi('UserManagerService', 'getLicenseInfo', []);
305
- };
306
- /**
307
- * 获取系统中所有License模块名称列表
308
- * @returns 返回License模块名称列表
309
- */
310
- export const getLicenses = () => {
311
- return smartbi('UserManagerService', 'getLicenses', []);
312
- };