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,60 +1,62 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { B as RunningInfo, F as ReportData, I as ReportExportType, u as CustomFilterDataBean } from "../types-C2_iES_3.js";
|
|
2
|
+
|
|
3
|
+
//#region src/service/Report.d.ts
|
|
2
4
|
/**
|
|
3
5
|
* 取得当前报表名
|
|
4
6
|
* @returns 当前报表名
|
|
5
7
|
*/
|
|
6
|
-
|
|
8
|
+
declare const getCurrentReportName: () => Promise<string>;
|
|
7
9
|
/**
|
|
8
10
|
* 取得每页行数
|
|
9
11
|
* @returns 每页行数
|
|
10
12
|
*/
|
|
11
|
-
|
|
13
|
+
declare const getRowsPerPage: () => Promise<number>;
|
|
12
14
|
/**
|
|
13
15
|
* 取得报表的参数信息
|
|
14
16
|
* @returns 参数列表
|
|
15
17
|
*/
|
|
16
|
-
|
|
18
|
+
declare const getReportParameters: () => Promise<any[]>;
|
|
17
19
|
/**
|
|
18
20
|
* 取得报表的字段信息
|
|
19
21
|
* @returns 字段列表
|
|
20
22
|
*/
|
|
21
|
-
|
|
23
|
+
declare const getReportFields: () => Promise<any[]>;
|
|
22
24
|
/**
|
|
23
25
|
* 打开一个报表
|
|
24
26
|
* @param reportId 报表ID
|
|
25
27
|
* @returns 无返回值
|
|
26
28
|
*/
|
|
27
|
-
|
|
29
|
+
declare const openReport: (reportId: string) => Promise<void>;
|
|
28
30
|
/**
|
|
29
31
|
* 打开一个报表(不初始化)
|
|
30
32
|
* @param reportId 报表ID
|
|
31
33
|
* @returns 无返回值
|
|
32
34
|
*/
|
|
33
|
-
|
|
35
|
+
declare const openReportWithoutInit: (reportId: string) => Promise<void>;
|
|
34
36
|
/**
|
|
35
37
|
* 执行报表
|
|
36
38
|
* @param rowsPerPage 指定每页行数
|
|
37
39
|
* @returns 报表总行数
|
|
38
40
|
*/
|
|
39
|
-
|
|
41
|
+
declare const executeReport: (rowsPerPage: number) => Promise<number>;
|
|
40
42
|
/**
|
|
41
43
|
* 取得报表的指定页
|
|
42
44
|
* @param pageIndex 页码
|
|
43
45
|
* @returns 报表数据
|
|
44
46
|
*/
|
|
45
|
-
|
|
47
|
+
declare const getPage: (pageIndex: number) => Promise<ReportData>;
|
|
46
48
|
/**
|
|
47
49
|
* 关闭报表
|
|
48
50
|
* @returns 无返回值
|
|
49
51
|
*/
|
|
50
|
-
|
|
52
|
+
declare const closeReport: () => Promise<void>;
|
|
51
53
|
/**
|
|
52
54
|
* 设置参数值(仅值)
|
|
53
55
|
* @param paramId 参数ID
|
|
54
56
|
* @param paramValue 参数值
|
|
55
57
|
* @returns 无返回值
|
|
56
58
|
*/
|
|
57
|
-
|
|
59
|
+
declare const setReportParamValueOnly: (paramId: string, paramValue: string) => Promise<void>;
|
|
58
60
|
/**
|
|
59
61
|
* 设置参数值
|
|
60
62
|
* @param paramId 参数ID
|
|
@@ -62,7 +64,7 @@ export declare const setReportParamValueOnly: (paramId: string, paramValue: stri
|
|
|
62
64
|
* @param displayValue 参数显示值
|
|
63
65
|
* @returns 无返回值
|
|
64
66
|
*/
|
|
65
|
-
|
|
67
|
+
declare const setReportParamValue: (paramId: string, paramValue: string, displayValue: string) => Promise<void>;
|
|
66
68
|
/**
|
|
67
69
|
* 导出报表(基础版)
|
|
68
70
|
* @param type 指定导出类型 EXCEL, TXT, CSV
|
|
@@ -71,7 +73,7 @@ export declare const setReportParamValue: (paramId: string, paramValue: string,
|
|
|
71
73
|
* @param os 指定报表输出流
|
|
72
74
|
* @returns 无返回值
|
|
73
75
|
*/
|
|
74
|
-
|
|
76
|
+
declare const doExport: (type: ReportExportType | string, delimiter: string, maxRow: string, os: any) => Promise<void>;
|
|
75
77
|
/**
|
|
76
78
|
* 导出报表(带资源路径)
|
|
77
79
|
* @param type 指定导出类型 EXCEL, TXT, CSV
|
|
@@ -81,7 +83,7 @@ export declare const doExport: (type: ReportExportType | string, delimiter: stri
|
|
|
81
83
|
* @param resourceBasePath 资源基础路径
|
|
82
84
|
* @returns 无返回值
|
|
83
85
|
*/
|
|
84
|
-
|
|
86
|
+
declare const doExportWithResourcePath: (type: ReportExportType | string, delimiter: string, maxRow: string, os: any, resourceBasePath: string) => Promise<void>;
|
|
85
87
|
/**
|
|
86
88
|
* 导出报表(带值类型)
|
|
87
89
|
* @param type 指定导出类型 EXCEL, TXT, CSV
|
|
@@ -92,7 +94,7 @@ export declare const doExportWithResourcePath: (type: ReportExportType | string,
|
|
|
92
94
|
* @param valueType 值类型
|
|
93
95
|
* @returns 无返回值
|
|
94
96
|
*/
|
|
95
|
-
|
|
97
|
+
declare const doExportWithValueType: (type: ReportExportType | string, delimiter: string, maxRow: string, os: any, resourceBasePath: string, valueType: string) => Promise<void>;
|
|
96
98
|
/**
|
|
97
99
|
* 导出报表(完整版)
|
|
98
100
|
* @param type 指定导出类型 EXCEL, TXT, CSV
|
|
@@ -104,21 +106,21 @@ export declare const doExportWithValueType: (type: ReportExportType | string, de
|
|
|
104
106
|
* @param postData 数据
|
|
105
107
|
* @returns 无返回值
|
|
106
108
|
*/
|
|
107
|
-
|
|
109
|
+
declare const doExportFull: (type: ReportExportType | string, delimiter: string, maxRow: string, os: any, resourceBasePath: string, valueType: string, postData: string) => Promise<void>;
|
|
108
110
|
/**
|
|
109
111
|
* 指定某个字段的排序方式
|
|
110
112
|
* @param fieldId 字段ID
|
|
111
113
|
* @param orderType 排序方式 ASC, DESC, NONE
|
|
112
114
|
* @returns 无返回值
|
|
113
115
|
*/
|
|
114
|
-
|
|
116
|
+
declare const setReportOrderByType: (fieldId: string, orderType: string) => Promise<void>;
|
|
115
117
|
/**
|
|
116
118
|
* 指定某个字段的聚合方式
|
|
117
119
|
* @param fieldId 字段ID
|
|
118
120
|
* @param aggregate 聚合方式
|
|
119
121
|
* @returns 无返回值
|
|
120
122
|
*/
|
|
121
|
-
|
|
123
|
+
declare const setReportFieldAggregate: (fieldId: string, aggregate: string) => Promise<void>;
|
|
122
124
|
/**
|
|
123
125
|
* 指定报表过滤条件
|
|
124
126
|
* @param fieldId 字段ID
|
|
@@ -126,35 +128,35 @@ export declare const setReportFieldAggregate: (fieldId: string, aggregate: strin
|
|
|
126
128
|
* @param value 值
|
|
127
129
|
* @returns 无返回值
|
|
128
130
|
*/
|
|
129
|
-
|
|
131
|
+
declare const setReportAutoCondition: (fieldId: string, operator: string, value: string) => Promise<void>;
|
|
130
132
|
/**
|
|
131
133
|
* 设置自定义过滤条件
|
|
132
134
|
* @param filterData 过滤条件数据
|
|
133
135
|
* @returns 是否设置成功
|
|
134
136
|
*/
|
|
135
|
-
|
|
137
|
+
declare const setReportCustomCondition: (filterData: CustomFilterDataBean) => Promise<boolean>;
|
|
136
138
|
/**
|
|
137
139
|
* 读取报表数据
|
|
138
140
|
* @param reportId 报表ID
|
|
139
141
|
* @returns 无返回值
|
|
140
142
|
*/
|
|
141
|
-
|
|
143
|
+
declare const dumpReport: (reportId: string) => Promise<void>;
|
|
142
144
|
/**
|
|
143
145
|
* 修改报表
|
|
144
146
|
* @returns 无返回值
|
|
145
147
|
*/
|
|
146
|
-
|
|
148
|
+
declare const updateReportQuery: () => Promise<void>;
|
|
147
149
|
/**
|
|
148
150
|
* 获得某个参数的候选值列表
|
|
149
151
|
* @param paramId 参数ID
|
|
150
152
|
* @returns 参数的候选值列表
|
|
151
153
|
*/
|
|
152
|
-
|
|
154
|
+
declare const getReportParamStandbyValue: (paramId: string) => Promise<any[]>;
|
|
153
155
|
/**
|
|
154
156
|
* 获取执行状态
|
|
155
157
|
* @returns 执行状态
|
|
156
158
|
*/
|
|
157
|
-
|
|
159
|
+
declare const getReportExecutingState: () => Promise<RunningInfo>;
|
|
158
160
|
/**
|
|
159
161
|
* 把报表查询结果复制在另一张新的报表中
|
|
160
162
|
* @param reportId 报表ID
|
|
@@ -164,15 +166,17 @@ export declare const getReportExecutingState: () => Promise<RunningInfo>;
|
|
|
164
166
|
* @param desc 描述
|
|
165
167
|
* @returns 新的报表ID
|
|
166
168
|
*/
|
|
167
|
-
|
|
169
|
+
declare const cloneReportQuery: (reportId: string, parentNodeId: string, name: string, alias: string, desc: string) => Promise<string>;
|
|
168
170
|
/**
|
|
169
171
|
* 获取客户端配置
|
|
170
172
|
* @returns 客户端配置
|
|
171
173
|
*/
|
|
172
|
-
|
|
174
|
+
declare const getReportClientConfig: () => Promise<string>;
|
|
173
175
|
/**
|
|
174
176
|
* 设置客户端配置
|
|
175
177
|
* @param clientConfig 客户端配置
|
|
176
178
|
* @returns 无返回值
|
|
177
179
|
*/
|
|
178
|
-
|
|
180
|
+
declare const setReportClientConfig: (clientConfig: string) => Promise<void>;
|
|
181
|
+
//#endregion
|
|
182
|
+
export { cloneReportQuery, closeReport, doExport, doExportFull, doExportWithResourcePath, doExportWithValueType, dumpReport, executeReport, getCurrentReportName, getPage, getReportClientConfig, getReportExecutingState, getReportFields, getReportParamStandbyValue, getReportParameters, getRowsPerPage, openReport, openReportWithoutInit, setReportAutoCondition, setReportClientConfig, setReportCustomCondition, setReportFieldAggregate, setReportOrderByType, setReportParamValue, setReportParamValueOnly, updateReportQuery };
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
import { smartbi } from "../index.js";
|
|
2
|
+
|
|
3
|
+
//#region src/service/Report.ts
|
|
4
|
+
/**
|
|
5
|
+
* 取得当前报表名
|
|
6
|
+
* @returns 当前报表名
|
|
7
|
+
*/
|
|
8
|
+
const getCurrentReportName = () => {
|
|
9
|
+
return smartbi("Report", "getCurrentReportName", []);
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* 取得每页行数
|
|
13
|
+
* @returns 每页行数
|
|
14
|
+
*/
|
|
15
|
+
const getRowsPerPage = () => {
|
|
16
|
+
return smartbi("Report", "getRowsPerPage", []);
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* 取得报表的参数信息
|
|
20
|
+
* @returns 参数列表
|
|
21
|
+
*/
|
|
22
|
+
const getReportParameters = () => {
|
|
23
|
+
return smartbi("Report", "getParameters", []);
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* 取得报表的字段信息
|
|
27
|
+
* @returns 字段列表
|
|
28
|
+
*/
|
|
29
|
+
const getReportFields = () => {
|
|
30
|
+
return smartbi("Report", "getFields", []);
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* 打开一个报表
|
|
34
|
+
* @param reportId 报表ID
|
|
35
|
+
* @returns 无返回值
|
|
36
|
+
*/
|
|
37
|
+
const openReport = (reportId) => {
|
|
38
|
+
return smartbi("Report", "open", [reportId]);
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* 打开一个报表(不初始化)
|
|
42
|
+
* @param reportId 报表ID
|
|
43
|
+
* @returns 无返回值
|
|
44
|
+
*/
|
|
45
|
+
const openReportWithoutInit = (reportId) => {
|
|
46
|
+
return smartbi("Report", "openWithoutInit", [reportId]);
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* 执行报表
|
|
50
|
+
* @param rowsPerPage 指定每页行数
|
|
51
|
+
* @returns 报表总行数
|
|
52
|
+
*/
|
|
53
|
+
const executeReport = (rowsPerPage) => {
|
|
54
|
+
return smartbi("Report", "execute", [rowsPerPage]);
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* 取得报表的指定页
|
|
58
|
+
* @param pageIndex 页码
|
|
59
|
+
* @returns 报表数据
|
|
60
|
+
*/
|
|
61
|
+
const getPage = (pageIndex) => {
|
|
62
|
+
return smartbi("Report", "getPage", [pageIndex]);
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* 关闭报表
|
|
66
|
+
* @returns 无返回值
|
|
67
|
+
*/
|
|
68
|
+
const closeReport = () => {
|
|
69
|
+
return smartbi("Report", "close", []);
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* 设置参数值(仅值)
|
|
73
|
+
* @param paramId 参数ID
|
|
74
|
+
* @param paramValue 参数值
|
|
75
|
+
* @returns 无返回值
|
|
76
|
+
*/
|
|
77
|
+
const setReportParamValueOnly = (paramId, paramValue) => {
|
|
78
|
+
return smartbi("Report", "setParamValue", [paramId, paramValue]);
|
|
79
|
+
};
|
|
80
|
+
/**
|
|
81
|
+
* 设置参数值
|
|
82
|
+
* @param paramId 参数ID
|
|
83
|
+
* @param paramValue 参数值
|
|
84
|
+
* @param displayValue 参数显示值
|
|
85
|
+
* @returns 无返回值
|
|
86
|
+
*/
|
|
87
|
+
const setReportParamValue = (paramId, paramValue, displayValue) => {
|
|
88
|
+
return smartbi("Report", "setParamValue", [
|
|
89
|
+
paramId,
|
|
90
|
+
paramValue,
|
|
91
|
+
displayValue
|
|
92
|
+
]);
|
|
93
|
+
};
|
|
94
|
+
/**
|
|
95
|
+
* 导出报表(基础版)
|
|
96
|
+
* @param type 指定导出类型 EXCEL, TXT, CSV
|
|
97
|
+
* @param delimiter 指定分割符(EXCEL类型不需要)
|
|
98
|
+
* @param maxRow 指定最大行数
|
|
99
|
+
* @param os 指定报表输出流
|
|
100
|
+
* @returns 无返回值
|
|
101
|
+
*/
|
|
102
|
+
const doExport = (type, delimiter, maxRow, os) => {
|
|
103
|
+
return smartbi("Report", "doExport", [
|
|
104
|
+
type,
|
|
105
|
+
delimiter,
|
|
106
|
+
maxRow,
|
|
107
|
+
os
|
|
108
|
+
]);
|
|
109
|
+
};
|
|
110
|
+
/**
|
|
111
|
+
* 导出报表(带资源路径)
|
|
112
|
+
* @param type 指定导出类型 EXCEL, TXT, CSV
|
|
113
|
+
* @param delimiter 指定分割符(EXCEL类型不需要)
|
|
114
|
+
* @param maxRow 指定最大行数
|
|
115
|
+
* @param os 指定报表输出流
|
|
116
|
+
* @param resourceBasePath 资源基础路径
|
|
117
|
+
* @returns 无返回值
|
|
118
|
+
*/
|
|
119
|
+
const doExportWithResourcePath = (type, delimiter, maxRow, os, resourceBasePath) => {
|
|
120
|
+
return smartbi("Report", "doExport", [
|
|
121
|
+
type,
|
|
122
|
+
delimiter,
|
|
123
|
+
maxRow,
|
|
124
|
+
os,
|
|
125
|
+
resourceBasePath
|
|
126
|
+
]);
|
|
127
|
+
};
|
|
128
|
+
/**
|
|
129
|
+
* 导出报表(带值类型)
|
|
130
|
+
* @param type 指定导出类型 EXCEL, TXT, CSV
|
|
131
|
+
* @param delimiter 指定分割符(EXCEL类型不需要)
|
|
132
|
+
* @param maxRow 指定最大行数
|
|
133
|
+
* @param os 指定报表输出流
|
|
134
|
+
* @param resourceBasePath 资源基础路径
|
|
135
|
+
* @param valueType 值类型
|
|
136
|
+
* @returns 无返回值
|
|
137
|
+
*/
|
|
138
|
+
const doExportWithValueType = (type, delimiter, maxRow, os, resourceBasePath, valueType) => {
|
|
139
|
+
return smartbi("Report", "doExport", [
|
|
140
|
+
type,
|
|
141
|
+
delimiter,
|
|
142
|
+
maxRow,
|
|
143
|
+
os,
|
|
144
|
+
resourceBasePath,
|
|
145
|
+
valueType
|
|
146
|
+
]);
|
|
147
|
+
};
|
|
148
|
+
/**
|
|
149
|
+
* 导出报表(完整版)
|
|
150
|
+
* @param type 指定导出类型 EXCEL, TXT, CSV
|
|
151
|
+
* @param delimiter 指定分割符(EXCEL类型不需要)
|
|
152
|
+
* @param maxRow 指定最大行数
|
|
153
|
+
* @param os 指定报表输出流
|
|
154
|
+
* @param resourceBasePath 资源基础路径
|
|
155
|
+
* @param valueType 值类型
|
|
156
|
+
* @param postData 数据
|
|
157
|
+
* @returns 无返回值
|
|
158
|
+
*/
|
|
159
|
+
const doExportFull = (type, delimiter, maxRow, os, resourceBasePath, valueType, postData) => {
|
|
160
|
+
return smartbi("Report", "doExport", [
|
|
161
|
+
type,
|
|
162
|
+
delimiter,
|
|
163
|
+
maxRow,
|
|
164
|
+
os,
|
|
165
|
+
resourceBasePath,
|
|
166
|
+
valueType,
|
|
167
|
+
postData
|
|
168
|
+
]);
|
|
169
|
+
};
|
|
170
|
+
/**
|
|
171
|
+
* 指定某个字段的排序方式
|
|
172
|
+
* @param fieldId 字段ID
|
|
173
|
+
* @param orderType 排序方式 ASC, DESC, NONE
|
|
174
|
+
* @returns 无返回值
|
|
175
|
+
*/
|
|
176
|
+
const setReportOrderByType = (fieldId, orderType) => {
|
|
177
|
+
return smartbi("Report", "setOrderByType", [fieldId, orderType]);
|
|
178
|
+
};
|
|
179
|
+
/**
|
|
180
|
+
* 指定某个字段的聚合方式
|
|
181
|
+
* @param fieldId 字段ID
|
|
182
|
+
* @param aggregate 聚合方式
|
|
183
|
+
* @returns 无返回值
|
|
184
|
+
*/
|
|
185
|
+
const setReportFieldAggregate = (fieldId, aggregate) => {
|
|
186
|
+
return smartbi("Report", "setFieldAggregate", [fieldId, aggregate]);
|
|
187
|
+
};
|
|
188
|
+
/**
|
|
189
|
+
* 指定报表过滤条件
|
|
190
|
+
* @param fieldId 字段ID
|
|
191
|
+
* @param operator 操作符
|
|
192
|
+
* @param value 值
|
|
193
|
+
* @returns 无返回值
|
|
194
|
+
*/
|
|
195
|
+
const setReportAutoCondition = (fieldId, operator, value) => {
|
|
196
|
+
return smartbi("Report", "setAutoCondition", [
|
|
197
|
+
fieldId,
|
|
198
|
+
operator,
|
|
199
|
+
value
|
|
200
|
+
]);
|
|
201
|
+
};
|
|
202
|
+
/**
|
|
203
|
+
* 设置自定义过滤条件
|
|
204
|
+
* @param filterData 过滤条件数据
|
|
205
|
+
* @returns 是否设置成功
|
|
206
|
+
*/
|
|
207
|
+
const setReportCustomCondition = (filterData) => {
|
|
208
|
+
return smartbi("Report", "setCustomCondition", [filterData.toString()]);
|
|
209
|
+
};
|
|
210
|
+
/**
|
|
211
|
+
* 读取报表数据
|
|
212
|
+
* @param reportId 报表ID
|
|
213
|
+
* @returns 无返回值
|
|
214
|
+
*/
|
|
215
|
+
const dumpReport = (reportId) => {
|
|
216
|
+
return smartbi("Report", "dump", [reportId]);
|
|
217
|
+
};
|
|
218
|
+
/**
|
|
219
|
+
* 修改报表
|
|
220
|
+
* @returns 无返回值
|
|
221
|
+
*/
|
|
222
|
+
const updateReportQuery = () => {
|
|
223
|
+
return smartbi("Report", "updateQuery", []);
|
|
224
|
+
};
|
|
225
|
+
/**
|
|
226
|
+
* 获得某个参数的候选值列表
|
|
227
|
+
* @param paramId 参数ID
|
|
228
|
+
* @returns 参数的候选值列表
|
|
229
|
+
*/
|
|
230
|
+
const getReportParamStandbyValue = (paramId) => {
|
|
231
|
+
return smartbi("Report", "getParamStandbyValue", [paramId]);
|
|
232
|
+
};
|
|
233
|
+
/**
|
|
234
|
+
* 获取执行状态
|
|
235
|
+
* @returns 执行状态
|
|
236
|
+
*/
|
|
237
|
+
const getReportExecutingState = () => {
|
|
238
|
+
return smartbi("Report", "getExecutingState", []);
|
|
239
|
+
};
|
|
240
|
+
/**
|
|
241
|
+
* 把报表查询结果复制在另一张新的报表中
|
|
242
|
+
* @param reportId 报表ID
|
|
243
|
+
* @param parentNodeId 父节点ID
|
|
244
|
+
* @param name 名称
|
|
245
|
+
* @param alias 别名
|
|
246
|
+
* @param desc 描述
|
|
247
|
+
* @returns 新的报表ID
|
|
248
|
+
*/
|
|
249
|
+
const cloneReportQuery = (reportId, parentNodeId, name, alias, desc) => {
|
|
250
|
+
return smartbi("Report", "cloneQuery", [
|
|
251
|
+
reportId,
|
|
252
|
+
parentNodeId,
|
|
253
|
+
name,
|
|
254
|
+
alias,
|
|
255
|
+
desc
|
|
256
|
+
]);
|
|
257
|
+
};
|
|
258
|
+
/**
|
|
259
|
+
* 获取客户端配置
|
|
260
|
+
* @returns 客户端配置
|
|
261
|
+
*/
|
|
262
|
+
const getReportClientConfig = () => {
|
|
263
|
+
return smartbi("Report", "getClientConfig", []);
|
|
264
|
+
};
|
|
265
|
+
/**
|
|
266
|
+
* 设置客户端配置
|
|
267
|
+
* @param clientConfig 客户端配置
|
|
268
|
+
* @returns 无返回值
|
|
269
|
+
*/
|
|
270
|
+
const setReportClientConfig = (clientConfig) => {
|
|
271
|
+
return smartbi("Report", "setClientConfig", [clientConfig]);
|
|
272
|
+
};
|
|
273
|
+
|
|
274
|
+
//#endregion
|
|
275
|
+
export { cloneReportQuery, closeReport, doExport, doExportFull, doExportWithResourcePath, doExportWithValueType, dumpReport, executeReport, getCurrentReportName, getPage, getReportClientConfig, getReportExecutingState, getReportFields, getReportParamStandbyValue, getReportParameters, getRowsPerPage, openReport, openReportWithoutInit, setReportAutoCondition, setReportClientConfig, setReportCustomCondition, setReportFieldAggregate, setReportOrderByType, setReportParamValue, setReportParamValueOnly, updateReportQuery };
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { B as RunningInfo, D as NameValuePair, H as SSReportExportType, j as Parameter } from "../types-C2_iES_3.js";
|
|
2
|
+
|
|
3
|
+
//#region src/service/SSReport.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* 打开电子表格报表
|
|
6
|
+
* @param id 报表ID
|
|
7
|
+
* @returns 无返回值
|
|
8
|
+
*/
|
|
9
|
+
declare const openSSReport: (id: string) => Promise<void>;
|
|
10
|
+
/**
|
|
11
|
+
* 关闭电子表格报表
|
|
12
|
+
* @returns 无返回值
|
|
13
|
+
*/
|
|
14
|
+
declare const closeSSReport: () => Promise<void>;
|
|
15
|
+
/**
|
|
16
|
+
* 获取参数列表
|
|
17
|
+
* @returns 返回参数列表
|
|
18
|
+
*/
|
|
19
|
+
declare const getSSReportParamList: () => Promise<Parameter[]>;
|
|
20
|
+
/**
|
|
21
|
+
* 根据参数ID获取参数备选值
|
|
22
|
+
* @param paramId 参数ID
|
|
23
|
+
* @returns 返回参数键值对
|
|
24
|
+
*/
|
|
25
|
+
declare const getSSReportParamStandbyValue: (paramId: string) => Promise<NameValuePair[]>;
|
|
26
|
+
/**
|
|
27
|
+
* 根据参数ID获取参数默认值
|
|
28
|
+
* @param pid 参数ID
|
|
29
|
+
* @returns 返回参数默认值
|
|
30
|
+
*/
|
|
31
|
+
declare const getSSReportParamDefaultValueByPID: (pid: string) => Promise<string>;
|
|
32
|
+
/**
|
|
33
|
+
* 导出电子表格(基础版)
|
|
34
|
+
* @param type 导出类型
|
|
35
|
+
* @param os 输出流
|
|
36
|
+
* @returns 无返回值
|
|
37
|
+
*/
|
|
38
|
+
declare const exportSSReport: (type: SSReportExportType | string, os: any) => Promise<void>;
|
|
39
|
+
/**
|
|
40
|
+
* 导出电子表格(带参数版)
|
|
41
|
+
* @param type 导出格式
|
|
42
|
+
* @param os 输出流
|
|
43
|
+
* @param postData 请求参数
|
|
44
|
+
* @returns 无返回值
|
|
45
|
+
*/
|
|
46
|
+
declare const exportSSReportWithPostData: (type: SSReportExportType | string, os: any, postData: string) => Promise<void>;
|
|
47
|
+
/**
|
|
48
|
+
* 设置参数值
|
|
49
|
+
* @param id 参数ID
|
|
50
|
+
* @param value 值
|
|
51
|
+
* @param displayValue 显示值
|
|
52
|
+
* @returns 无返回值
|
|
53
|
+
*/
|
|
54
|
+
declare const setSSReportParamValue: (id: string, value: string, displayValue: string) => Promise<void>;
|
|
55
|
+
/**
|
|
56
|
+
* 设置导出工作单的索引
|
|
57
|
+
* @param exportSheetIndexes 导出工作单的索引
|
|
58
|
+
* @returns 无返回值
|
|
59
|
+
*/
|
|
60
|
+
declare const setSSReportExportSheetIndexes: (exportSheetIndexes: string) => Promise<void>;
|
|
61
|
+
/**
|
|
62
|
+
* 设置是否导出公式
|
|
63
|
+
* @param exportFormula 是否导出公式
|
|
64
|
+
* @returns 无返回值
|
|
65
|
+
*/
|
|
66
|
+
declare const setSSReportExportFormula: (exportFormula: boolean) => Promise<void>;
|
|
67
|
+
/**
|
|
68
|
+
* 获取执行状态
|
|
69
|
+
* @returns 返回执行状态
|
|
70
|
+
*/
|
|
71
|
+
declare const getSSReportExecutingState: () => Promise<RunningInfo>;
|
|
72
|
+
/**
|
|
73
|
+
* 获取操作
|
|
74
|
+
* @returns 返回操作
|
|
75
|
+
*/
|
|
76
|
+
declare const getSSReportOperation: () => Promise<string>;
|
|
77
|
+
/**
|
|
78
|
+
* 设置操作
|
|
79
|
+
* @param operation 操作
|
|
80
|
+
* @returns 无返回值
|
|
81
|
+
*/
|
|
82
|
+
declare const setSSReportOperation: (operation: string) => Promise<void>;
|
|
83
|
+
/**
|
|
84
|
+
* 设置筛选条件
|
|
85
|
+
* @param filtersRule 筛选条件json
|
|
86
|
+
* @returns 无返回值
|
|
87
|
+
*/
|
|
88
|
+
declare const setSSReportFiltersRule: (filtersRule: string) => Promise<void>;
|
|
89
|
+
//#endregion
|
|
90
|
+
export { closeSSReport, exportSSReport, exportSSReportWithPostData, getSSReportExecutingState, getSSReportOperation, getSSReportParamDefaultValueByPID, getSSReportParamList, getSSReportParamStandbyValue, openSSReport, setSSReportExportFormula, setSSReportExportSheetIndexes, setSSReportFiltersRule, setSSReportOperation, setSSReportParamValue };
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { smartbi } from "../index.js";
|
|
2
|
+
|
|
3
|
+
//#region src/service/SSReport.ts
|
|
4
|
+
/**
|
|
5
|
+
* 打开电子表格报表
|
|
6
|
+
* @param id 报表ID
|
|
7
|
+
* @returns 无返回值
|
|
8
|
+
*/
|
|
9
|
+
const openSSReport = (id) => {
|
|
10
|
+
return smartbi("SSReport", "open", [id]);
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* 关闭电子表格报表
|
|
14
|
+
* @returns 无返回值
|
|
15
|
+
*/
|
|
16
|
+
const closeSSReport = () => {
|
|
17
|
+
return smartbi("SSReport", "close", []);
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* 获取参数列表
|
|
21
|
+
* @returns 返回参数列表
|
|
22
|
+
*/
|
|
23
|
+
const getSSReportParamList = () => {
|
|
24
|
+
return smartbi("SSReport", "getParamList", []);
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* 根据参数ID获取参数备选值
|
|
28
|
+
* @param paramId 参数ID
|
|
29
|
+
* @returns 返回参数键值对
|
|
30
|
+
*/
|
|
31
|
+
const getSSReportParamStandbyValue = (paramId) => {
|
|
32
|
+
return smartbi("SSReport", "getParamStandbyValue", [paramId]);
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* 根据参数ID获取参数默认值
|
|
36
|
+
* @param pid 参数ID
|
|
37
|
+
* @returns 返回参数默认值
|
|
38
|
+
*/
|
|
39
|
+
const getSSReportParamDefaultValueByPID = (pid) => {
|
|
40
|
+
return smartbi("SSReport", "getParamDefaultValueByPID", [pid]);
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* 导出电子表格(基础版)
|
|
44
|
+
* @param type 导出类型
|
|
45
|
+
* @param os 输出流
|
|
46
|
+
* @returns 无返回值
|
|
47
|
+
*/
|
|
48
|
+
const exportSSReport = (type, os) => {
|
|
49
|
+
return smartbi("SSReport", "doExport", [type, os]);
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* 导出电子表格(带参数版)
|
|
53
|
+
* @param type 导出格式
|
|
54
|
+
* @param os 输出流
|
|
55
|
+
* @param postData 请求参数
|
|
56
|
+
* @returns 无返回值
|
|
57
|
+
*/
|
|
58
|
+
const exportSSReportWithPostData = (type, os, postData) => {
|
|
59
|
+
return smartbi("SSReport", "doExport", [
|
|
60
|
+
type,
|
|
61
|
+
os,
|
|
62
|
+
postData
|
|
63
|
+
]);
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* 设置参数值
|
|
67
|
+
* @param id 参数ID
|
|
68
|
+
* @param value 值
|
|
69
|
+
* @param displayValue 显示值
|
|
70
|
+
* @returns 无返回值
|
|
71
|
+
*/
|
|
72
|
+
const setSSReportParamValue = (id, value, displayValue) => {
|
|
73
|
+
return smartbi("SSReport", "setParamValue", [
|
|
74
|
+
id,
|
|
75
|
+
value,
|
|
76
|
+
displayValue
|
|
77
|
+
]);
|
|
78
|
+
};
|
|
79
|
+
/**
|
|
80
|
+
* 设置导出工作单的索引
|
|
81
|
+
* @param exportSheetIndexes 导出工作单的索引
|
|
82
|
+
* @returns 无返回值
|
|
83
|
+
*/
|
|
84
|
+
const setSSReportExportSheetIndexes = (exportSheetIndexes) => {
|
|
85
|
+
return smartbi("SSReport", "setExportSheetIndexes", [exportSheetIndexes]);
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* 设置是否导出公式
|
|
89
|
+
* @param exportFormula 是否导出公式
|
|
90
|
+
* @returns 无返回值
|
|
91
|
+
*/
|
|
92
|
+
const setSSReportExportFormula = (exportFormula) => {
|
|
93
|
+
return smartbi("SSReport", "setExportFormula", [exportFormula]);
|
|
94
|
+
};
|
|
95
|
+
/**
|
|
96
|
+
* 获取执行状态
|
|
97
|
+
* @returns 返回执行状态
|
|
98
|
+
*/
|
|
99
|
+
const getSSReportExecutingState = () => {
|
|
100
|
+
return smartbi("SSReport", "getExecutingState", []);
|
|
101
|
+
};
|
|
102
|
+
/**
|
|
103
|
+
* 获取操作
|
|
104
|
+
* @returns 返回操作
|
|
105
|
+
*/
|
|
106
|
+
const getSSReportOperation = () => {
|
|
107
|
+
return smartbi("SSReport", "getOperation", []);
|
|
108
|
+
};
|
|
109
|
+
/**
|
|
110
|
+
* 设置操作
|
|
111
|
+
* @param operation 操作
|
|
112
|
+
* @returns 无返回值
|
|
113
|
+
*/
|
|
114
|
+
const setSSReportOperation = (operation) => {
|
|
115
|
+
return smartbi("SSReport", "setOperation", [operation]);
|
|
116
|
+
};
|
|
117
|
+
/**
|
|
118
|
+
* 设置筛选条件
|
|
119
|
+
* @param filtersRule 筛选条件json
|
|
120
|
+
* @returns 无返回值
|
|
121
|
+
*/
|
|
122
|
+
const setSSReportFiltersRule = (filtersRule) => {
|
|
123
|
+
return smartbi("SSReport", "setFiltersRule", [filtersRule]);
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
//#endregion
|
|
127
|
+
export { closeSSReport, exportSSReport, exportSSReportWithPostData, getSSReportExecutingState, getSSReportOperation, getSSReportParamDefaultValueByPID, getSSReportParamList, getSSReportParamStandbyValue, openSSReport, setSSReportExportFormula, setSSReportExportSheetIndexes, setSSReportFiltersRule, setSSReportOperation, setSSReportParamValue };
|