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.
- 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-C2_iES_3.d.ts +363 -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
|
@@ -1,62 +1,64 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { A as OrderType, F as ReportData, k as OperatorType, l as ClientReportView, n as AggregateType, u as CustomFilterDataBean } from "../types-C2_iES_3.js";
|
|
2
|
+
|
|
3
|
+
//#region src/service/ClientReportService.d.ts
|
|
2
4
|
/**
|
|
3
5
|
* 打开一个报表
|
|
4
6
|
* @param queryId 报表ID
|
|
5
7
|
* @returns 返回打开的报表视图
|
|
6
8
|
*/
|
|
7
|
-
|
|
9
|
+
declare const openQuery: (queryId: string) => Promise<ClientReportView>;
|
|
8
10
|
/**
|
|
9
11
|
* 打开一个报表(不初始化)
|
|
10
12
|
* @param queryId 报表ID
|
|
11
13
|
* @returns 返回打开的报表视图
|
|
12
14
|
*/
|
|
13
|
-
|
|
15
|
+
declare const openQueryWithoutInit: (queryId: string) => Promise<ClientReportView>;
|
|
14
16
|
/**
|
|
15
17
|
* 取得一个表达式的值
|
|
16
18
|
* @param clientId 客户ID
|
|
17
19
|
* @param func 表达式
|
|
18
20
|
* @returns 表达式的值
|
|
19
21
|
*/
|
|
20
|
-
|
|
22
|
+
declare const getFunctionValue: (clientId: string, func: string) => Promise<string>;
|
|
21
23
|
/**
|
|
22
24
|
* 设置每页的行数
|
|
23
25
|
* @param clientId 客户ID
|
|
24
26
|
* @param rowsPerPage 每页行数
|
|
25
27
|
* @returns 无返回值
|
|
26
28
|
*/
|
|
27
|
-
|
|
29
|
+
declare const setRowsPerPage: (clientId: string, rowsPerPage: number) => Promise<void>;
|
|
28
30
|
/**
|
|
29
31
|
* 获取每页的行数
|
|
30
32
|
* @param clientId 客户ID
|
|
31
33
|
* @returns 每页行数
|
|
32
34
|
*/
|
|
33
|
-
|
|
35
|
+
declare const getRowsPerPage: (clientId: string) => Promise<number>;
|
|
34
36
|
/**
|
|
35
37
|
* 执行报表(新接口)
|
|
36
38
|
* @param clientId 客户ID
|
|
37
39
|
* @returns 报表的总行数
|
|
38
40
|
*/
|
|
39
|
-
|
|
41
|
+
declare const executeQueryLong: (clientId: string) => Promise<number>;
|
|
40
42
|
/**
|
|
41
43
|
* 获得报表数据
|
|
42
44
|
* @param clientId 客户ID
|
|
43
45
|
* @param pageNum 报表页码,指定获取报表的第几页,从0算起
|
|
44
46
|
* @returns 报表数据
|
|
45
47
|
*/
|
|
46
|
-
|
|
48
|
+
declare const getReportData: (clientId: string, pageNum: number) => Promise<ReportData>;
|
|
47
49
|
/**
|
|
48
50
|
* 获得原始报表数据
|
|
49
51
|
* @param clientId 客户ID
|
|
50
52
|
* @param pageNum 报表页码,指定获取报表的第几页,从0算起
|
|
51
53
|
* @returns 原始报表数据
|
|
52
54
|
*/
|
|
53
|
-
|
|
55
|
+
declare const getRawReportData: (clientId: string, pageNum: number) => Promise<ReportData>;
|
|
54
56
|
/**
|
|
55
57
|
* 将报表信息从服务端的会话状态中清除
|
|
56
58
|
* @param clientId 客户ID
|
|
57
59
|
* @returns 无返回值
|
|
58
60
|
*/
|
|
59
|
-
|
|
61
|
+
declare const removeFromSession: (clientId: string) => Promise<void>;
|
|
60
62
|
/**
|
|
61
63
|
* 设置参数值
|
|
62
64
|
* @param clientId 客户ID
|
|
@@ -65,7 +67,7 @@ export declare const removeFromSession: (clientId: string) => Promise<void>;
|
|
|
65
67
|
* @param paramDisplayValue 参数显示值
|
|
66
68
|
* @returns 是否设置成功
|
|
67
69
|
*/
|
|
68
|
-
|
|
70
|
+
declare const setParamValue: (clientId: string, paramId: string, paramValue: string, paramDisplayValue: string) => Promise<boolean>;
|
|
69
71
|
/**
|
|
70
72
|
* 设置参数值(按名称)
|
|
71
73
|
* @param clientId 客户ID
|
|
@@ -74,21 +76,21 @@ export declare const setParamValue: (clientId: string, paramId: string, paramVal
|
|
|
74
76
|
* @param paramDisplayValue 参数显示值
|
|
75
77
|
* @returns 是否设置成功
|
|
76
78
|
*/
|
|
77
|
-
|
|
79
|
+
declare const setParamValueByName: (clientId: string, paramId: string, paramValue: string, paramDisplayValue: string) => Promise<boolean>;
|
|
78
80
|
/**
|
|
79
81
|
* 获得某个参数的默认值
|
|
80
82
|
* @param clientId 客户ID
|
|
81
83
|
* @param paramId 参数ID
|
|
82
84
|
* @returns 参数的默认值列表
|
|
83
85
|
*/
|
|
84
|
-
|
|
86
|
+
declare const getParamDefaultValue: (clientId: string, paramId: string) => Promise<string[]>;
|
|
85
87
|
/**
|
|
86
88
|
* 获得某个参数的候选值列表
|
|
87
89
|
* @param clientId 客户ID
|
|
88
90
|
* @param paramId 参数ID
|
|
89
91
|
* @returns 参数的候选值列表
|
|
90
92
|
*/
|
|
91
|
-
|
|
93
|
+
declare const getParamStandbyValue: (clientId: string, paramId: string) => Promise<string[]>;
|
|
92
94
|
/**
|
|
93
95
|
* 设置报表的排序字段
|
|
94
96
|
* @param clientId 客户ID
|
|
@@ -96,7 +98,7 @@ export declare const getParamStandbyValue: (clientId: string, paramId: string) =
|
|
|
96
98
|
* @param orderType 排序方式, ASC, DESC, NONE
|
|
97
99
|
* @returns 是否设置成功
|
|
98
100
|
*/
|
|
99
|
-
|
|
101
|
+
declare const setOrderByType: (clientId: string, fieldId: string, orderType: OrderType | string) => Promise<boolean>;
|
|
100
102
|
/**
|
|
101
103
|
* 设置字段聚合方式
|
|
102
104
|
* @param clientId 客户ID
|
|
@@ -104,14 +106,14 @@ export declare const setOrderByType: (clientId: string, fieldId: string, orderTy
|
|
|
104
106
|
* @param aggregate 聚合方式 SUM, MIN, MAX, COUNT, DISTINCT_COUNT, AVG, NULL
|
|
105
107
|
* @returns 是否设置成功
|
|
106
108
|
*/
|
|
107
|
-
|
|
109
|
+
declare const setFieldAggregate: (clientId: string, fieldId: string, aggregate: AggregateType | string) => Promise<boolean>;
|
|
108
110
|
/**
|
|
109
111
|
* 获取报表中某字段的所有可能值
|
|
110
112
|
* @param clientId 客户ID
|
|
111
113
|
* @param fieldId 字段ID
|
|
112
114
|
* @returns 字段的所有可能值列表
|
|
113
115
|
*/
|
|
114
|
-
|
|
116
|
+
declare const getFieldDistinctValues: (clientId: string, fieldId: string) => Promise<string[]>;
|
|
115
117
|
/**
|
|
116
118
|
* 设置过滤条件
|
|
117
119
|
* @param clientId 客户ID
|
|
@@ -120,21 +122,21 @@ export declare const getFieldDistinctValues: (clientId: string, fieldId: string)
|
|
|
120
122
|
* @param value 值
|
|
121
123
|
* @returns 是否设置成功
|
|
122
124
|
*/
|
|
123
|
-
|
|
125
|
+
declare const setAutoCondition: (clientId: string, fieldId: string, operator: OperatorType | string, value: string) => Promise<boolean>;
|
|
124
126
|
/**
|
|
125
127
|
* 设置自定义过滤条件
|
|
126
128
|
* @param clientId 客户ID
|
|
127
129
|
* @param filterData 过滤条件数据
|
|
128
130
|
* @returns 是否设置成功
|
|
129
131
|
*/
|
|
130
|
-
|
|
132
|
+
declare const setCustomCondition: (clientId: string, filterData: CustomFilterDataBean) => Promise<boolean>;
|
|
131
133
|
/**
|
|
132
134
|
* 设置客户端配置
|
|
133
135
|
* @param clientId 客户ID
|
|
134
136
|
* @param clientConfig 客户端配置
|
|
135
137
|
* @returns 无返回值
|
|
136
138
|
*/
|
|
137
|
-
|
|
139
|
+
declare const setClientConfig: (clientId: string, clientConfig: string) => Promise<void>;
|
|
138
140
|
/**
|
|
139
141
|
* 克隆查询
|
|
140
142
|
* @param clientId 客户ID
|
|
@@ -144,7 +146,7 @@ export declare const setClientConfig: (clientId: string, clientConfig: string) =
|
|
|
144
146
|
* @param desc 描述
|
|
145
147
|
* @returns 新克隆的查询ID
|
|
146
148
|
*/
|
|
147
|
-
|
|
149
|
+
declare const cloneQuery: (clientId: string, parentNodeId: string, name: string, alias: string, desc: string) => Promise<string>;
|
|
148
150
|
/**
|
|
149
151
|
* 覆盖查询
|
|
150
152
|
* @param clientId 客户ID
|
|
@@ -152,11 +154,13 @@ export declare const cloneQuery: (clientId: string, parentNodeId: string, name:
|
|
|
152
154
|
* @param desc 描述
|
|
153
155
|
* @returns 是否覆盖成功
|
|
154
156
|
*/
|
|
155
|
-
|
|
157
|
+
declare const overwriteQuery: (clientId: string, replacedReportId: string, desc: string) => Promise<boolean>;
|
|
156
158
|
/**
|
|
157
159
|
* 导出报表
|
|
158
160
|
* @param clientId 客户ID
|
|
159
161
|
* @param reportId 报表ID
|
|
160
162
|
* @returns 无返回值
|
|
161
163
|
*/
|
|
162
|
-
|
|
164
|
+
declare const dump: (clientId: string, reportId: string) => Promise<void>;
|
|
165
|
+
//#endregion
|
|
166
|
+
export { cloneQuery, dump, executeQueryLong, getFieldDistinctValues, getFunctionValue, getParamDefaultValue, getParamStandbyValue, getRawReportData, getReportData, getRowsPerPage, openQuery, openQueryWithoutInit, overwriteQuery, removeFromSession, setAutoCondition, setClientConfig, setCustomCondition, setFieldAggregate, setOrderByType, setParamValue, setParamValueByName, setRowsPerPage };
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
import { smartbi } from "../index.js";
|
|
2
|
+
|
|
3
|
+
//#region src/service/ClientReportService.ts
|
|
4
|
+
/**
|
|
5
|
+
* 打开一个报表
|
|
6
|
+
* @param queryId 报表ID
|
|
7
|
+
* @returns 返回打开的报表视图
|
|
8
|
+
*/
|
|
9
|
+
const openQuery = (queryId) => {
|
|
10
|
+
return smartbi("ClientReportService", "openQuery", [queryId]);
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* 打开一个报表(不初始化)
|
|
14
|
+
* @param queryId 报表ID
|
|
15
|
+
* @returns 返回打开的报表视图
|
|
16
|
+
*/
|
|
17
|
+
const openQueryWithoutInit = (queryId) => {
|
|
18
|
+
return smartbi("ClientReportService", "openQueryWithoutInit", [queryId]);
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* 取得一个表达式的值
|
|
22
|
+
* @param clientId 客户ID
|
|
23
|
+
* @param func 表达式
|
|
24
|
+
* @returns 表达式的值
|
|
25
|
+
*/
|
|
26
|
+
const getFunctionValue = (clientId, func) => {
|
|
27
|
+
return smartbi("ClientReportService", "getFunctionValue", [clientId, func]);
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* 设置每页的行数
|
|
31
|
+
* @param clientId 客户ID
|
|
32
|
+
* @param rowsPerPage 每页行数
|
|
33
|
+
* @returns 无返回值
|
|
34
|
+
*/
|
|
35
|
+
const setRowsPerPage = (clientId, rowsPerPage) => {
|
|
36
|
+
return smartbi("ClientReportService", "setRowsPerPage", [clientId, rowsPerPage]);
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* 获取每页的行数
|
|
40
|
+
* @param clientId 客户ID
|
|
41
|
+
* @returns 每页行数
|
|
42
|
+
*/
|
|
43
|
+
const getRowsPerPage = (clientId) => {
|
|
44
|
+
return smartbi("ClientReportService", "getRowsPerPage", [clientId]);
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* 执行报表(新接口)
|
|
48
|
+
* @param clientId 客户ID
|
|
49
|
+
* @returns 报表的总行数
|
|
50
|
+
*/
|
|
51
|
+
const executeQueryLong = (clientId) => {
|
|
52
|
+
return smartbi("ClientReportService", "executeQueryLong", [clientId]);
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* 获得报表数据
|
|
56
|
+
* @param clientId 客户ID
|
|
57
|
+
* @param pageNum 报表页码,指定获取报表的第几页,从0算起
|
|
58
|
+
* @returns 报表数据
|
|
59
|
+
*/
|
|
60
|
+
const getReportData = (clientId, pageNum) => {
|
|
61
|
+
return smartbi("ClientReportService", "getReportData", [clientId, pageNum]);
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* 获得原始报表数据
|
|
65
|
+
* @param clientId 客户ID
|
|
66
|
+
* @param pageNum 报表页码,指定获取报表的第几页,从0算起
|
|
67
|
+
* @returns 原始报表数据
|
|
68
|
+
*/
|
|
69
|
+
const getRawReportData = (clientId, pageNum) => {
|
|
70
|
+
return smartbi("ClientReportService", "getRawReportData", [clientId, pageNum]);
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* 将报表信息从服务端的会话状态中清除
|
|
74
|
+
* @param clientId 客户ID
|
|
75
|
+
* @returns 无返回值
|
|
76
|
+
*/
|
|
77
|
+
const removeFromSession = (clientId) => {
|
|
78
|
+
return smartbi("ClientReportService", "removeFromSession", [clientId]);
|
|
79
|
+
};
|
|
80
|
+
/**
|
|
81
|
+
* 设置参数值
|
|
82
|
+
* @param clientId 客户ID
|
|
83
|
+
* @param paramId 参数ID
|
|
84
|
+
* @param paramValue 参数值
|
|
85
|
+
* @param paramDisplayValue 参数显示值
|
|
86
|
+
* @returns 是否设置成功
|
|
87
|
+
*/
|
|
88
|
+
const setParamValue = (clientId, paramId, paramValue, paramDisplayValue) => {
|
|
89
|
+
return smartbi("ClientReportService", "setParamValue", [
|
|
90
|
+
clientId,
|
|
91
|
+
paramId,
|
|
92
|
+
paramValue,
|
|
93
|
+
paramDisplayValue
|
|
94
|
+
]);
|
|
95
|
+
};
|
|
96
|
+
/**
|
|
97
|
+
* 设置参数值(按名称)
|
|
98
|
+
* @param clientId 客户ID
|
|
99
|
+
* @param paramId 参数ID
|
|
100
|
+
* @param paramValue 参数值
|
|
101
|
+
* @param paramDisplayValue 参数显示值
|
|
102
|
+
* @returns 是否设置成功
|
|
103
|
+
*/
|
|
104
|
+
const setParamValueByName = (clientId, paramId, paramValue, paramDisplayValue) => {
|
|
105
|
+
return smartbi("ClientReportService", "setParamValueByName", [
|
|
106
|
+
clientId,
|
|
107
|
+
paramId,
|
|
108
|
+
paramValue,
|
|
109
|
+
paramDisplayValue
|
|
110
|
+
]);
|
|
111
|
+
};
|
|
112
|
+
/**
|
|
113
|
+
* 获得某个参数的默认值
|
|
114
|
+
* @param clientId 客户ID
|
|
115
|
+
* @param paramId 参数ID
|
|
116
|
+
* @returns 参数的默认值列表
|
|
117
|
+
*/
|
|
118
|
+
const getParamDefaultValue = (clientId, paramId) => {
|
|
119
|
+
return smartbi("ClientReportService", "getParamDefaultValue", [clientId, paramId]);
|
|
120
|
+
};
|
|
121
|
+
/**
|
|
122
|
+
* 获得某个参数的候选值列表
|
|
123
|
+
* @param clientId 客户ID
|
|
124
|
+
* @param paramId 参数ID
|
|
125
|
+
* @returns 参数的候选值列表
|
|
126
|
+
*/
|
|
127
|
+
const getParamStandbyValue = (clientId, paramId) => {
|
|
128
|
+
return smartbi("ClientReportService", "getParamStandbyValue", [clientId, paramId]);
|
|
129
|
+
};
|
|
130
|
+
/**
|
|
131
|
+
* 设置报表的排序字段
|
|
132
|
+
* @param clientId 客户ID
|
|
133
|
+
* @param fieldId 字段ID
|
|
134
|
+
* @param orderType 排序方式, ASC, DESC, NONE
|
|
135
|
+
* @returns 是否设置成功
|
|
136
|
+
*/
|
|
137
|
+
const setOrderByType = (clientId, fieldId, orderType) => {
|
|
138
|
+
return smartbi("ClientReportService", "setOrderByType", [
|
|
139
|
+
clientId,
|
|
140
|
+
fieldId,
|
|
141
|
+
orderType
|
|
142
|
+
]);
|
|
143
|
+
};
|
|
144
|
+
/**
|
|
145
|
+
* 设置字段聚合方式
|
|
146
|
+
* @param clientId 客户ID
|
|
147
|
+
* @param fieldId 字段ID
|
|
148
|
+
* @param aggregate 聚合方式 SUM, MIN, MAX, COUNT, DISTINCT_COUNT, AVG, NULL
|
|
149
|
+
* @returns 是否设置成功
|
|
150
|
+
*/
|
|
151
|
+
const setFieldAggregate = (clientId, fieldId, aggregate) => {
|
|
152
|
+
return smartbi("ClientReportService", "setFieldAggregate", [
|
|
153
|
+
clientId,
|
|
154
|
+
fieldId,
|
|
155
|
+
aggregate
|
|
156
|
+
]);
|
|
157
|
+
};
|
|
158
|
+
/**
|
|
159
|
+
* 获取报表中某字段的所有可能值
|
|
160
|
+
* @param clientId 客户ID
|
|
161
|
+
* @param fieldId 字段ID
|
|
162
|
+
* @returns 字段的所有可能值列表
|
|
163
|
+
*/
|
|
164
|
+
const getFieldDistinctValues = (clientId, fieldId) => {
|
|
165
|
+
return smartbi("ClientReportService", "getFieldDistinctValues", [clientId, fieldId]);
|
|
166
|
+
};
|
|
167
|
+
/**
|
|
168
|
+
* 设置过滤条件
|
|
169
|
+
* @param clientId 客户ID
|
|
170
|
+
* @param fieldId 字段ID
|
|
171
|
+
* @param operator 操作符
|
|
172
|
+
* @param value 值
|
|
173
|
+
* @returns 是否设置成功
|
|
174
|
+
*/
|
|
175
|
+
const setAutoCondition = (clientId, fieldId, operator, value) => {
|
|
176
|
+
return smartbi("ClientReportService", "setAutoCondition", [
|
|
177
|
+
clientId,
|
|
178
|
+
fieldId,
|
|
179
|
+
operator,
|
|
180
|
+
value
|
|
181
|
+
]);
|
|
182
|
+
};
|
|
183
|
+
/**
|
|
184
|
+
* 设置自定义过滤条件
|
|
185
|
+
* @param clientId 客户ID
|
|
186
|
+
* @param filterData 过滤条件数据
|
|
187
|
+
* @returns 是否设置成功
|
|
188
|
+
*/
|
|
189
|
+
const setCustomCondition = (clientId, filterData) => {
|
|
190
|
+
return smartbi("ClientReportService", "setCustomCondition", [clientId, filterData.toString()]);
|
|
191
|
+
};
|
|
192
|
+
/**
|
|
193
|
+
* 设置客户端配置
|
|
194
|
+
* @param clientId 客户ID
|
|
195
|
+
* @param clientConfig 客户端配置
|
|
196
|
+
* @returns 无返回值
|
|
197
|
+
*/
|
|
198
|
+
const setClientConfig = (clientId, clientConfig) => {
|
|
199
|
+
return smartbi("ClientReportService", "setClientConfig", [clientId, clientConfig]);
|
|
200
|
+
};
|
|
201
|
+
/**
|
|
202
|
+
* 克隆查询
|
|
203
|
+
* @param clientId 客户ID
|
|
204
|
+
* @param parentNodeId 父节点ID
|
|
205
|
+
* * @param name 名称
|
|
206
|
+
* @param alias 别名
|
|
207
|
+
* @param desc 描述
|
|
208
|
+
* @returns 新克隆的查询ID
|
|
209
|
+
*/
|
|
210
|
+
const cloneQuery = (clientId, parentNodeId, name, alias, desc) => {
|
|
211
|
+
return smartbi("ClientReportService", "cloneQuery", [
|
|
212
|
+
clientId,
|
|
213
|
+
parentNodeId,
|
|
214
|
+
name,
|
|
215
|
+
alias,
|
|
216
|
+
desc
|
|
217
|
+
]);
|
|
218
|
+
};
|
|
219
|
+
/**
|
|
220
|
+
* 覆盖查询
|
|
221
|
+
* @param clientId 客户ID
|
|
222
|
+
* @param replacedReportId 被替换的报表ID
|
|
223
|
+
* @param desc 描述
|
|
224
|
+
* @returns 是否覆盖成功
|
|
225
|
+
*/
|
|
226
|
+
const overwriteQuery = (clientId, replacedReportId, desc) => {
|
|
227
|
+
return smartbi("ClientReportService", "overwriteQuery", [
|
|
228
|
+
clientId,
|
|
229
|
+
replacedReportId,
|
|
230
|
+
desc
|
|
231
|
+
]);
|
|
232
|
+
};
|
|
233
|
+
/**
|
|
234
|
+
* 导出报表
|
|
235
|
+
* @param clientId 客户ID
|
|
236
|
+
* @param reportId 报表ID
|
|
237
|
+
* @returns 无返回值
|
|
238
|
+
*/
|
|
239
|
+
const dump = (clientId, reportId) => {
|
|
240
|
+
return smartbi("ClientReportService", "dump", [clientId, reportId]);
|
|
241
|
+
};
|
|
242
|
+
|
|
243
|
+
//#endregion
|
|
244
|
+
export { cloneQuery, dump, executeQueryLong, getFieldDistinctValues, getFunctionValue, getParamDefaultValue, getParamStandbyValue, getRawReportData, getReportData, getRowsPerPage, openQuery, openQueryWithoutInit, overwriteQuery, removeFromSession, setAutoCondition, setClientConfig, setCustomCondition, setFieldAggregate, setOrderByType, setParamValue, setParamValueByName, setRowsPerPage };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { x as ICombinedReport } from "../types-C2_iES_3.js";
|
|
2
|
+
|
|
3
|
+
//#region src/service/CombinedReportService.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* 创建并打开一个报表
|
|
6
|
+
* @param reportId 报表ID
|
|
7
|
+
* @returns 返回打开的报表对象,类型为ICombinedReport
|
|
8
|
+
*/
|
|
9
|
+
declare const openReport: (reportId: string) => Promise<ICombinedReport>;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { openReport };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { smartbi } from "../index.js";
|
|
2
|
+
|
|
3
|
+
//#region src/service/CombinedReportService.ts
|
|
4
|
+
/**
|
|
5
|
+
* 创建并打开一个报表
|
|
6
|
+
* @param reportId 报表ID
|
|
7
|
+
* @returns 返回打开的报表对象,类型为ICombinedReport
|
|
8
|
+
*/
|
|
9
|
+
const openReport = (reportId) => {
|
|
10
|
+
return smartbi("CombinedReportService", "openReport", [reportId]);
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
//#endregion
|
|
14
|
+
export { openReport };
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { T as JDBCTable, V as SDKGridData, d as DataSource, i as BasicField, m as DriverType } from "../types-C2_iES_3.js";
|
|
2
|
+
|
|
3
|
+
//#region src/service/DataSourceService.d.ts
|
|
2
4
|
/**
|
|
3
5
|
* 创建数据源
|
|
4
6
|
* @param name 数据源名称
|
|
@@ -10,7 +12,7 @@ import type { BasicField, DataSource, DriverType, JDBCTable, SDKGridData } from
|
|
|
10
12
|
* @param url 连接字符串
|
|
11
13
|
* @returns 返回数据源ID
|
|
12
14
|
*/
|
|
13
|
-
|
|
15
|
+
declare const createDataSource: (name: string, connectUserName: string, connectPassword: string, maxConnection: number, driverType: DriverType | string, driverClassName: string, url: string) => Promise<string>;
|
|
14
16
|
/**
|
|
15
17
|
* 创建数据源(带目录参数)
|
|
16
18
|
* @param name 数据源名称
|
|
@@ -23,7 +25,7 @@ export declare const createDataSource: (name: string, connectUserName: string, c
|
|
|
23
25
|
* @param driverCatalog 驱动目录
|
|
24
26
|
* @returns 返回数据源ID
|
|
25
27
|
*/
|
|
26
|
-
|
|
28
|
+
declare const createDataSourceWithCatalog: (name: string, connectUserName: string, connectPassword: string, maxConnection: number, driverType: DriverType | string, driverClassName: string, url: string, driverCatalog: string) => Promise<string>;
|
|
27
29
|
/**
|
|
28
30
|
* 创建数据源(带事务隔离级别)
|
|
29
31
|
* @param name 数据源名称
|
|
@@ -37,7 +39,7 @@ export declare const createDataSourceWithCatalog: (name: string, connectUserName
|
|
|
37
39
|
* @param transactionIsolation 事务隔离级别
|
|
38
40
|
* @returns 返回数据源ID
|
|
39
41
|
*/
|
|
40
|
-
|
|
42
|
+
declare const createDataSourceWithTransactionIsolation: (name: string, connectUserName: string, connectPassword: string, maxConnection: number, driverType: DriverType | string, driverClassName: string, url: string, driverCatalog: string, transactionIsolation: number) => Promise<string>;
|
|
41
43
|
/**
|
|
42
44
|
* 修改数据源
|
|
43
45
|
* @param id 数据源ID
|
|
@@ -48,7 +50,7 @@ export declare const createDataSourceWithTransactionIsolation: (name: string, co
|
|
|
48
50
|
* @param driverClassName 驱动程序类名
|
|
49
51
|
* @param url 连接字符串
|
|
50
52
|
*/
|
|
51
|
-
|
|
53
|
+
declare const updateDataSource: (id: string, connectUserName: string, connectPassword: string, maxConnection: number, driverType: DriverType | string, driverClassName: string, url: string) => Promise<void>;
|
|
52
54
|
/**
|
|
53
55
|
* 修改数据源(带目录参数)
|
|
54
56
|
* @param id 数据源ID
|
|
@@ -60,7 +62,7 @@ export declare const updateDataSource: (id: string, connectUserName: string, con
|
|
|
60
62
|
* @param url 连接字符串
|
|
61
63
|
* @param driverCatalog 驱动目录
|
|
62
64
|
*/
|
|
63
|
-
|
|
65
|
+
declare const updateDataSourceWithCatalog: (id: string, connectUserName: string, connectPassword: string, maxConnection: number, driverType: DriverType | string, driverClassName: string, url: string, driverCatalog: string) => Promise<void>;
|
|
64
66
|
/**
|
|
65
67
|
* 修改数据源(带事务隔离级别)
|
|
66
68
|
* @param id 数据源ID
|
|
@@ -73,76 +75,76 @@ export declare const updateDataSourceWithCatalog: (id: string, connectUserName:
|
|
|
73
75
|
* @param driverCatalog 驱动目录
|
|
74
76
|
* @param transactionIsolation 事务隔离级别
|
|
75
77
|
*/
|
|
76
|
-
|
|
78
|
+
declare const updateDataSourceWithTransactionIsolation: (id: string, connectUserName: string, connectPassword: string, maxConnection: number, driverType: DriverType | string, driverClassName: string, url: string, driverCatalog: string, transactionIsolation: number) => Promise<void>;
|
|
77
79
|
/**
|
|
78
80
|
* 删除数据源
|
|
79
81
|
* @param dataSourceID 数据源ID
|
|
80
82
|
*/
|
|
81
|
-
|
|
83
|
+
declare const deleteDataSource: (dataSourceID: string) => Promise<void>;
|
|
82
84
|
/**
|
|
83
85
|
* 获取数据源
|
|
84
86
|
* @param dataSourceID 数据源ID
|
|
85
87
|
* @returns 返回数据源对象
|
|
86
88
|
*/
|
|
87
|
-
|
|
89
|
+
declare const getDataSource: (dataSourceID: string) => Promise<DataSource>;
|
|
88
90
|
/**
|
|
89
91
|
* 给数据源添加表
|
|
90
92
|
* @param dataSourceId 数据源ID
|
|
91
93
|
* @param tableList 表列表
|
|
92
94
|
*/
|
|
93
|
-
|
|
95
|
+
declare const addTablesToDataSource: (dataSourceId: string, tableList: JDBCTable[]) => Promise<void>;
|
|
94
96
|
/**
|
|
95
97
|
* 删除数据源的表、视图、存储过程
|
|
96
98
|
* @param dataSourceId 数据源ID
|
|
97
99
|
* @param schemaName 模式名称
|
|
98
100
|
* @param tableNameList 表名列表
|
|
99
101
|
*/
|
|
100
|
-
|
|
102
|
+
declare const removeTablesFromDataSource: (dataSourceId: string, schemaName: string, tableNameList: string[]) => Promise<void>;
|
|
101
103
|
/**
|
|
102
104
|
* 删除数据库表
|
|
103
105
|
* @param dsId 数据源ID
|
|
104
106
|
* @param schemaName 模式名称
|
|
105
107
|
* @param tableNameList 表名列表
|
|
106
108
|
*/
|
|
107
|
-
|
|
109
|
+
declare const removeTables: (dsId: string, schemaName: string, tableNameList: string[]) => Promise<void>;
|
|
108
110
|
/**
|
|
109
111
|
* 同步schema表
|
|
110
112
|
* @param dataSourceID 数据源ID
|
|
111
113
|
* @param schema 模式名称
|
|
112
114
|
*/
|
|
113
|
-
|
|
115
|
+
declare const synchTablesToDataSource: (dataSourceID: string, schema: string) => Promise<void>;
|
|
114
116
|
/**
|
|
115
117
|
* 同步catalog下面schema表
|
|
116
118
|
* @param dataSourceID 数据源ID
|
|
117
119
|
* @param catalog 目录名称
|
|
118
120
|
* @param schema 模式名称
|
|
119
121
|
*/
|
|
120
|
-
|
|
122
|
+
declare const synchTablesToDataSourceWithCatalog: (dataSourceID: string, catalog: string, schema: string) => Promise<void>;
|
|
121
123
|
/**
|
|
122
124
|
* 同步表
|
|
123
125
|
* @param tableId 表ID
|
|
124
126
|
*/
|
|
125
|
-
|
|
127
|
+
declare const syncTable: (tableId: string) => Promise<void>;
|
|
126
128
|
/**
|
|
127
129
|
* 修改表属性
|
|
128
130
|
* @param tableId 表ID
|
|
129
131
|
* @param tableAlias 表别名
|
|
130
132
|
* @param fieldList 字段列表
|
|
131
133
|
*/
|
|
132
|
-
|
|
134
|
+
declare const updateTablePropertys: (tableId: string, tableAlias: string, fieldList: BasicField[]) => Promise<void>;
|
|
133
135
|
/**
|
|
134
136
|
* 获取表字段
|
|
135
137
|
* @param tabelId 表ID
|
|
136
138
|
* @returns 返回字段列表
|
|
137
139
|
*/
|
|
138
|
-
|
|
140
|
+
declare const getFields: (tabelId: string) => Promise<BasicField[]>;
|
|
139
141
|
/**
|
|
140
142
|
* 获取"数据源"节点下某张表的数据
|
|
141
143
|
* @param tableId 表ID
|
|
142
144
|
* @param maxRows 最大行数
|
|
143
145
|
* @returns 返回表数据
|
|
144
146
|
*/
|
|
145
|
-
|
|
147
|
+
declare const getSampleTableData: (tableId: string, maxRows: number) => Promise<SDKGridData>;
|
|
146
148
|
/**
|
|
147
149
|
* 执行指定SQL语句,返回相应结果集
|
|
148
150
|
* @param dataSourceID 数据源ID
|
|
@@ -152,21 +154,21 @@ export declare const getSampleTableData: (tableId: string, maxRows: number) => P
|
|
|
152
154
|
* @param cacheable 是否缓存
|
|
153
155
|
* @returns 返回结果集数据
|
|
154
156
|
*/
|
|
155
|
-
|
|
157
|
+
declare const execute: (dataSourceID: string, sql: string, maxRows: number, format: boolean, cacheable: boolean) => Promise<SDKGridData>;
|
|
156
158
|
/**
|
|
157
159
|
* 直接执行指定SQL语句,返回相应结果集,不从缓存中返回结果集
|
|
158
160
|
* @param dataSourceID 数据源ID
|
|
159
161
|
* @param sql SQL语句
|
|
160
162
|
* @returns 返回结果集数据
|
|
161
163
|
*/
|
|
162
|
-
|
|
164
|
+
declare const executeNoCacheable: (dataSourceID: string, sql: string) => Promise<SDKGridData>;
|
|
163
165
|
/**
|
|
164
166
|
* 直接执行SQL语句,可以是INSERT, UPDATE, DELETE语句,也可以是SQL DDL语句
|
|
165
167
|
* @param dataSourceID 数据源ID
|
|
166
168
|
* @param sql SQL语句
|
|
167
169
|
* @returns 返回影响的行数
|
|
168
170
|
*/
|
|
169
|
-
|
|
171
|
+
declare const executeUpdate: (dataSourceID: string, sql: string) => Promise<number>;
|
|
170
172
|
/**
|
|
171
173
|
* 获取未格式化的原始的结果集数据
|
|
172
174
|
* @param dsId 数据源ID
|
|
@@ -175,4 +177,6 @@ export declare const executeUpdate: (dataSourceID: string, sql: string) => Promi
|
|
|
175
177
|
* @param rowPerPage 每页行数
|
|
176
178
|
* @returns 返回结果集数据
|
|
177
179
|
*/
|
|
178
|
-
|
|
180
|
+
declare const getDataByQuerySql: (dsId: string, sql: string, pageNum: number, rowPerPage: number) => Promise<SDKGridData>;
|
|
181
|
+
//#endregion
|
|
182
|
+
export { addTablesToDataSource, createDataSource, createDataSourceWithCatalog, createDataSourceWithTransactionIsolation, deleteDataSource, execute, executeNoCacheable, executeUpdate, getDataByQuerySql, getDataSource, getFields, getSampleTableData, removeTables, removeTablesFromDataSource, syncTable, synchTablesToDataSource, synchTablesToDataSourceWithCatalog, updateDataSource, updateDataSourceWithCatalog, updateDataSourceWithTransactionIsolation, updateTablePropertys };
|