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
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
import { smartbi } from "../index.js";
|
|
2
|
+
|
|
3
|
+
//#region src/service/DataSourceService.ts
|
|
4
|
+
/**
|
|
5
|
+
* 创建数据源
|
|
6
|
+
* @param name 数据源名称
|
|
7
|
+
* @param connectUserName 连接用户名
|
|
8
|
+
* @param connectPassword 连接密码
|
|
9
|
+
* @param maxConnection 最大连接数
|
|
10
|
+
* @param driverType 数据库类型
|
|
11
|
+
* @param driverClassName 驱动程序类名
|
|
12
|
+
* @param url 连接字符串
|
|
13
|
+
* @returns 返回数据源ID
|
|
14
|
+
*/
|
|
15
|
+
const createDataSource = (name, connectUserName, connectPassword, maxConnection, driverType, driverClassName, url) => {
|
|
16
|
+
return smartbi("DataSourceService", "createDataSource", [
|
|
17
|
+
name,
|
|
18
|
+
connectUserName,
|
|
19
|
+
connectPassword,
|
|
20
|
+
maxConnection,
|
|
21
|
+
driverType,
|
|
22
|
+
driverClassName,
|
|
23
|
+
url
|
|
24
|
+
]);
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* 创建数据源(带目录参数)
|
|
28
|
+
* @param name 数据源名称
|
|
29
|
+
* @param connectUserName 连接用户名
|
|
30
|
+
* @param connectPassword 连接密码
|
|
31
|
+
* @param maxConnection 最大连接数
|
|
32
|
+
* @param driverType 数据库类型
|
|
33
|
+
* @param driverClassName 驱动程序类名
|
|
34
|
+
* @param url 连接字符串
|
|
35
|
+
* @param driverCatalog 驱动目录
|
|
36
|
+
* @returns 返回数据源ID
|
|
37
|
+
*/
|
|
38
|
+
const createDataSourceWithCatalog = (name, connectUserName, connectPassword, maxConnection, driverType, driverClassName, url, driverCatalog) => {
|
|
39
|
+
return smartbi("DataSourceService", "createDataSource", [
|
|
40
|
+
name,
|
|
41
|
+
connectUserName,
|
|
42
|
+
connectPassword,
|
|
43
|
+
maxConnection,
|
|
44
|
+
driverType,
|
|
45
|
+
driverClassName,
|
|
46
|
+
url,
|
|
47
|
+
driverCatalog
|
|
48
|
+
]);
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* 创建数据源(带事务隔离级别)
|
|
52
|
+
* @param name 数据源名称
|
|
53
|
+
* @param connectUserName 连接用户名
|
|
54
|
+
* @param connectPassword 连接密码
|
|
55
|
+
* @param maxConnection 最大连接数
|
|
56
|
+
* @param driverType 数据库类型
|
|
57
|
+
* @param driverClassName 驱动程序类名
|
|
58
|
+
* @param url 连接字符串
|
|
59
|
+
* @param driverCatalog 驱动目录
|
|
60
|
+
* @param transactionIsolation 事务隔离级别
|
|
61
|
+
* @returns 返回数据源ID
|
|
62
|
+
*/
|
|
63
|
+
const createDataSourceWithTransactionIsolation = (name, connectUserName, connectPassword, maxConnection, driverType, driverClassName, url, driverCatalog, transactionIsolation) => {
|
|
64
|
+
return smartbi("DataSourceService", "createDataSource", [
|
|
65
|
+
name,
|
|
66
|
+
connectUserName,
|
|
67
|
+
connectPassword,
|
|
68
|
+
maxConnection,
|
|
69
|
+
driverType,
|
|
70
|
+
driverClassName,
|
|
71
|
+
url,
|
|
72
|
+
driverCatalog,
|
|
73
|
+
transactionIsolation
|
|
74
|
+
]);
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* 修改数据源
|
|
78
|
+
* @param id 数据源ID
|
|
79
|
+
* @param connectUserName 连接用户名
|
|
80
|
+
* @param connectPassword 连接密码
|
|
81
|
+
* @param maxConnection 最大连接数
|
|
82
|
+
* @param driverType 数据库类型
|
|
83
|
+
* @param driverClassName 驱动程序类名
|
|
84
|
+
* @param url 连接字符串
|
|
85
|
+
*/
|
|
86
|
+
const updateDataSource = (id, connectUserName, connectPassword, maxConnection, driverType, driverClassName, url) => {
|
|
87
|
+
return smartbi("DataSourceService", "updateDataSource", [
|
|
88
|
+
id,
|
|
89
|
+
connectUserName,
|
|
90
|
+
connectPassword,
|
|
91
|
+
maxConnection,
|
|
92
|
+
driverType,
|
|
93
|
+
driverClassName,
|
|
94
|
+
url
|
|
95
|
+
]);
|
|
96
|
+
};
|
|
97
|
+
/**
|
|
98
|
+
* 修改数据源(带目录参数)
|
|
99
|
+
* @param id 数据源ID
|
|
100
|
+
* @param connectUserName 连接用户名
|
|
101
|
+
* @param connectPassword 连接密码
|
|
102
|
+
* @param maxConnection 最大连接数
|
|
103
|
+
* @param driverType 数据库类型
|
|
104
|
+
* @param driverClassName 驱动程序类名
|
|
105
|
+
* @param url 连接字符串
|
|
106
|
+
* @param driverCatalog 驱动目录
|
|
107
|
+
*/
|
|
108
|
+
const updateDataSourceWithCatalog = (id, connectUserName, connectPassword, maxConnection, driverType, driverClassName, url, driverCatalog) => {
|
|
109
|
+
return smartbi("DataSourceService", "updateDataSource", [
|
|
110
|
+
id,
|
|
111
|
+
connectUserName,
|
|
112
|
+
connectPassword,
|
|
113
|
+
maxConnection,
|
|
114
|
+
driverType,
|
|
115
|
+
driverClassName,
|
|
116
|
+
url,
|
|
117
|
+
driverCatalog
|
|
118
|
+
]);
|
|
119
|
+
};
|
|
120
|
+
/**
|
|
121
|
+
* 修改数据源(带事务隔离级别)
|
|
122
|
+
* @param id 数据源ID
|
|
123
|
+
* @param connectUserName 连接用户名
|
|
124
|
+
* @param connectPassword 连接密码
|
|
125
|
+
* @param maxConnection 最大连接数
|
|
126
|
+
* @param driverType 数据库类型
|
|
127
|
+
* @param driverClassName 驱动程序类名
|
|
128
|
+
* @param url 连接字符串
|
|
129
|
+
* @param driverCatalog 驱动目录
|
|
130
|
+
* @param transactionIsolation 事务隔离级别
|
|
131
|
+
*/
|
|
132
|
+
const updateDataSourceWithTransactionIsolation = (id, connectUserName, connectPassword, maxConnection, driverType, driverClassName, url, driverCatalog, transactionIsolation) => {
|
|
133
|
+
return smartbi("DataSourceService", "updateDataSource", [
|
|
134
|
+
id,
|
|
135
|
+
connectUserName,
|
|
136
|
+
connectPassword,
|
|
137
|
+
maxConnection,
|
|
138
|
+
driverType,
|
|
139
|
+
driverClassName,
|
|
140
|
+
url,
|
|
141
|
+
driverCatalog,
|
|
142
|
+
transactionIsolation
|
|
143
|
+
]);
|
|
144
|
+
};
|
|
145
|
+
/**
|
|
146
|
+
* 删除数据源
|
|
147
|
+
* @param dataSourceID 数据源ID
|
|
148
|
+
*/
|
|
149
|
+
const deleteDataSource = (dataSourceID) => {
|
|
150
|
+
return smartbi("DataSourceService", "deleteDataSource", [dataSourceID]);
|
|
151
|
+
};
|
|
152
|
+
/**
|
|
153
|
+
* 获取数据源
|
|
154
|
+
* @param dataSourceID 数据源ID
|
|
155
|
+
* @returns 返回数据源对象
|
|
156
|
+
*/
|
|
157
|
+
const getDataSource = (dataSourceID) => {
|
|
158
|
+
return smartbi("DataSourceService", "getDataSource", [dataSourceID]);
|
|
159
|
+
};
|
|
160
|
+
/**
|
|
161
|
+
* 给数据源添加表
|
|
162
|
+
* @param dataSourceId 数据源ID
|
|
163
|
+
* @param tableList 表列表
|
|
164
|
+
*/
|
|
165
|
+
const addTablesToDataSource = (dataSourceId, tableList) => {
|
|
166
|
+
return smartbi("DataSourceService", "addTablesToDataSource", [dataSourceId, tableList.toString()]);
|
|
167
|
+
};
|
|
168
|
+
/**
|
|
169
|
+
* 删除数据源的表、视图、存储过程
|
|
170
|
+
* @param dataSourceId 数据源ID
|
|
171
|
+
* @param schemaName 模式名称
|
|
172
|
+
* @param tableNameList 表名列表
|
|
173
|
+
*/
|
|
174
|
+
const removeTablesFromDataSource = (dataSourceId, schemaName, tableNameList) => {
|
|
175
|
+
return smartbi("DataSourceService", "removeTablesFromDataSource", [
|
|
176
|
+
dataSourceId,
|
|
177
|
+
schemaName,
|
|
178
|
+
tableNameList.toString()
|
|
179
|
+
]);
|
|
180
|
+
};
|
|
181
|
+
/**
|
|
182
|
+
* 删除数据库表
|
|
183
|
+
* @param dsId 数据源ID
|
|
184
|
+
* @param schemaName 模式名称
|
|
185
|
+
* @param tableNameList 表名列表
|
|
186
|
+
*/
|
|
187
|
+
const removeTables = (dsId, schemaName, tableNameList) => {
|
|
188
|
+
return smartbi("DataSourceService", "removeTables", [
|
|
189
|
+
dsId,
|
|
190
|
+
schemaName,
|
|
191
|
+
tableNameList.toString()
|
|
192
|
+
]);
|
|
193
|
+
};
|
|
194
|
+
/**
|
|
195
|
+
* 同步schema表
|
|
196
|
+
* @param dataSourceID 数据源ID
|
|
197
|
+
* @param schema 模式名称
|
|
198
|
+
*/
|
|
199
|
+
const synchTablesToDataSource = (dataSourceID, schema) => {
|
|
200
|
+
return smartbi("DataSourceService", "synchTablesToDataSource", [dataSourceID, schema]);
|
|
201
|
+
};
|
|
202
|
+
/**
|
|
203
|
+
* 同步catalog下面schema表
|
|
204
|
+
* @param dataSourceID 数据源ID
|
|
205
|
+
* @param catalog 目录名称
|
|
206
|
+
* @param schema 模式名称
|
|
207
|
+
*/
|
|
208
|
+
const synchTablesToDataSourceWithCatalog = (dataSourceID, catalog, schema) => {
|
|
209
|
+
return smartbi("DataSourceService", "synchTablesToDataSourceWhitCatalog", [
|
|
210
|
+
dataSourceID,
|
|
211
|
+
catalog,
|
|
212
|
+
schema
|
|
213
|
+
]);
|
|
214
|
+
};
|
|
215
|
+
/**
|
|
216
|
+
* 同步表
|
|
217
|
+
* @param tableId 表ID
|
|
218
|
+
*/
|
|
219
|
+
const syncTable = (tableId) => {
|
|
220
|
+
return smartbi("DataSourceService", "syncTable", [tableId]);
|
|
221
|
+
};
|
|
222
|
+
/**
|
|
223
|
+
* 修改表属性
|
|
224
|
+
* @param tableId 表ID
|
|
225
|
+
* @param tableAlias 表别名
|
|
226
|
+
* @param fieldList 字段列表
|
|
227
|
+
*/
|
|
228
|
+
const updateTablePropertys = (tableId, tableAlias, fieldList) => {
|
|
229
|
+
return smartbi("DataSourceService", "updateTablePropertys", [
|
|
230
|
+
tableId,
|
|
231
|
+
tableAlias,
|
|
232
|
+
fieldList.toString()
|
|
233
|
+
]);
|
|
234
|
+
};
|
|
235
|
+
/**
|
|
236
|
+
* 获取表字段
|
|
237
|
+
* @param tabelId 表ID
|
|
238
|
+
* @returns 返回字段列表
|
|
239
|
+
*/
|
|
240
|
+
const getFields = (tabelId) => {
|
|
241
|
+
return smartbi("DataSourceService", "getFields", [tabelId]);
|
|
242
|
+
};
|
|
243
|
+
/**
|
|
244
|
+
* 获取"数据源"节点下某张表的数据
|
|
245
|
+
* @param tableId 表ID
|
|
246
|
+
* @param maxRows 最大行数
|
|
247
|
+
* @returns 返回表数据
|
|
248
|
+
*/
|
|
249
|
+
const getSampleTableData = (tableId, maxRows) => {
|
|
250
|
+
return smartbi("DataSourceService", "getSampleTableData", [tableId, maxRows]);
|
|
251
|
+
};
|
|
252
|
+
/**
|
|
253
|
+
* 执行指定SQL语句,返回相应结果集
|
|
254
|
+
* @param dataSourceID 数据源ID
|
|
255
|
+
* @param sql SQL语句
|
|
256
|
+
* @param maxRows 最大行数
|
|
257
|
+
* @param format 是否格式化
|
|
258
|
+
* @param cacheable 是否缓存
|
|
259
|
+
* @returns 返回结果集数据
|
|
260
|
+
*/
|
|
261
|
+
const execute = (dataSourceID, sql, maxRows, format, cacheable) => {
|
|
262
|
+
return smartbi("DataSourceService", "execute", [
|
|
263
|
+
dataSourceID,
|
|
264
|
+
sql,
|
|
265
|
+
maxRows,
|
|
266
|
+
format,
|
|
267
|
+
cacheable
|
|
268
|
+
]);
|
|
269
|
+
};
|
|
270
|
+
/**
|
|
271
|
+
* 直接执行指定SQL语句,返回相应结果集,不从缓存中返回结果集
|
|
272
|
+
* @param dataSourceID 数据源ID
|
|
273
|
+
* @param sql SQL语句
|
|
274
|
+
* @returns 返回结果集数据
|
|
275
|
+
*/
|
|
276
|
+
const executeNoCacheable = (dataSourceID, sql) => {
|
|
277
|
+
return smartbi("DataSourceService", "executeNoCacheable", [dataSourceID, sql]);
|
|
278
|
+
};
|
|
279
|
+
/**
|
|
280
|
+
* 直接执行SQL语句,可以是INSERT, UPDATE, DELETE语句,也可以是SQL DDL语句
|
|
281
|
+
* @param dataSourceID 数据源ID
|
|
282
|
+
* @param sql SQL语句
|
|
283
|
+
* @returns 返回影响的行数
|
|
284
|
+
*/
|
|
285
|
+
const executeUpdate = (dataSourceID, sql) => {
|
|
286
|
+
return smartbi("DataSourceService", "executeUpdate", [dataSourceID, sql]);
|
|
287
|
+
};
|
|
288
|
+
/**
|
|
289
|
+
* 获取未格式化的原始的结果集数据
|
|
290
|
+
* @param dsId 数据源ID
|
|
291
|
+
* @param sql SQL语句
|
|
292
|
+
* @param pageNum 页码
|
|
293
|
+
* @param rowPerPage 每页行数
|
|
294
|
+
* @returns 返回结果集数据
|
|
295
|
+
*/
|
|
296
|
+
const getDataByQuerySql = (dsId, sql, pageNum, rowPerPage) => {
|
|
297
|
+
return smartbi("DataSourceService", "getDataByQuerySql", [
|
|
298
|
+
dsId,
|
|
299
|
+
sql,
|
|
300
|
+
pageNum,
|
|
301
|
+
rowPerPage
|
|
302
|
+
]);
|
|
303
|
+
};
|
|
304
|
+
|
|
305
|
+
//#endregion
|
|
306
|
+
export { addTablesToDataSource, createDataSource, createDataSourceWithCatalog, createDataSourceWithTransactionIsolation, deleteDataSource, execute, executeNoCacheable, executeUpdate, getDataByQuerySql, getDataSource, getFields, getSampleTableData, removeTables, removeTablesFromDataSource, syncTable, synchTablesToDataSource, synchTablesToDataSourceWithCatalog, updateDataSource, updateDataSourceWithCatalog, updateDataSourceWithTransactionIsolation, updateTablePropertys };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { _ as GraphicReport } from "../types-C2_iES_3.js";
|
|
2
|
+
|
|
3
|
+
//#region src/service/GraphicReportService.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* 打开图形分析报表
|
|
6
|
+
* @param reportId 报表ID
|
|
7
|
+
* @returns 返回报表客户端ID
|
|
8
|
+
*/
|
|
9
|
+
declare const openGraphicReport: (reportId: string) => Promise<GraphicReport>;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { openGraphicReport };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { smartbi } from "../index.js";
|
|
2
|
+
|
|
3
|
+
//#region src/service/GraphicReportService.ts
|
|
4
|
+
/**
|
|
5
|
+
* 打开图形分析报表
|
|
6
|
+
* @param reportId 报表ID
|
|
7
|
+
* @returns 返回报表客户端ID
|
|
8
|
+
*/
|
|
9
|
+
const openGraphicReport = (reportId) => {
|
|
10
|
+
return smartbi("GraphicReportService", "openGraphicReport", [reportId]);
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
//#endregion
|
|
14
|
+
export { openGraphicReport };
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { B as RunningInfo, D as NameValuePair, E as JSONArray, F as ReportData, j as Parameter } from "../types-C2_iES_3.js";
|
|
2
|
+
|
|
3
|
+
//#region src/service/InsightReport.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* 打开透视分析
|
|
6
|
+
* @param reportId 报表Id
|
|
7
|
+
* @returns 无返回值
|
|
8
|
+
*/
|
|
9
|
+
declare const open: (reportId: string) => Promise<void>;
|
|
10
|
+
/**
|
|
11
|
+
* 获取参数列表
|
|
12
|
+
* @returns 返回参数列表
|
|
13
|
+
*/
|
|
14
|
+
declare const getParamList: () => Promise<Parameter[]>;
|
|
15
|
+
/**
|
|
16
|
+
* 获取参数备选值
|
|
17
|
+
* @param paramId 参数Id
|
|
18
|
+
* @returns 返回备选值列表
|
|
19
|
+
*/
|
|
20
|
+
declare const getParamStandbyValue: (paramId: string) => Promise<NameValuePair[]>;
|
|
21
|
+
/**
|
|
22
|
+
* 根据参数Id获取参数默认值
|
|
23
|
+
* @param pid 参数Id
|
|
24
|
+
* @returns 返回默认值字符串
|
|
25
|
+
*/
|
|
26
|
+
declare const getParamDefaultValueByPID: (pid: string) => Promise<string>;
|
|
27
|
+
/**
|
|
28
|
+
* 根据参数Id获取参数默认值
|
|
29
|
+
* @param pid 参数Id
|
|
30
|
+
* @returns 返回默认值JSONArray
|
|
31
|
+
*/
|
|
32
|
+
declare const getParamDefaultValueByPID2: (pid: string) => Promise<JSONArray>;
|
|
33
|
+
/**
|
|
34
|
+
* 导出
|
|
35
|
+
* @param type 导出类型
|
|
36
|
+
* @param delimiter 分隔符
|
|
37
|
+
* @param maxRow 最大行数
|
|
38
|
+
* @param resourceBasePath 资源基础路径
|
|
39
|
+
* @param valueType 值类型
|
|
40
|
+
* @param contentType 内容类型
|
|
41
|
+
* @param paramArr 可选参数数组
|
|
42
|
+
* @returns 无返回值
|
|
43
|
+
*/
|
|
44
|
+
declare const doExport: (type: string, delimiter: string, maxRow: string, resourceBasePath: string, valueType: string, contentType: string, paramArr?: JSONArray) => Promise<void>;
|
|
45
|
+
/**
|
|
46
|
+
* 设置参数值
|
|
47
|
+
* @param id 参数Id
|
|
48
|
+
* @param value 参数真实值
|
|
49
|
+
* @param displayValue 参数显示值
|
|
50
|
+
* @returns 无返回值
|
|
51
|
+
*/
|
|
52
|
+
declare const setParamValue: (id: string, value: string, displayValue: string) => Promise<void>;
|
|
53
|
+
/**
|
|
54
|
+
* 刷新对象
|
|
55
|
+
* @returns 无返回值
|
|
56
|
+
*/
|
|
57
|
+
declare const refreshObject: () => Promise<void>;
|
|
58
|
+
/**
|
|
59
|
+
* 关闭透视分析
|
|
60
|
+
* @returns 无返回值
|
|
61
|
+
*/
|
|
62
|
+
declare const close: () => Promise<void>;
|
|
63
|
+
/**
|
|
64
|
+
* 获取执行状态
|
|
65
|
+
* @returns 返回执行状态信息
|
|
66
|
+
*/
|
|
67
|
+
declare const getExecutingState: () => Promise<RunningInfo>;
|
|
68
|
+
/**
|
|
69
|
+
* 取得报表的指定页
|
|
70
|
+
* @param pageIndex 页码
|
|
71
|
+
* @returns 返回报表数据
|
|
72
|
+
*/
|
|
73
|
+
declare const getPage: (pageIndex: number) => Promise<ReportData>;
|
|
74
|
+
//#endregion
|
|
75
|
+
export { close, doExport, getExecutingState, getPage, getParamDefaultValueByPID, getParamDefaultValueByPID2, getParamList, getParamStandbyValue, open, refreshObject, setParamValue };
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { smartbi } from "../index.js";
|
|
2
|
+
|
|
3
|
+
//#region src/service/InsightReport.ts
|
|
4
|
+
/**
|
|
5
|
+
* 打开透视分析
|
|
6
|
+
* @param reportId 报表Id
|
|
7
|
+
* @returns 无返回值
|
|
8
|
+
*/
|
|
9
|
+
const open = (reportId) => {
|
|
10
|
+
return smartbi("InsightReport", "open", [reportId]);
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* 获取参数列表
|
|
14
|
+
* @returns 返回参数列表
|
|
15
|
+
*/
|
|
16
|
+
const getParamList = () => {
|
|
17
|
+
return smartbi("InsightReport", "getParamList", []);
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* 获取参数备选值
|
|
21
|
+
* @param paramId 参数Id
|
|
22
|
+
* @returns 返回备选值列表
|
|
23
|
+
*/
|
|
24
|
+
const getParamStandbyValue = (paramId) => {
|
|
25
|
+
return smartbi("InsightReport", "getParamStandbyValue", [paramId]);
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* 根据参数Id获取参数默认值
|
|
29
|
+
* @param pid 参数Id
|
|
30
|
+
* @returns 返回默认值字符串
|
|
31
|
+
*/
|
|
32
|
+
const getParamDefaultValueByPID = (pid) => {
|
|
33
|
+
return smartbi("InsightReport", "getParamDefaultValueByPID", [pid]);
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* 根据参数Id获取参数默认值
|
|
37
|
+
* @param pid 参数Id
|
|
38
|
+
* @returns 返回默认值JSONArray
|
|
39
|
+
*/
|
|
40
|
+
const getParamDefaultValueByPID2 = (pid) => {
|
|
41
|
+
return smartbi("InsightReport", "getParamDefaultValueByPID2", [pid]);
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* 导出
|
|
45
|
+
* @param type 导出类型
|
|
46
|
+
* @param delimiter 分隔符
|
|
47
|
+
* @param maxRow 最大行数
|
|
48
|
+
* @param resourceBasePath 资源基础路径
|
|
49
|
+
* @param valueType 值类型
|
|
50
|
+
* @param contentType 内容类型
|
|
51
|
+
* @param paramArr 可选参数数组
|
|
52
|
+
* @returns 无返回值
|
|
53
|
+
*/
|
|
54
|
+
const doExport = (type, delimiter, maxRow, resourceBasePath, valueType, contentType, paramArr) => {
|
|
55
|
+
if (paramArr !== void 0) return smartbi("InsightReport", "doExportWithParams", [
|
|
56
|
+
type,
|
|
57
|
+
delimiter,
|
|
58
|
+
maxRow,
|
|
59
|
+
resourceBasePath,
|
|
60
|
+
valueType,
|
|
61
|
+
contentType,
|
|
62
|
+
paramArr.toString()
|
|
63
|
+
]);
|
|
64
|
+
else return smartbi("InsightReport", "doExport", [
|
|
65
|
+
type,
|
|
66
|
+
delimiter,
|
|
67
|
+
maxRow,
|
|
68
|
+
resourceBasePath,
|
|
69
|
+
valueType,
|
|
70
|
+
contentType
|
|
71
|
+
]);
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* 设置参数值
|
|
75
|
+
* @param id 参数Id
|
|
76
|
+
* @param value 参数真实值
|
|
77
|
+
* @param displayValue 参数显示值
|
|
78
|
+
* @returns 无返回值
|
|
79
|
+
*/
|
|
80
|
+
const setParamValue = (id, value, displayValue) => {
|
|
81
|
+
return smartbi("InsightReport", "setParamValue", [
|
|
82
|
+
id,
|
|
83
|
+
value,
|
|
84
|
+
displayValue
|
|
85
|
+
]);
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* 刷新对象
|
|
89
|
+
* @returns 无返回值
|
|
90
|
+
*/
|
|
91
|
+
const refreshObject = () => {
|
|
92
|
+
return smartbi("InsightReport", "refreshObject", []);
|
|
93
|
+
};
|
|
94
|
+
/**
|
|
95
|
+
* 关闭透视分析
|
|
96
|
+
* @returns 无返回值
|
|
97
|
+
*/
|
|
98
|
+
const close = () => {
|
|
99
|
+
return smartbi("InsightReport", "close", []);
|
|
100
|
+
};
|
|
101
|
+
/**
|
|
102
|
+
* 获取执行状态
|
|
103
|
+
* @returns 返回执行状态信息
|
|
104
|
+
*/
|
|
105
|
+
const getExecutingState = () => {
|
|
106
|
+
return smartbi("InsightReport", "getExecutingState", []);
|
|
107
|
+
};
|
|
108
|
+
/**
|
|
109
|
+
* 取得报表的指定页
|
|
110
|
+
* @param pageIndex 页码
|
|
111
|
+
* @returns 返回报表数据
|
|
112
|
+
*/
|
|
113
|
+
const getPage = (pageIndex) => {
|
|
114
|
+
return smartbi("InsightReport", "getPage", [pageIndex]);
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
//#endregion
|
|
118
|
+
export { close, doExport, getExecutingState, getPage, getParamDefaultValueByPID, getParamDefaultValueByPID2, getParamList, getParamStandbyValue, open, refreshObject, setParamValue };
|
|
@@ -1,24 +1,26 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { S as IDocument, c as CategoryResource, p as DocumentTreeNode } from "../types-C2_iES_3.js";
|
|
2
|
+
|
|
3
|
+
//#region src/service/MetadataService.d.ts
|
|
2
4
|
/**
|
|
3
5
|
* 搜索被引用的资源(影响性分析)
|
|
4
6
|
* @param resId 要搜索的资源ID
|
|
5
7
|
* @param recursive 是否获取子节点
|
|
6
8
|
* @returns 返回树结构的被引用的资源列表
|
|
7
9
|
*/
|
|
8
|
-
|
|
10
|
+
declare const searchByReferenced: (resId: string, recursive: boolean) => Promise<DocumentTreeNode[]>;
|
|
9
11
|
/**
|
|
10
12
|
* 搜索引用到的资源(血统分析)
|
|
11
13
|
* @param resId 要搜索的资源ID
|
|
12
14
|
* @param recursive 是否获取子节点
|
|
13
15
|
* @returns 返回树结构的被引用的资源列表
|
|
14
16
|
*/
|
|
15
|
-
|
|
17
|
+
declare const searchReferringTo: (resId: string, recursive: boolean) => Promise<DocumentTreeNode[]>;
|
|
16
18
|
/**
|
|
17
19
|
* 检索当前用户是否具有权限检索对应的资源节点
|
|
18
20
|
* @param docs 要搜索的所有资源节点
|
|
19
21
|
* @returns 返回判断结果列表
|
|
20
22
|
*/
|
|
21
|
-
|
|
23
|
+
declare const checkPermission: (docs: IDocument[]) => Promise<boolean[]>;
|
|
22
24
|
/**
|
|
23
25
|
* 搜索被引用的资源(影响性分析)
|
|
24
26
|
* @param res 要搜索的资源
|
|
@@ -26,7 +28,7 @@ export declare const checkPermission: (docs: IDocument[]) => Promise<boolean[]>;
|
|
|
26
28
|
* @param recursive 是否递归
|
|
27
29
|
* @returns 返回引用的资源
|
|
28
30
|
*/
|
|
29
|
-
|
|
31
|
+
declare const searchByReferencedRecursive: (res: CategoryResource, filters: string[], recursive: boolean) => Promise<IDocument[]>;
|
|
30
32
|
/**
|
|
31
33
|
* 搜索引用到的资源(血统分析)
|
|
32
34
|
* @param res 要搜索的资源
|
|
@@ -34,4 +36,6 @@ export declare const searchByReferencedRecursive: (res: CategoryResource, filter
|
|
|
34
36
|
* @param recursive 是否递归
|
|
35
37
|
* @returns 返回引用到的资源
|
|
36
38
|
*/
|
|
37
|
-
|
|
39
|
+
declare const searchReferringToRecursive: (res: CategoryResource, filters: string[], recursive: boolean) => Promise<IDocument[]>;
|
|
40
|
+
//#endregion
|
|
41
|
+
export { checkPermission, searchByReferenced, searchByReferencedRecursive, searchReferringTo, searchReferringToRecursive };
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { smartbi } from "../index.js";
|
|
2
|
+
|
|
3
|
+
//#region src/service/MetadataService.ts
|
|
4
|
+
/**
|
|
5
|
+
* 搜索被引用的资源(影响性分析)
|
|
6
|
+
* @param resId 要搜索的资源ID
|
|
7
|
+
* @param recursive 是否获取子节点
|
|
8
|
+
* @returns 返回树结构的被引用的资源列表
|
|
9
|
+
*/
|
|
10
|
+
const searchByReferenced = (resId, recursive) => {
|
|
11
|
+
return smartbi("MetadataService", "searchByReferenced", [resId, recursive]);
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* 搜索引用到的资源(血统分析)
|
|
15
|
+
* @param resId 要搜索的资源ID
|
|
16
|
+
* @param recursive 是否获取子节点
|
|
17
|
+
* @returns 返回树结构的被引用的资源列表
|
|
18
|
+
*/
|
|
19
|
+
const searchReferringTo = (resId, recursive) => {
|
|
20
|
+
return smartbi("MetadataService", "searchReferringTo", [resId, recursive]);
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* 检索当前用户是否具有权限检索对应的资源节点
|
|
24
|
+
* @param docs 要搜索的所有资源节点
|
|
25
|
+
* @returns 返回判断结果列表
|
|
26
|
+
*/
|
|
27
|
+
const checkPermission = (docs) => {
|
|
28
|
+
return smartbi("MetadataService", "checkPermission", [docs.toString()]);
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* 搜索被引用的资源(影响性分析)
|
|
32
|
+
* @param res 要搜索的资源
|
|
33
|
+
* @param filters 允许返回的资源类型
|
|
34
|
+
* @param recursive 是否递归
|
|
35
|
+
* @returns 返回引用的资源
|
|
36
|
+
*/
|
|
37
|
+
const searchByReferencedRecursive = (res, filters, recursive) => {
|
|
38
|
+
return smartbi("MetadataService", "searchByReferencedRecursive", [
|
|
39
|
+
JSON.stringify(res),
|
|
40
|
+
filters.toString(),
|
|
41
|
+
recursive
|
|
42
|
+
]);
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* 搜索引用到的资源(血统分析)
|
|
46
|
+
* @param res 要搜索的资源
|
|
47
|
+
* @param filters 允许返回的资源类型
|
|
48
|
+
* @param recursive 是否递归
|
|
49
|
+
* @returns 返回引用到的资源
|
|
50
|
+
*/
|
|
51
|
+
const searchReferringToRecursive = (res, filters, recursive) => {
|
|
52
|
+
return smartbi("MetadataService", "searchReferringToRecursive", [
|
|
53
|
+
JSON.stringify(res),
|
|
54
|
+
filters.toString(),
|
|
55
|
+
recursive
|
|
56
|
+
]);
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
//#endregion
|
|
60
|
+
export { checkPermission, searchByReferenced, searchByReferencedRecursive, searchReferringTo, searchReferringToRecursive };
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { B as RunningInfo, O as OfficeReportExportType, j as Parameter } from "../types-C2_iES_3.js";
|
|
2
|
+
|
|
3
|
+
//#region src/service/OfficeReport.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* 打开Word分析报告
|
|
6
|
+
* @param id Word分析报告id
|
|
7
|
+
* @returns 无返回值
|
|
8
|
+
*/
|
|
9
|
+
declare const openOfficeReport: (id: string) => Promise<void>;
|
|
10
|
+
/**
|
|
11
|
+
* 关闭Word分析报告
|
|
12
|
+
* @returns 无返回值
|
|
13
|
+
*/
|
|
14
|
+
declare const closeOfficeReport: () => Promise<void>;
|
|
15
|
+
/**
|
|
16
|
+
* 获取Word分析报告参数列表
|
|
17
|
+
* @returns 返回参数列表
|
|
18
|
+
*/
|
|
19
|
+
declare const getOfficeReportParamList: () => Promise<Parameter[]>;
|
|
20
|
+
/**
|
|
21
|
+
* 根据参数ID获取参数备选值
|
|
22
|
+
* @param paramId 参数ID
|
|
23
|
+
* @returns 返回参数备选值列表
|
|
24
|
+
*/
|
|
25
|
+
declare const getOfficeReportParamStandbyValue: (paramId: string) => Promise<any[]>;
|
|
26
|
+
/**
|
|
27
|
+
* 根据参数ID获取参数默认值
|
|
28
|
+
* @param pid 参数ID
|
|
29
|
+
* @returns 返回参数默认值
|
|
30
|
+
*/
|
|
31
|
+
declare const getOfficeReportParamDefaultValueByPID: (pid: string) => Promise<string>;
|
|
32
|
+
/**
|
|
33
|
+
* 设置参数值
|
|
34
|
+
* @param id 参数ID
|
|
35
|
+
* @param value 参数真实值
|
|
36
|
+
* @param displayValue 参数显示值
|
|
37
|
+
* @returns 无返回值
|
|
38
|
+
*/
|
|
39
|
+
declare const setOfficeReportParamValue: (id: string, value: string, displayValue: string) => Promise<void>;
|
|
40
|
+
/**
|
|
41
|
+
* 导出Word分析报告
|
|
42
|
+
* @param type 导出类型
|
|
43
|
+
* @param os 输出流
|
|
44
|
+
* @returns 无返回值
|
|
45
|
+
*/
|
|
46
|
+
declare const exportOfficeReport: (type: OfficeReportExportType | string, os: any) => Promise<void>;
|
|
47
|
+
/**
|
|
48
|
+
* 获取执行状态
|
|
49
|
+
* @returns 返回执行状态信息
|
|
50
|
+
*/
|
|
51
|
+
declare const getOfficeReportExecutingState: () => Promise<RunningInfo>;
|
|
52
|
+
//#endregion
|
|
53
|
+
export { closeOfficeReport, exportOfficeReport, getOfficeReportExecutingState, getOfficeReportParamDefaultValueByPID, getOfficeReportParamList, getOfficeReportParamStandbyValue, openOfficeReport, setOfficeReportParamValue };
|