smartbi-toolkit 1.1.4 → 1.2.0
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.
- package/README.md +59 -12
- package/dist/common-Cnq1SoER.d.ts +25 -0
- package/dist/console-BJttltN4.js +93 -0
- package/dist/index.d.ts +23 -14
- package/dist/index.js +97 -127
- package/dist/{methods → service}/AnalysisReportService.d.ts +18 -14
- package/dist/service/AnalysisReportService.js +138 -0
- package/dist/service/BusinessThemeService.d.ts +11 -0
- package/dist/service/BusinessThemeService.js +20 -0
- package/dist/{methods → service}/BusinessViewService.d.ts +18 -14
- package/dist/service/BusinessViewService.js +146 -0
- package/dist/{methods → service}/CatalogService.d.ts +26 -22
- package/dist/service/CatalogService.js +300 -0
- package/dist/{methods → service}/ClientCombinedReportService.d.ts +14 -10
- package/dist/service/ClientCombinedReportService.js +96 -0
- package/dist/{methods → service}/ClientInsightService.d.ts +17 -13
- package/dist/service/ClientInsightService.js +123 -0
- package/dist/{methods → service}/ClientReportService.d.ts +27 -23
- package/dist/service/ClientReportService.js +244 -0
- package/dist/service/CombinedReportService.d.ts +11 -0
- package/dist/service/CombinedReportService.js +14 -0
- package/dist/{methods → service}/DataSourceService.d.ts +26 -22
- package/dist/service/DataSourceService.js +306 -0
- package/dist/service/GraphicReportService.d.ts +11 -0
- package/dist/service/GraphicReportService.js +14 -0
- package/dist/service/InsightReport.d.ts +75 -0
- package/dist/service/InsightReport.js +118 -0
- package/dist/{methods → service}/MetadataService.d.ts +10 -6
- package/dist/service/MetadataService.js +60 -0
- package/dist/service/OfficeReport.d.ts +53 -0
- package/dist/service/OfficeReport.js +74 -0
- package/dist/{methods → service}/OfficeReportService.d.ts +10 -6
- package/dist/service/OfficeReportService.js +56 -0
- package/dist/service/OltpMetadataService.d.ts +23 -0
- package/dist/service/OltpMetadataService.js +30 -0
- package/dist/service/ParameterService.d.ts +15 -0
- package/dist/service/ParameterService.js +22 -0
- package/dist/service/PoolService.d.ts +14 -0
- package/dist/service/PoolService.js +21 -0
- package/dist/{methods → service}/PortalService.d.ts +14 -10
- package/dist/service/PortalService.js +106 -0
- package/dist/{methods → service}/Report.d.ts +31 -27
- package/dist/service/Report.js +275 -0
- package/dist/service/SSReport.d.ts +90 -0
- package/dist/service/SSReport.js +127 -0
- package/dist/service/ScheduleTaskService.d.ts +15 -0
- package/dist/service/ScheduleTaskService.js +22 -0
- package/dist/service/SimpleReportService.d.ts +15 -0
- package/dist/service/SimpleReportService.js +22 -0
- package/dist/service/SpreadSheetReportService.d.ts +47 -0
- package/dist/service/SpreadSheetReportService.js +65 -0
- package/dist/service/SystemConfigService.d.ts +21 -0
- package/dist/service/SystemConfigService.js +28 -0
- package/dist/service/TimeConsuming.d.ts +10 -0
- package/dist/service/TimeConsuming.js +13 -0
- package/dist/service/TimeConsumingService.d.ts +8 -0
- package/dist/service/TimeConsumingService.js +13 -0
- package/dist/{methods → service}/UserManagerService.d.ts +40 -36
- package/dist/service/UserManagerService.js +365 -0
- package/dist/types-DOYMZhxT.d.ts +409 -0
- package/dist/vite-plugin/vite-plugin-smartbi.d.ts +21 -0
- package/dist/vite-plugin/vite-plugin-smartbi.js +54 -0
- package/dist/vite-plugin/vite-plugin-smartbix.d.ts +17 -0
- package/dist/vite-plugin/vite-plugin-smartbix.js +101 -0
- package/package.json +59 -141
- package/dist/methods/AnalysisReportService.js +0 -126
- package/dist/methods/BusinessThemeService.d.ts +0 -8
- package/dist/methods/BusinessThemeService.js +0 -11
- package/dist/methods/BusinessViewService.js +0 -120
- package/dist/methods/CatalogService.js +0 -230
- package/dist/methods/ClientCombinedReportService.js +0 -82
- package/dist/methods/ClientInsightService.js +0 -107
- package/dist/methods/ClientReportService.js +0 -206
- package/dist/methods/CombinedReportService.d.ts +0 -7
- package/dist/methods/CombinedReportService.js +0 -10
- package/dist/methods/DataSourceService.js +0 -220
- package/dist/methods/GraphicReportService.d.ts +0 -7
- package/dist/methods/GraphicReportService.js +0 -10
- package/dist/methods/InsightReport.d.ts +0 -71
- package/dist/methods/InsightReport.js +0 -98
- package/dist/methods/MetadataService.js +0 -47
- package/dist/methods/OfficeReport.d.ts +0 -49
- package/dist/methods/OfficeReport.js +0 -65
- package/dist/methods/OfficeReportService.js +0 -46
- package/dist/methods/OltpMetadataService.d.ts +0 -19
- package/dist/methods/OltpMetadataService.js +0 -25
- package/dist/methods/ParameterService.d.ts +0 -12
- package/dist/methods/ParameterService.js +0 -18
- package/dist/methods/PoolService.d.ts +0 -11
- package/dist/methods/PoolService.js +0 -17
- package/dist/methods/PortalService.js +0 -89
- package/dist/methods/Report.js +0 -230
- package/dist/methods/SSReport.d.ts +0 -86
- package/dist/methods/SSReport.js +0 -114
- package/dist/methods/ScheduleTaskService.d.ts +0 -12
- package/dist/methods/ScheduleTaskService.js +0 -18
- package/dist/methods/SimpleReportService.d.ts +0 -12
- package/dist/methods/SimpleReportService.js +0 -18
- package/dist/methods/SpreadSheetReportService.d.ts +0 -43
- package/dist/methods/SpreadSheetReportService.js +0 -55
- package/dist/methods/SystemConfigService.d.ts +0 -17
- package/dist/methods/SystemConfigService.js +0 -23
- package/dist/methods/TimeConsuming.d.ts +0 -6
- package/dist/methods/TimeConsuming.js +0 -9
- package/dist/methods/TimeConsumingService.d.ts +0 -5
- package/dist/methods/TimeConsumingService.js +0 -9
- package/dist/methods/UserManagerService.js +0 -312
- package/dist/types.d.ts +0 -412
- package/dist/types.js +0 -61
- package/dist/vite-plugin-smartbi/index.d.ts +0 -36
- package/dist/vite-plugin-smartbi/index.js +0 -107
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { smartbi } from "../index.js";
|
|
2
|
+
|
|
3
|
+
//#region src/service/AnalysisReportService.ts
|
|
4
|
+
/**
|
|
5
|
+
* 打开多维报表
|
|
6
|
+
* @param reportId 报表ID
|
|
7
|
+
* @returns 返回报表客户端ID
|
|
8
|
+
*/
|
|
9
|
+
const openAnalysisReport = (reportId) => {
|
|
10
|
+
return smartbi("AnalysisReportService", "openAnalysisReport", [reportId]);
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* 打开多维报表(不初始化)
|
|
14
|
+
* @param reportId 报表ID
|
|
15
|
+
* @returns 返回报表客户端ID
|
|
16
|
+
*/
|
|
17
|
+
const openOlapReportWithoutInit = (reportId) => {
|
|
18
|
+
return smartbi("AnalysisReportService", "openOlapReportWithoutInit", [reportId]);
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* 关闭多维报表
|
|
22
|
+
* @param clientId 客户端ID
|
|
23
|
+
* @returns 无返回值
|
|
24
|
+
*/
|
|
25
|
+
const closeAnalysisReport = (clientId) => {
|
|
26
|
+
return smartbi("AnalysisReportService", "closeAnalysisReport", [clientId]);
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* 设置多维报表参数值
|
|
30
|
+
* @param clientId 客户端ID
|
|
31
|
+
* @param id 参数ID
|
|
32
|
+
* @param value 参数值
|
|
33
|
+
* @param displayValue 参数显示值
|
|
34
|
+
* @returns 无返回值
|
|
35
|
+
*/
|
|
36
|
+
const setParamValue = (clientId, id, value, displayValue) => {
|
|
37
|
+
return smartbi("AnalysisReportService", "setParamValue", [
|
|
38
|
+
clientId,
|
|
39
|
+
id,
|
|
40
|
+
value,
|
|
41
|
+
displayValue
|
|
42
|
+
]);
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* 执行多维查询
|
|
46
|
+
* @param clientId 客户端ID
|
|
47
|
+
* @returns 返回查询结果
|
|
48
|
+
*/
|
|
49
|
+
const executeQuery = (clientId) => {
|
|
50
|
+
return smartbi("AnalysisReportService", "executeQuery", [clientId]);
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* 导出报表
|
|
54
|
+
* @param clientId 客户端ID
|
|
55
|
+
* @param exportType 导出类型
|
|
56
|
+
* @param delimiter 分割符
|
|
57
|
+
* @param os 输出流
|
|
58
|
+
* @param resourceBasePath 资源路径前缀(可选)
|
|
59
|
+
* @param valueType 值类型(可选)
|
|
60
|
+
* @returns 无返回值
|
|
61
|
+
*/
|
|
62
|
+
const doExport = (clientId, exportType, delimiter, os, resourceBasePath, valueType) => {
|
|
63
|
+
const params = [
|
|
64
|
+
clientId,
|
|
65
|
+
exportType,
|
|
66
|
+
delimiter,
|
|
67
|
+
os
|
|
68
|
+
];
|
|
69
|
+
if (resourceBasePath !== void 0) {
|
|
70
|
+
params.push(resourceBasePath);
|
|
71
|
+
if (valueType !== void 0) params.push(valueType);
|
|
72
|
+
}
|
|
73
|
+
return smartbi("AnalysisReportService", "doExport", params);
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* 设置参数为默认值
|
|
77
|
+
* @param clientId 客户端ID
|
|
78
|
+
* @param paramId 参数ID
|
|
79
|
+
* @returns 无返回值
|
|
80
|
+
*/
|
|
81
|
+
const setParameterValueAsDefault = (clientId, paramId) => {
|
|
82
|
+
return smartbi("AnalysisReportService", "setParameterValueAsDefault", [clientId, paramId]);
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* 获取参数
|
|
86
|
+
* @param clientId 客户端ID
|
|
87
|
+
* @param paramId 参数ID
|
|
88
|
+
* @returns 返回参数信息
|
|
89
|
+
*/
|
|
90
|
+
const getParameter = (clientId, paramId) => {
|
|
91
|
+
return smartbi("AnalysisReportService", "getParameter", [clientId, paramId]);
|
|
92
|
+
};
|
|
93
|
+
/**
|
|
94
|
+
* 获取参数显示值
|
|
95
|
+
* @param clientId 客户端ID
|
|
96
|
+
* @param paramId 参数ID
|
|
97
|
+
* @returns 返回参数显示值
|
|
98
|
+
*/
|
|
99
|
+
const getParameterDisplayValue = (clientId, paramId) => {
|
|
100
|
+
return smartbi("AnalysisReportService", "getParameterDisplayValue", [clientId, paramId]);
|
|
101
|
+
};
|
|
102
|
+
/**
|
|
103
|
+
* 获取参数默认值
|
|
104
|
+
* @param clientId 客户端ID
|
|
105
|
+
* @param paramId 参数ID
|
|
106
|
+
* @returns 返回参数默认值列表
|
|
107
|
+
*/
|
|
108
|
+
const getParameterDefaultValue = (clientId, paramId) => {
|
|
109
|
+
return smartbi("AnalysisReportService", "getParameterDefaultValue", [clientId, paramId]);
|
|
110
|
+
};
|
|
111
|
+
/**
|
|
112
|
+
* 获取所有参数
|
|
113
|
+
* @param clientId 客户端ID
|
|
114
|
+
* @returns 返回参数列表
|
|
115
|
+
*/
|
|
116
|
+
const getParameters = (clientId) => {
|
|
117
|
+
return smartbi("AnalysisReportService", "getParameters", [clientId]);
|
|
118
|
+
};
|
|
119
|
+
/**
|
|
120
|
+
* 获取参数候选值列表
|
|
121
|
+
* @param clientId 客户端ID
|
|
122
|
+
* @param paramId 参数ID
|
|
123
|
+
* @returns 返回候选值列表
|
|
124
|
+
*/
|
|
125
|
+
const getParamStandbyValue = (clientId, paramId) => {
|
|
126
|
+
return smartbi("AnalysisReportService", "getParamStandbyValue", [clientId, paramId]);
|
|
127
|
+
};
|
|
128
|
+
/**
|
|
129
|
+
* 获取执行状态
|
|
130
|
+
* @param clientId 客户端ID
|
|
131
|
+
* @returns 返回执行状态信息
|
|
132
|
+
*/
|
|
133
|
+
const getExecutingState = (clientId) => {
|
|
134
|
+
return smartbi("AnalysisReportService", "getExecutingState", [clientId]);
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
//#endregion
|
|
138
|
+
export { closeAnalysisReport, doExport, executeQuery, getExecutingState, getParamStandbyValue, getParameter, getParameterDefaultValue, getParameterDisplayValue, getParameters, openAnalysisReport, openOlapReportWithoutInit, setParamValue, setParameterValueAsDefault };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//#region src/service/BusinessThemeService.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* 创建业务对象
|
|
4
|
+
* @param businessThemeId 业务主题ID
|
|
5
|
+
* @param parentId 业务对象父ID
|
|
6
|
+
* @param tableId 表ID
|
|
7
|
+
* @returns 无返回值
|
|
8
|
+
*/
|
|
9
|
+
declare const createBusinessThemeObject: (businessThemeId: string, parentId: string, tableId: string) => Promise<void>;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { createBusinessThemeObject };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { smartbi } from "../index.js";
|
|
2
|
+
|
|
3
|
+
//#region src/service/BusinessThemeService.ts
|
|
4
|
+
/**
|
|
5
|
+
* 创建业务对象
|
|
6
|
+
* @param businessThemeId 业务主题ID
|
|
7
|
+
* @param parentId 业务对象父ID
|
|
8
|
+
* @param tableId 表ID
|
|
9
|
+
* @returns 无返回值
|
|
10
|
+
*/
|
|
11
|
+
const createBusinessThemeObject = (businessThemeId, parentId, tableId) => {
|
|
12
|
+
return smartbi("BusinessThemeService", "createBusinessThemeObject", [
|
|
13
|
+
businessThemeId,
|
|
14
|
+
parentId,
|
|
15
|
+
tableId
|
|
16
|
+
]);
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
//#endregion
|
|
20
|
+
export { createBusinessThemeObject };
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { K as ViewMetaData, P as PropertyName } from "../types-DOYMZhxT.js";
|
|
2
|
+
|
|
3
|
+
//#region src/service/BusinessViewService.d.ts
|
|
2
4
|
/**
|
|
3
5
|
* 根据数据集(可视化查询、原生SQL查询、SQL查询)的ID查询其SQL语句
|
|
4
6
|
* @param bizViewId (可视化查询、原生SQL查询、SQL查询)的ID
|
|
5
7
|
* @returns 返回其SQL语句
|
|
6
8
|
*/
|
|
7
|
-
|
|
9
|
+
declare const getSqlString: (bizViewId: string) => Promise<string>;
|
|
8
10
|
/**
|
|
9
11
|
* 打开业务查询以备读取结果集数据
|
|
10
12
|
* @param bizViewId 业务查询ID
|
|
@@ -13,14 +15,14 @@ export declare const getSqlString: (bizViewId: string) => Promise<string>;
|
|
|
13
15
|
* @param getTotalRows 是否获取总行数
|
|
14
16
|
* @returns 返回查询基本元数据信息
|
|
15
17
|
*/
|
|
16
|
-
|
|
18
|
+
declare const openLoadDataView: (bizViewId: string, paramsJsonArrStr: string, rowsPerPage: number, getTotalRows: boolean) => Promise<ViewMetaData>;
|
|
17
19
|
/**
|
|
18
20
|
* 按页读取结果集数据
|
|
19
21
|
* @param loadDataClientId 打开查询后的客户端标识
|
|
20
22
|
* @param pageNum 页码(第1页的页码为0,第2页的页码为1,如此类推)
|
|
21
23
|
* @returns 返回原始报表数据
|
|
22
24
|
*/
|
|
23
|
-
|
|
25
|
+
declare const loadViewData: (loadDataClientId: string, pageNum: number) => Promise<string[][]>;
|
|
24
26
|
/**
|
|
25
27
|
* 按页读取结果集数据
|
|
26
28
|
* @param loadDataClientId 打开查询后的客户端标识
|
|
@@ -28,43 +30,43 @@ export declare const loadViewData: (loadDataClientId: string, pageNum: number) =
|
|
|
28
30
|
* @param dataFormatMap 数据格式映射,如:"DOUBLE", "<浮点型-默认值>",目前仅支持double
|
|
29
31
|
* @returns 返回原始报表数据
|
|
30
32
|
*/
|
|
31
|
-
|
|
33
|
+
declare const loadViewDataWithDataformat: (loadDataClientId: string, pageNum: number, dataFormatMap: Map<string, string>) => Promise<string[][]>;
|
|
32
34
|
/**
|
|
33
35
|
* 关闭业务查询
|
|
34
36
|
* @param loadDataClientId 打开查询后的客户端标识
|
|
35
37
|
* @returns 无返回值
|
|
36
38
|
*/
|
|
37
|
-
|
|
39
|
+
declare const closeLoadDataView: (loadDataClientId: string) => Promise<void>;
|
|
38
40
|
/**
|
|
39
41
|
* 打开业务查询
|
|
40
42
|
* @param bizViewId 打开业务查询ID
|
|
41
43
|
* @returns 返回业务查询结果
|
|
42
44
|
*/
|
|
43
|
-
|
|
45
|
+
declare const openBusinessView: (bizViewId: string) => Promise<any[]>;
|
|
44
46
|
/**
|
|
45
47
|
* 关闭业务查询
|
|
46
48
|
* @param bizViewClientId 打开查询后的客户端标识
|
|
47
49
|
* @returns 无返回值
|
|
48
50
|
*/
|
|
49
|
-
|
|
51
|
+
declare const closeBusinessView: (bizViewClientId: string) => Promise<void>;
|
|
50
52
|
/**
|
|
51
53
|
* 检测输出字段
|
|
52
54
|
* @param bizViewClientId 打开查询后的客户端标识
|
|
53
55
|
* @returns 无返回值
|
|
54
56
|
*/
|
|
55
|
-
|
|
57
|
+
declare const getRawSqlOutputField: (bizViewClientId: string) => Promise<void>;
|
|
56
58
|
/**
|
|
57
59
|
* 检测输出字段
|
|
58
60
|
* @param clientId 客户端ID
|
|
59
61
|
* @returns 返回输出字段
|
|
60
62
|
*/
|
|
61
|
-
|
|
63
|
+
declare const detectOutputFields: (clientId: string) => Promise<any[]>;
|
|
62
64
|
/**
|
|
63
65
|
* 覆盖业务视图
|
|
64
66
|
* @param bizViewClientId 业务视图ID
|
|
65
67
|
* @returns 无返回值
|
|
66
68
|
*/
|
|
67
|
-
|
|
69
|
+
declare const overwriteBusinessView: (bizViewClientId: string) => Promise<void>;
|
|
68
70
|
/**
|
|
69
71
|
* 创建"原生SQL查询"数据集,并保存到指定目录下
|
|
70
72
|
* @param datasourceId 数据源ID
|
|
@@ -75,14 +77,14 @@ export declare const overwriteBusinessView: (bizViewClientId: string) => Promise
|
|
|
75
77
|
* @param folderId 用来保存数据集的指定目录ID
|
|
76
78
|
* @returns 返回所创建的"原生SQL查询"数据集ID
|
|
77
79
|
*/
|
|
78
|
-
|
|
80
|
+
declare const createRawSqlQueryBusinessViewAndSave: (datasourceId: string, sql: string, name: string, alias: string, desc: string, folderId: string) => Promise<string>;
|
|
79
81
|
/**
|
|
80
82
|
* 更新指定的"原生SQL查询"数据集的SQL语句,并自动检测输出字段
|
|
81
83
|
* @param businessViewId "原生SQL查询"数据集ID
|
|
82
84
|
* @param sql 新的SQL语句
|
|
83
85
|
* @returns 返回数据集ID
|
|
84
86
|
*/
|
|
85
|
-
|
|
87
|
+
declare const updateRawSqlQueryBusinessView: (businessViewId: string, sql: string) => Promise<string>;
|
|
86
88
|
/**
|
|
87
89
|
* 设置输出字段信息
|
|
88
90
|
* @param businessViewClientId clientId
|
|
@@ -91,4 +93,6 @@ export declare const updateRawSqlQueryBusinessView: (businessViewId: string, sql
|
|
|
91
93
|
* @param propertyValue 属性值
|
|
92
94
|
* @returns 无返回值
|
|
93
95
|
*/
|
|
94
|
-
|
|
96
|
+
declare const setOutputFieldInfo: (businessViewClientId: string, fieldId: string, propertyName: PropertyName, propertyValue: string) => Promise<void>;
|
|
97
|
+
//#endregion
|
|
98
|
+
export { closeBusinessView, closeLoadDataView, createRawSqlQueryBusinessViewAndSave, detectOutputFields, getRawSqlOutputField, getSqlString, loadViewData, loadViewDataWithDataformat, openBusinessView, openLoadDataView, overwriteBusinessView, setOutputFieldInfo, updateRawSqlQueryBusinessView };
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { smartbi } from "../index.js";
|
|
2
|
+
|
|
3
|
+
//#region src/service/BusinessViewService.ts
|
|
4
|
+
/**
|
|
5
|
+
* 根据数据集(可视化查询、原生SQL查询、SQL查询)的ID查询其SQL语句
|
|
6
|
+
* @param bizViewId (可视化查询、原生SQL查询、SQL查询)的ID
|
|
7
|
+
* @returns 返回其SQL语句
|
|
8
|
+
*/
|
|
9
|
+
const getSqlString = (bizViewId) => {
|
|
10
|
+
return smartbi("BusinessViewService", "getSqlString", [bizViewId]);
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* 打开业务查询以备读取结果集数据
|
|
14
|
+
* @param bizViewId 业务查询ID
|
|
15
|
+
* @param paramsJsonArrStr 报表的参数信息
|
|
16
|
+
* @param rowsPerPage 加载数据时每页返回的行数
|
|
17
|
+
* @param getTotalRows 是否获取总行数
|
|
18
|
+
* @returns 返回查询基本元数据信息
|
|
19
|
+
*/
|
|
20
|
+
const openLoadDataView = (bizViewId, paramsJsonArrStr, rowsPerPage, getTotalRows) => {
|
|
21
|
+
return smartbi("BusinessViewService", "openLoadDataView", [
|
|
22
|
+
bizViewId,
|
|
23
|
+
paramsJsonArrStr,
|
|
24
|
+
rowsPerPage,
|
|
25
|
+
getTotalRows
|
|
26
|
+
]);
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* 按页读取结果集数据
|
|
30
|
+
* @param loadDataClientId 打开查询后的客户端标识
|
|
31
|
+
* @param pageNum 页码(第1页的页码为0,第2页的页码为1,如此类推)
|
|
32
|
+
* @returns 返回原始报表数据
|
|
33
|
+
*/
|
|
34
|
+
const loadViewData = (loadDataClientId, pageNum) => {
|
|
35
|
+
return smartbi("BusinessViewService", "loadViewData", [loadDataClientId, pageNum]);
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* 按页读取结果集数据
|
|
39
|
+
* @param loadDataClientId 打开查询后的客户端标识
|
|
40
|
+
* @param pageNum 页码(第1页的页码为0,第2页的页码为1,如此类推)
|
|
41
|
+
* @param dataFormatMap 数据格式映射,如:"DOUBLE", "<浮点型-默认值>",目前仅支持double
|
|
42
|
+
* @returns 返回原始报表数据
|
|
43
|
+
*/
|
|
44
|
+
const loadViewDataWithDataformat = (loadDataClientId, pageNum, dataFormatMap) => {
|
|
45
|
+
return smartbi("BusinessViewService", "loadViewDataWithDataformat", [
|
|
46
|
+
loadDataClientId,
|
|
47
|
+
pageNum,
|
|
48
|
+
dataFormatMap.toString()
|
|
49
|
+
]);
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* 关闭业务查询
|
|
53
|
+
* @param loadDataClientId 打开查询后的客户端标识
|
|
54
|
+
* @returns 无返回值
|
|
55
|
+
*/
|
|
56
|
+
const closeLoadDataView = (loadDataClientId) => {
|
|
57
|
+
return smartbi("BusinessViewService", "closeLoadDataView", [loadDataClientId]);
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* 打开业务查询
|
|
61
|
+
* @param bizViewId 打开业务查询ID
|
|
62
|
+
* @returns 返回业务查询结果
|
|
63
|
+
*/
|
|
64
|
+
const openBusinessView = (bizViewId) => {
|
|
65
|
+
return smartbi("BusinessViewService", "openBusinessView", [bizViewId]);
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* 关闭业务查询
|
|
69
|
+
* @param bizViewClientId 打开查询后的客户端标识
|
|
70
|
+
* @returns 无返回值
|
|
71
|
+
*/
|
|
72
|
+
const closeBusinessView = (bizViewClientId) => {
|
|
73
|
+
return smartbi("BusinessViewService", "closeBusinessView", [bizViewClientId]);
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* 检测输出字段
|
|
77
|
+
* @param bizViewClientId 打开查询后的客户端标识
|
|
78
|
+
* @returns 无返回值
|
|
79
|
+
*/
|
|
80
|
+
const getRawSqlOutputField = (bizViewClientId) => {
|
|
81
|
+
return smartbi("BusinessViewService", "getRawSqlOutputField", [bizViewClientId]);
|
|
82
|
+
};
|
|
83
|
+
/**
|
|
84
|
+
* 检测输出字段
|
|
85
|
+
* @param clientId 客户端ID
|
|
86
|
+
* @returns 返回输出字段
|
|
87
|
+
*/
|
|
88
|
+
const detectOutputFields = (clientId) => {
|
|
89
|
+
return smartbi("BusinessViewService", "detectOutputFields", [clientId]);
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* 覆盖业务视图
|
|
93
|
+
* @param bizViewClientId 业务视图ID
|
|
94
|
+
* @returns 无返回值
|
|
95
|
+
*/
|
|
96
|
+
const overwriteBusinessView = (bizViewClientId) => {
|
|
97
|
+
return smartbi("BusinessViewService", "overwriteBusinessView", [bizViewClientId]);
|
|
98
|
+
};
|
|
99
|
+
/**
|
|
100
|
+
* 创建"原生SQL查询"数据集,并保存到指定目录下
|
|
101
|
+
* @param datasourceId 数据源ID
|
|
102
|
+
* @param sql "原生SQL查询"的SQL语句
|
|
103
|
+
* @param name 数据集的名称
|
|
104
|
+
* @param alias 数据集的别名
|
|
105
|
+
* @param desc 数据集的描述
|
|
106
|
+
* @param folderId 用来保存数据集的指定目录ID
|
|
107
|
+
* @returns 返回所创建的"原生SQL查询"数据集ID
|
|
108
|
+
*/
|
|
109
|
+
const createRawSqlQueryBusinessViewAndSave = (datasourceId, sql, name, alias, desc, folderId) => {
|
|
110
|
+
return smartbi("BusinessViewService", "createRawSqlQueryBusinessViewAndSave", [
|
|
111
|
+
datasourceId,
|
|
112
|
+
sql,
|
|
113
|
+
name,
|
|
114
|
+
alias,
|
|
115
|
+
desc,
|
|
116
|
+
folderId
|
|
117
|
+
]);
|
|
118
|
+
};
|
|
119
|
+
/**
|
|
120
|
+
* 更新指定的"原生SQL查询"数据集的SQL语句,并自动检测输出字段
|
|
121
|
+
* @param businessViewId "原生SQL查询"数据集ID
|
|
122
|
+
* @param sql 新的SQL语句
|
|
123
|
+
* @returns 返回数据集ID
|
|
124
|
+
*/
|
|
125
|
+
const updateRawSqlQueryBusinessView = (businessViewId, sql) => {
|
|
126
|
+
return smartbi("BusinessViewService", "updateRawSqlQueryBusinessView", [businessViewId, sql]);
|
|
127
|
+
};
|
|
128
|
+
/**
|
|
129
|
+
* 设置输出字段信息
|
|
130
|
+
* @param businessViewClientId clientId
|
|
131
|
+
* @param fieldId 字段信息
|
|
132
|
+
* @param propertyName 属性名,如alias,desc,dataType,dataFormat,orderby,transformRule
|
|
133
|
+
* @param propertyValue 属性值
|
|
134
|
+
* @returns 无返回值
|
|
135
|
+
*/
|
|
136
|
+
const setOutputFieldInfo = (businessViewClientId, fieldId, propertyName, propertyValue) => {
|
|
137
|
+
return smartbi("BusinessViewService", "setOutputFieldInfo", [
|
|
138
|
+
businessViewClientId,
|
|
139
|
+
fieldId,
|
|
140
|
+
propertyName,
|
|
141
|
+
propertyValue
|
|
142
|
+
]);
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
//#endregion
|
|
146
|
+
export { closeBusinessView, closeLoadDataView, createRawSqlQueryBusinessViewAndSave, detectOutputFields, getRawSqlOutputField, getSqlString, loadViewData, loadViewDataWithDataformat, openBusinessView, openLoadDataView, overwriteBusinessView, setOutputFieldInfo, updateRawSqlQueryBusinessView };
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { L as ResourcePermission, M as PermissionDescendType, N as PermissionType, R as ResourcePermissionItem, o as CatalogElement, s as CatalogElementType, t as AccessType, v as HiddenInBrowse, y as ICatalogSearchResult } from "../types-DOYMZhxT.js";
|
|
2
|
+
|
|
3
|
+
//#region src/service/CatalogService.d.ts
|
|
2
4
|
/**
|
|
3
5
|
* 判断某个资源是否可访问。
|
|
4
6
|
* 参数:
|
|
@@ -11,18 +13,18 @@ import type { AccessType, CatalogElementType, HiddenInBrowse, CatalogElement, IC
|
|
|
11
13
|
* @param type 访问类型
|
|
12
14
|
* @returns 返回是否有权限的布尔值
|
|
13
15
|
*/
|
|
14
|
-
|
|
16
|
+
declare const isCatalogElementAccessible: (elementId: string, type: AccessType) => Promise<boolean>;
|
|
15
17
|
/**
|
|
16
18
|
* 获取资源树的顶层节点列表
|
|
17
19
|
* @returns 返回顶层节点列表,节点类型为CatalogElement
|
|
18
20
|
*/
|
|
19
|
-
|
|
21
|
+
declare const getRootElements: () => Promise<CatalogElement[]>;
|
|
20
22
|
/**
|
|
21
23
|
* 获得指定节点的子节点列表
|
|
22
24
|
* @param nodeId 指定节点ID
|
|
23
25
|
* @returns 返回子节点列表,节点类型为CatalogElement
|
|
24
26
|
*/
|
|
25
|
-
|
|
27
|
+
declare const getChildElements: (nodeId: string) => Promise<CatalogElement[]>;
|
|
26
28
|
/**
|
|
27
29
|
* 创建目录
|
|
28
30
|
* @param parentNodeId 父目录ID
|
|
@@ -33,7 +35,7 @@ export declare const getChildElements: (nodeId: string) => Promise<CatalogElemen
|
|
|
33
35
|
* @param hiddenInBrowse 是否在浏览模块中隐藏此目录
|
|
34
36
|
* @returns 返回创建的目录对象,类型为CatalogElement
|
|
35
37
|
*/
|
|
36
|
-
|
|
38
|
+
declare const createFolder: (parentNodeId: string, name: string, alias: string, desc: string, type: CatalogElementType | string, hiddenInBrowse: HiddenInBrowse) => Promise<CatalogElement>;
|
|
37
39
|
/**
|
|
38
40
|
* 通过ID创建目录
|
|
39
41
|
* @param parentNodeId 父目录ID
|
|
@@ -45,51 +47,51 @@ export declare const createFolder: (parentNodeId: string, name: string, alias: s
|
|
|
45
47
|
* @param hiddenInBrowse 是否在浏览模块中隐藏此目录
|
|
46
48
|
* @returns 返回创建的目录对象,类型为CatalogElement
|
|
47
49
|
*/
|
|
48
|
-
|
|
50
|
+
declare const createFolderById: (parentNodeId: string, id: string, name: string, alias: string, desc: string, type: CatalogElementType | string, hiddenInBrowse: HiddenInBrowse) => Promise<CatalogElement>;
|
|
49
51
|
/**
|
|
50
52
|
* 通过ID访问资源
|
|
51
53
|
* @param elementId 资源ID
|
|
52
54
|
* @returns 返回资源对象,类型为CatalogElement
|
|
53
55
|
*/
|
|
54
|
-
|
|
56
|
+
declare const getCatalogElementById: (elementId: string) => Promise<CatalogElement>;
|
|
55
57
|
/**
|
|
56
58
|
* 通过类型获取结点
|
|
57
59
|
* @param type 节点类型
|
|
58
60
|
* @returns 返回指定类型的节点列表,节点类型为CatalogElement
|
|
59
61
|
*/
|
|
60
|
-
|
|
62
|
+
declare const getCatalogElementByType: (type: CatalogElementType | string) => Promise<CatalogElement[]>;
|
|
61
63
|
/**
|
|
62
64
|
* 获取目录下指定类型的子元素
|
|
63
65
|
* @param parentNodeId 父节点ID
|
|
64
66
|
* @param types 要获取的子元素类型数组
|
|
65
67
|
* @returns 返回指定类型的子元素列表,节点类型为CatalogElement
|
|
66
68
|
*/
|
|
67
|
-
|
|
69
|
+
declare const getChildElementsByTypes: (parentNodeId: string, types: (CatalogElementType | string)[]) => Promise<CatalogElement[]>;
|
|
68
70
|
/**
|
|
69
71
|
* 获取资源直接被授予的权限信息
|
|
70
72
|
* @param resId 资源ID
|
|
71
73
|
* @returns 返回资源直接被授予的权限信息,类型为ResourcePermission
|
|
72
74
|
*/
|
|
73
|
-
|
|
75
|
+
declare const getAssignedPermissions: (resId: string) => Promise<ResourcePermission>;
|
|
74
76
|
/**
|
|
75
77
|
* 获取资源继承的权限信息
|
|
76
78
|
* @param resId 资源ID
|
|
77
79
|
* @returns 返回资源继承的权限信息列表,类型为ResourcePermissionItem[]
|
|
78
80
|
*/
|
|
79
|
-
|
|
81
|
+
declare const getInheritedPermissions: (resId: string) => Promise<ResourcePermissionItem[]>;
|
|
80
82
|
/**
|
|
81
83
|
* 通过ID删除资源
|
|
82
84
|
* @param id 资源ID
|
|
83
85
|
* @returns 无返回值
|
|
84
86
|
*/
|
|
85
|
-
|
|
87
|
+
declare const deleteCatalogElement: (id: string) => Promise<void>;
|
|
86
88
|
/**
|
|
87
89
|
* 根据别名或名称模糊查询资源信息
|
|
88
90
|
* @param alias 别名或名称关键字
|
|
89
91
|
* @param purview "READ":"查看"; "WRITE":"编辑"; "REF":"引用"
|
|
90
92
|
* @returns 返回搜索结果列表,类型为ICatalogSearchResult[]
|
|
91
93
|
*/
|
|
92
|
-
|
|
94
|
+
declare const searchCatalogElementLikeAlias: (alias: string, purview: AccessType) => Promise<ICatalogSearchResult[]>;
|
|
93
95
|
/**
|
|
94
96
|
* 设置该资源的组权限
|
|
95
97
|
* @param elementId 资源ID
|
|
@@ -100,7 +102,7 @@ export declare const searchCatalogElementLikeAlias: (alias: string, purview: Acc
|
|
|
100
102
|
* @param isGroupDescend 是否组下降
|
|
101
103
|
* @returns 无返回值
|
|
102
104
|
*/
|
|
103
|
-
|
|
105
|
+
declare const setAssignedPermissionByGroup: (elementId: string, groupId: string, type: PermissionType, inherited: boolean, permissionDescendType: PermissionDescendType, isGroupDescend: boolean) => Promise<void>;
|
|
104
106
|
/**
|
|
105
107
|
* 设置该资源的角色权限
|
|
106
108
|
* @param elementId 资源ID
|
|
@@ -110,7 +112,7 @@ export declare const setAssignedPermissionByGroup: (elementId: string, groupId:
|
|
|
110
112
|
* @param permissionDescendType 权限下降类型
|
|
111
113
|
* @returns 无返回值
|
|
112
114
|
*/
|
|
113
|
-
|
|
115
|
+
declare const setAssignedPermissionByRole: (elementId: string, roleId: string, type: PermissionType, inherited: boolean, permissionDescendType: PermissionDescendType) => Promise<void>;
|
|
114
116
|
/**
|
|
115
117
|
* 设置该资源的用户权限
|
|
116
118
|
* @param elementId 资源ID
|
|
@@ -120,14 +122,14 @@ export declare const setAssignedPermissionByRole: (elementId: string, roleId: st
|
|
|
120
122
|
* @param permissionDescendType 权限下降类型
|
|
121
123
|
* @returns 无返回值
|
|
122
124
|
*/
|
|
123
|
-
|
|
125
|
+
declare const setAssignedPermissionByUser: (elementId: string, userId: string, type: PermissionType, inherited: boolean, permissionDescendType: PermissionDescendType) => Promise<void>;
|
|
124
126
|
/**
|
|
125
127
|
* 更换资源节点的图片
|
|
126
128
|
* @param id 资源ID
|
|
127
129
|
* @param image 图片路径或图片数据
|
|
128
130
|
* @returns 无返回值
|
|
129
131
|
*/
|
|
130
|
-
|
|
132
|
+
declare const updateCatalogElementImage: (id: string, image: string) => Promise<void>;
|
|
131
133
|
/**
|
|
132
134
|
* 根据ID修改资源信息
|
|
133
135
|
* @param id 资源ID
|
|
@@ -135,7 +137,7 @@ export declare const updateCatalogElementImage: (id: string, image: string) => P
|
|
|
135
137
|
* @param wholeExtended 完整的扩展内容,json字符串,格式如下:{"extended": "{\"hasChild\":\"false\",\"hiddenInBrowse\":\"false\"}"}。 该参数内容可为空。如不为空,扩展字段内容将全部替换为该参数内容,否则只对扩展属性进行增量添加。
|
|
136
138
|
* @returns 无返回值
|
|
137
139
|
*/
|
|
138
|
-
|
|
140
|
+
declare const updateCatalogNode: (id: string, jsonNodeConfig: string, wholeExtended: string) => Promise<void>;
|
|
139
141
|
/**
|
|
140
142
|
* 创建WEB链接
|
|
141
143
|
* @param parentFolderId 父文件夹ID
|
|
@@ -149,7 +151,7 @@ export declare const updateCatalogNode: (id: string, jsonNodeConfig: string, who
|
|
|
149
151
|
* 如果此值设置为空,则系统会默认为在新窗口打开并不传递登录信息
|
|
150
152
|
* @returns 返回新创建的URL链接ID
|
|
151
153
|
*/
|
|
152
|
-
|
|
154
|
+
declare const createURLLink: (parentFolderId: string, urlName: string, urlAlias: string, urlDesc: string, url: string, setting: string) => Promise<string>;
|
|
153
155
|
/**
|
|
154
156
|
* 更新WEB链接
|
|
155
157
|
* @param urlID 结点ID
|
|
@@ -162,7 +164,7 @@ export declare const createURLLink: (parentFolderId: string, urlName: string, ur
|
|
|
162
164
|
* 如果此值设置为空,则系统会默认为在新窗口打开并不传递登录信
|
|
163
165
|
* @returns 无返回值
|
|
164
166
|
*/
|
|
165
|
-
|
|
167
|
+
declare const updateURLLink: (urlID: string, urlAlias: string, urlDesc: string, url: string, setting: string) => Promise<void>;
|
|
166
168
|
/**
|
|
167
169
|
* 复制粘贴并返回新ID
|
|
168
170
|
* @param toId 目标ID
|
|
@@ -172,7 +174,7 @@ export declare const updateURLLink: (urlID: string, urlAlias: string, urlDesc: s
|
|
|
172
174
|
* @param desc 描述
|
|
173
175
|
* @returns 返回新创建元素的ID
|
|
174
176
|
*/
|
|
175
|
-
|
|
177
|
+
declare const copyAndPasteReturnNewId: (toId: string, srcId: string, name: string, alias: string, desc: string) => Promise<string>;
|
|
176
178
|
/**
|
|
177
179
|
* 创建资源树结点
|
|
178
180
|
* 注意:此方法是单纯新建一个树结点,调用此方法前,必须存在此结点类型的实体资源.
|
|
@@ -185,4 +187,6 @@ export declare const copyAndPasteReturnNewId: (toId: string, srcId: string, name
|
|
|
185
187
|
* @param type 类型
|
|
186
188
|
* @returns 返回创建的资源节点,类型为CatalogElement
|
|
187
189
|
*/
|
|
188
|
-
|
|
190
|
+
declare const createCatalogElement: (parentId: string, id: string, name: string, alias: string, desc: string, order: number, type: CatalogElementType | string) => Promise<CatalogElement>;
|
|
191
|
+
//#endregion
|
|
192
|
+
export { copyAndPasteReturnNewId, createCatalogElement, createFolder, createFolderById, createURLLink, deleteCatalogElement, getAssignedPermissions, getCatalogElementById, getCatalogElementByType, getChildElements, getChildElementsByTypes, getInheritedPermissions, getRootElements, isCatalogElementAccessible, searchCatalogElementLikeAlias, setAssignedPermissionByGroup, setAssignedPermissionByRole, setAssignedPermissionByUser, updateCatalogElementImage, updateCatalogNode, updateURLLink };
|