smartbi-toolkit 1.1.3 → 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 +39 -0
- package/dist/index.js +111 -0
- package/dist/service/AnalysisReportService.d.ts +97 -0
- package/dist/service/AnalysisReportService.js +138 -0
- package/dist/service/BusinessThemeService.d.ts +11 -0
- package/dist/service/BusinessThemeService.js +20 -0
- package/dist/service/BusinessViewService.d.ts +98 -0
- package/dist/service/BusinessViewService.js +146 -0
- package/dist/service/CatalogService.d.ts +192 -0
- package/dist/service/CatalogService.js +300 -0
- package/dist/service/ClientCombinedReportService.d.ts +67 -0
- package/dist/service/ClientCombinedReportService.js +96 -0
- package/dist/service/ClientInsightService.d.ts +87 -0
- package/dist/service/ClientInsightService.js +123 -0
- package/dist/service/ClientReportService.d.ts +166 -0
- package/dist/service/ClientReportService.js +244 -0
- package/dist/service/CombinedReportService.d.ts +11 -0
- package/dist/service/CombinedReportService.js +14 -0
- package/dist/service/DataSourceService.d.ts +182 -0
- 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/service/MetadataService.d.ts +41 -0
- package/dist/service/MetadataService.js +60 -0
- package/dist/service/OfficeReport.d.ts +53 -0
- package/dist/service/OfficeReport.js +74 -0
- package/dist/service/OfficeReportService.d.ts +40 -0
- 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/service/PortalService.d.ts +70 -0
- package/dist/service/PortalService.js +106 -0
- package/dist/service/Report.d.ts +182 -0
- 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/service/UserManagerService.d.ts +240 -0
- 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
|
@@ -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-DOYMZhxT.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 };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
//#region src/service/ScheduleTaskService.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* 执行计划任务
|
|
4
|
+
* @param scheduleId 计划ID
|
|
5
|
+
* @returns 返回执行结果的布尔值
|
|
6
|
+
*/
|
|
7
|
+
declare const executeSchedule: (scheduleId: string) => Promise<boolean>;
|
|
8
|
+
/**
|
|
9
|
+
* 执行任务
|
|
10
|
+
* @param taskId 任务ID
|
|
11
|
+
* @returns 返回执行结果的布尔值
|
|
12
|
+
*/
|
|
13
|
+
declare const executeTask: (taskId: string) => Promise<boolean>;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { executeSchedule, executeTask };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { smartbi } from "../index.js";
|
|
2
|
+
|
|
3
|
+
//#region src/service/ScheduleTaskService.ts
|
|
4
|
+
/**
|
|
5
|
+
* 执行计划任务
|
|
6
|
+
* @param scheduleId 计划ID
|
|
7
|
+
* @returns 返回执行结果的布尔值
|
|
8
|
+
*/
|
|
9
|
+
const executeSchedule = (scheduleId) => {
|
|
10
|
+
return smartbi("ScheduleTaskService", "executeSchedule", [scheduleId]);
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* 执行任务
|
|
14
|
+
* @param taskId 任务ID
|
|
15
|
+
* @returns 返回执行结果的布尔值
|
|
16
|
+
*/
|
|
17
|
+
const executeTask = (taskId) => {
|
|
18
|
+
return smartbi("ScheduleTaskService", "executeTask", [taskId]);
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
//#endregion
|
|
22
|
+
export { executeSchedule, executeTask };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
//#region src/service/SimpleReportService.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* 创建并打开一个报表
|
|
4
|
+
* @param reportId 报表ID
|
|
5
|
+
* @returns 返回打开的报表对象
|
|
6
|
+
*/
|
|
7
|
+
declare const openReport: (reportId: string) => Promise<any>;
|
|
8
|
+
/**
|
|
9
|
+
* 打开一个报表不初始化数据库链接
|
|
10
|
+
* @param reportId 报表ID
|
|
11
|
+
* @returns 返回打开的报表对象
|
|
12
|
+
*/
|
|
13
|
+
declare const openReportWithoutInit: (reportId: string) => Promise<any>;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { openReport, openReportWithoutInit };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { smartbi } from "../index.js";
|
|
2
|
+
|
|
3
|
+
//#region src/service/SimpleReportService.ts
|
|
4
|
+
/**
|
|
5
|
+
* 创建并打开一个报表
|
|
6
|
+
* @param reportId 报表ID
|
|
7
|
+
* @returns 返回打开的报表对象
|
|
8
|
+
*/
|
|
9
|
+
const openReport = (reportId) => {
|
|
10
|
+
return smartbi("SimpleReportService", "openReport", [reportId]);
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* 打开一个报表不初始化数据库链接
|
|
14
|
+
* @param reportId 报表ID
|
|
15
|
+
* @returns 返回打开的报表对象
|
|
16
|
+
*/
|
|
17
|
+
const openReportWithoutInit = (reportId) => {
|
|
18
|
+
return smartbi("SimpleReportService", "openReportWithoutInit", [reportId]);
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
//#endregion
|
|
22
|
+
export { openReport, openReportWithoutInit };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { D as NameValuePair } from "../types-DOYMZhxT.js";
|
|
2
|
+
|
|
3
|
+
//#region src/service/SpreadSheetReportService.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* 打开电子表格报表
|
|
6
|
+
* @param reportId 报表ID
|
|
7
|
+
* @returns 返回客户端ID
|
|
8
|
+
*/
|
|
9
|
+
declare const openSpreadSheetReportQuery: (reportId: string) => Promise<any>;
|
|
10
|
+
/**
|
|
11
|
+
* 关闭电子表格报表
|
|
12
|
+
* @param clientId 客户端ID
|
|
13
|
+
* @returns 无返回值
|
|
14
|
+
*/
|
|
15
|
+
declare const closeSpreadSheetReportQuery: (clientId: string) => Promise<void>;
|
|
16
|
+
/**
|
|
17
|
+
* 根据参数ID获取参数默认值
|
|
18
|
+
* @param panelId 参数面板ID
|
|
19
|
+
* @param paramId 参数ID
|
|
20
|
+
* @returns 返回参数默认值
|
|
21
|
+
*/
|
|
22
|
+
declare const getSpreadSheetReportParamDefaultValueByPID: (panelId: string, paramId: string) => Promise<any[]>;
|
|
23
|
+
/**
|
|
24
|
+
* 获取参数备选值
|
|
25
|
+
* @param panelId 参数面板ID
|
|
26
|
+
* @param paramId 参数ID
|
|
27
|
+
* @returns 返回参数标准值
|
|
28
|
+
*/
|
|
29
|
+
declare const getSpreadSheetReportParamStandbyValue: (panelId: string, paramId: string) => Promise<NameValuePair[]>;
|
|
30
|
+
/**
|
|
31
|
+
* 获取报表层面的参数默认值
|
|
32
|
+
* @param contextId 报表上下文会话id
|
|
33
|
+
* @param paramId 参数id
|
|
34
|
+
* @returns 返回报表参数默认值
|
|
35
|
+
*/
|
|
36
|
+
declare const getSpreadSheetReportParamDefaultValueByContext: (contextId: string, paramId: string) => Promise<any[]>;
|
|
37
|
+
/**
|
|
38
|
+
* 设置参数值
|
|
39
|
+
* @param panelId 参数面板ID
|
|
40
|
+
* @param paramId 参数ID
|
|
41
|
+
* @param value 值
|
|
42
|
+
* @param displayValue 显示值
|
|
43
|
+
* @returns 返回是否设置成功的布尔值
|
|
44
|
+
*/
|
|
45
|
+
declare const setSpreadSheetReportParamValue: (panelId: string, paramId: string, value: string, displayValue: string) => Promise<boolean>;
|
|
46
|
+
//#endregion
|
|
47
|
+
export { closeSpreadSheetReportQuery, getSpreadSheetReportParamDefaultValueByContext, getSpreadSheetReportParamDefaultValueByPID, getSpreadSheetReportParamStandbyValue, openSpreadSheetReportQuery, setSpreadSheetReportParamValue };
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { smartbi } from "../index.js";
|
|
2
|
+
|
|
3
|
+
//#region src/service/SpreadSheetReportService.ts
|
|
4
|
+
/**
|
|
5
|
+
* 打开电子表格报表
|
|
6
|
+
* @param reportId 报表ID
|
|
7
|
+
* @returns 返回客户端ID
|
|
8
|
+
*/
|
|
9
|
+
const openSpreadSheetReportQuery = (reportId) => {
|
|
10
|
+
return smartbi("SpreadSheetReportService", "openQuery", [reportId]);
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* 关闭电子表格报表
|
|
14
|
+
* @param clientId 客户端ID
|
|
15
|
+
* @returns 无返回值
|
|
16
|
+
*/
|
|
17
|
+
const closeSpreadSheetReportQuery = (clientId) => {
|
|
18
|
+
return smartbi("SpreadSheetReportService", "closeQuery", [clientId]);
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* 根据参数ID获取参数默认值
|
|
22
|
+
* @param panelId 参数面板ID
|
|
23
|
+
* @param paramId 参数ID
|
|
24
|
+
* @returns 返回参数默认值
|
|
25
|
+
*/
|
|
26
|
+
const getSpreadSheetReportParamDefaultValueByPID = (panelId, paramId) => {
|
|
27
|
+
return smartbi("SpreadSheetReportService", "getParamDefaultValueByPID", [panelId, paramId]);
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* 获取参数备选值
|
|
31
|
+
* @param panelId 参数面板ID
|
|
32
|
+
* @param paramId 参数ID
|
|
33
|
+
* @returns 返回参数标准值
|
|
34
|
+
*/
|
|
35
|
+
const getSpreadSheetReportParamStandbyValue = (panelId, paramId) => {
|
|
36
|
+
return smartbi("SpreadSheetReportService", "getParamStandbyValue", [panelId, paramId]);
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* 获取报表层面的参数默认值
|
|
40
|
+
* @param contextId 报表上下文会话id
|
|
41
|
+
* @param paramId 参数id
|
|
42
|
+
* @returns 返回报表参数默认值
|
|
43
|
+
*/
|
|
44
|
+
const getSpreadSheetReportParamDefaultValueByContext = (contextId, paramId) => {
|
|
45
|
+
return smartbi("SpreadSheetReportService", "getReportParamDefaultValueByPID", [contextId, paramId]);
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* 设置参数值
|
|
49
|
+
* @param panelId 参数面板ID
|
|
50
|
+
* @param paramId 参数ID
|
|
51
|
+
* @param value 值
|
|
52
|
+
* @param displayValue 显示值
|
|
53
|
+
* @returns 返回是否设置成功的布尔值
|
|
54
|
+
*/
|
|
55
|
+
const setSpreadSheetReportParamValue = (panelId, paramId, value, displayValue) => {
|
|
56
|
+
return smartbi("SpreadSheetReportService", "setParamValue", [
|
|
57
|
+
panelId,
|
|
58
|
+
paramId,
|
|
59
|
+
value,
|
|
60
|
+
displayValue
|
|
61
|
+
]);
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
//#endregion
|
|
65
|
+
export { closeSpreadSheetReportQuery, getSpreadSheetReportParamDefaultValueByContext, getSpreadSheetReportParamDefaultValueByPID, getSpreadSheetReportParamStandbyValue, openSpreadSheetReportQuery, setSpreadSheetReportParamValue };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { U as SystemConfig } from "../types-DOYMZhxT.js";
|
|
2
|
+
|
|
3
|
+
//#region src/service/SystemConfigService.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* 获取系统设置
|
|
6
|
+
* @returns 返回系统设置对象列表
|
|
7
|
+
*/
|
|
8
|
+
declare const getSystemConfigs: () => Promise<SystemConfig[]>;
|
|
9
|
+
/**
|
|
10
|
+
* 根据键获取系统配置
|
|
11
|
+
* @param key 配置键
|
|
12
|
+
* @returns 返回系统配置对象
|
|
13
|
+
*/
|
|
14
|
+
declare const getSystemConfig: (key: string) => Promise<SystemConfig>;
|
|
15
|
+
/**
|
|
16
|
+
* 清空缓存
|
|
17
|
+
* @returns 无返回值
|
|
18
|
+
*/
|
|
19
|
+
declare const clearSystemConfigCache: () => Promise<void>;
|
|
20
|
+
//#endregion
|
|
21
|
+
export { clearSystemConfigCache, getSystemConfig, getSystemConfigs };
|