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,74 @@
|
|
|
1
|
+
import { smartbi } from "../index.js";
|
|
2
|
+
|
|
3
|
+
//#region src/service/OfficeReport.ts
|
|
4
|
+
/**
|
|
5
|
+
* 打开Word分析报告
|
|
6
|
+
* @param id Word分析报告id
|
|
7
|
+
* @returns 无返回值
|
|
8
|
+
*/
|
|
9
|
+
const openOfficeReport = (id) => {
|
|
10
|
+
return smartbi("OfficeReport", "open", [id]);
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* 关闭Word分析报告
|
|
14
|
+
* @returns 无返回值
|
|
15
|
+
*/
|
|
16
|
+
const closeOfficeReport = () => {
|
|
17
|
+
return smartbi("OfficeReport", "close", []);
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* 获取Word分析报告参数列表
|
|
21
|
+
* @returns 返回参数列表
|
|
22
|
+
*/
|
|
23
|
+
const getOfficeReportParamList = () => {
|
|
24
|
+
return smartbi("OfficeReport", "getParamList", []);
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* 根据参数ID获取参数备选值
|
|
28
|
+
* @param paramId 参数ID
|
|
29
|
+
* @returns 返回参数备选值列表
|
|
30
|
+
*/
|
|
31
|
+
const getOfficeReportParamStandbyValue = (paramId) => {
|
|
32
|
+
return smartbi("OfficeReport", "getParamStandbyValue", [paramId]);
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* 根据参数ID获取参数默认值
|
|
36
|
+
* @param pid 参数ID
|
|
37
|
+
* @returns 返回参数默认值
|
|
38
|
+
*/
|
|
39
|
+
const getOfficeReportParamDefaultValueByPID = (pid) => {
|
|
40
|
+
return smartbi("OfficeReport", "getParamDefaultValueByPID", [pid]);
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* 设置参数值
|
|
44
|
+
* @param id 参数ID
|
|
45
|
+
* @param value 参数真实值
|
|
46
|
+
* @param displayValue 参数显示值
|
|
47
|
+
* @returns 无返回值
|
|
48
|
+
*/
|
|
49
|
+
const setOfficeReportParamValue = (id, value, displayValue) => {
|
|
50
|
+
return smartbi("OfficeReport", "setParamValue", [
|
|
51
|
+
id,
|
|
52
|
+
value,
|
|
53
|
+
displayValue
|
|
54
|
+
]);
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* 导出Word分析报告
|
|
58
|
+
* @param type 导出类型
|
|
59
|
+
* @param os 输出流
|
|
60
|
+
* @returns 无返回值
|
|
61
|
+
*/
|
|
62
|
+
const exportOfficeReport = (type, os) => {
|
|
63
|
+
return smartbi("OfficeReport", "doExport", [type, os]);
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* 获取执行状态
|
|
67
|
+
* @returns 返回执行状态信息
|
|
68
|
+
*/
|
|
69
|
+
const getOfficeReportExecutingState = () => {
|
|
70
|
+
return smartbi("OfficeReport", "getExecutingState", []);
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
//#endregion
|
|
74
|
+
export { closeOfficeReport, exportOfficeReport, getOfficeReportExecutingState, getOfficeReportParamDefaultValueByPID, getOfficeReportParamList, getOfficeReportParamStandbyValue, openOfficeReport, setOfficeReportParamValue };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { D as NameValuePair } from "../types-DOYMZhxT.js";
|
|
2
|
+
|
|
3
|
+
//#region src/service/OfficeReportService.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* 打开报表
|
|
6
|
+
* @param reportId 报表ID
|
|
7
|
+
* @returns 返回报表的JSON对象
|
|
8
|
+
*/
|
|
9
|
+
declare const openReport: (reportId: string) => Promise<any>;
|
|
10
|
+
/**
|
|
11
|
+
* 关闭报表
|
|
12
|
+
* @param clientId 客户端ID
|
|
13
|
+
* @returns 无返回值
|
|
14
|
+
*/
|
|
15
|
+
declare const closeReport: (clientId: string) => Promise<void>;
|
|
16
|
+
/**
|
|
17
|
+
* 获取参数备选值
|
|
18
|
+
* @param panelId 参数面板会话ID
|
|
19
|
+
* @param paramId 参数ID
|
|
20
|
+
* @returns 返回参数备选值列表
|
|
21
|
+
*/
|
|
22
|
+
declare const getParamStandbyValue: (panelId: string, paramId: string) => Promise<NameValuePair[]>;
|
|
23
|
+
/**
|
|
24
|
+
* 根据参数ID获取参数默认值
|
|
25
|
+
* @param panelId 参数面板会话ID
|
|
26
|
+
* @param paramId 参数ID
|
|
27
|
+
* @returns 返回参数默认值的JSON数组
|
|
28
|
+
*/
|
|
29
|
+
declare const getParamDefaultValueByPID: (panelId: string, paramId: string) => Promise<any[]>;
|
|
30
|
+
/**
|
|
31
|
+
* 设置参数值
|
|
32
|
+
* @param panelId 参数面板ID
|
|
33
|
+
* @param paramId 参数ID
|
|
34
|
+
* @param value 参数真实值
|
|
35
|
+
* @param displayValue 参数显示值
|
|
36
|
+
* @returns 返回是否设置成功的布尔值
|
|
37
|
+
*/
|
|
38
|
+
declare const setParamValue: (panelId: string, paramId: string, value: string, displayValue: string) => Promise<boolean>;
|
|
39
|
+
//#endregion
|
|
40
|
+
export { closeReport, getParamDefaultValueByPID, getParamStandbyValue, openReport, setParamValue };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { smartbi } from "../index.js";
|
|
2
|
+
|
|
3
|
+
//#region src/service/OfficeReportService.ts
|
|
4
|
+
/**
|
|
5
|
+
* 打开报表
|
|
6
|
+
* @param reportId 报表ID
|
|
7
|
+
* @returns 返回报表的JSON对象
|
|
8
|
+
*/
|
|
9
|
+
const openReport = (reportId) => {
|
|
10
|
+
return smartbi("OfficeReportService", "openReport", [reportId]);
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* 关闭报表
|
|
14
|
+
* @param clientId 客户端ID
|
|
15
|
+
* @returns 无返回值
|
|
16
|
+
*/
|
|
17
|
+
const closeReport = (clientId) => {
|
|
18
|
+
return smartbi("OfficeReportService", "closeReport", [clientId]);
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* 获取参数备选值
|
|
22
|
+
* @param panelId 参数面板会话ID
|
|
23
|
+
* @param paramId 参数ID
|
|
24
|
+
* @returns 返回参数备选值列表
|
|
25
|
+
*/
|
|
26
|
+
const getParamStandbyValue = (panelId, paramId) => {
|
|
27
|
+
return smartbi("OfficeReportService", "getParamStandbyValue", [panelId, paramId]);
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* 根据参数ID获取参数默认值
|
|
31
|
+
* @param panelId 参数面板会话ID
|
|
32
|
+
* @param paramId 参数ID
|
|
33
|
+
* @returns 返回参数默认值的JSON数组
|
|
34
|
+
*/
|
|
35
|
+
const getParamDefaultValueByPID = (panelId, paramId) => {
|
|
36
|
+
return smartbi("OfficeReportService", "getParamDefaultValueByPID", [panelId, paramId]);
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* 设置参数值
|
|
40
|
+
* @param panelId 参数面板ID
|
|
41
|
+
* @param paramId 参数ID
|
|
42
|
+
* @param value 参数真实值
|
|
43
|
+
* @param displayValue 参数显示值
|
|
44
|
+
* @returns 返回是否设置成功的布尔值
|
|
45
|
+
*/
|
|
46
|
+
const setParamValue = (panelId, paramId, value, displayValue) => {
|
|
47
|
+
return smartbi("OfficeReportService", "setParamValue", [
|
|
48
|
+
panelId,
|
|
49
|
+
paramId,
|
|
50
|
+
value,
|
|
51
|
+
displayValue
|
|
52
|
+
]);
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
//#endregion
|
|
56
|
+
export { closeReport, getParamDefaultValueByPID, getParamStandbyValue, openReport, setParamValue };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { W as TableField, a as CalcField, d as DataSource } from "../types-DOYMZhxT.js";
|
|
2
|
+
|
|
3
|
+
//#region src/service/OltpMetadataService.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* 获取计算字段对象的基本信息
|
|
6
|
+
* @param calcFieldById 计算字段ID
|
|
7
|
+
* @returns 返回计算字段对象
|
|
8
|
+
*/
|
|
9
|
+
declare const getCalcFieldById: (calcFieldById: string) => Promise<CalcField>;
|
|
10
|
+
/**
|
|
11
|
+
* 获取指定的数据源的详细信息
|
|
12
|
+
* @param dataSourceID 数据源连接的ID值
|
|
13
|
+
* @returns 返回数据源对象
|
|
14
|
+
*/
|
|
15
|
+
declare const getOltpDataSource: (dataSourceID: string) => Promise<DataSource>;
|
|
16
|
+
/**
|
|
17
|
+
* 获取指定的表的字段的详细信息,包括:数据类型、字段长度
|
|
18
|
+
* @param fieldId 表的字段
|
|
19
|
+
* @returns 返回表的字段的详细信息
|
|
20
|
+
*/
|
|
21
|
+
declare const getFieldAttribute: (fieldId: string) => Promise<TableField>;
|
|
22
|
+
//#endregion
|
|
23
|
+
export { getCalcFieldById, getFieldAttribute, getOltpDataSource };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { smartbi } from "../index.js";
|
|
2
|
+
|
|
3
|
+
//#region src/service/OltpMetadataService.ts
|
|
4
|
+
/**
|
|
5
|
+
* 获取计算字段对象的基本信息
|
|
6
|
+
* @param calcFieldById 计算字段ID
|
|
7
|
+
* @returns 返回计算字段对象
|
|
8
|
+
*/
|
|
9
|
+
const getCalcFieldById = (calcFieldById) => {
|
|
10
|
+
return smartbi("OltpMetadataService", "getCalcFieldById", [calcFieldById]);
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* 获取指定的数据源的详细信息
|
|
14
|
+
* @param dataSourceID 数据源连接的ID值
|
|
15
|
+
* @returns 返回数据源对象
|
|
16
|
+
*/
|
|
17
|
+
const getOltpDataSource = (dataSourceID) => {
|
|
18
|
+
return smartbi("OltpMetadataService", "getDataSource", [dataSourceID]);
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* 获取指定的表的字段的详细信息,包括:数据类型、字段长度
|
|
22
|
+
* @param fieldId 表的字段
|
|
23
|
+
* @returns 返回表的字段的详细信息
|
|
24
|
+
*/
|
|
25
|
+
const getFieldAttribute = (fieldId) => {
|
|
26
|
+
return smartbi("OltpMetadataService", "getFieldAttribute", [fieldId]);
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
//#endregion
|
|
30
|
+
export { getCalcFieldById, getFieldAttribute, getOltpDataSource };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
//#region src/service/ParameterService.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* 根据参数ID获取参数默认值SQL语句
|
|
4
|
+
* @param paramId 参数ID
|
|
5
|
+
* @returns 返回SQL语句
|
|
6
|
+
*/
|
|
7
|
+
declare const getParameterDefaultSQLById: (paramId: string) => Promise<string>;
|
|
8
|
+
/**
|
|
9
|
+
* 根据参数ID获取参数备选值SQL语句
|
|
10
|
+
* @param paramId 参数ID
|
|
11
|
+
* @returns 返回SQL语句
|
|
12
|
+
*/
|
|
13
|
+
declare const getParameterStandbySQLById: (paramId: string) => Promise<string>;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { getParameterDefaultSQLById, getParameterStandbySQLById };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { smartbi } from "../index.js";
|
|
2
|
+
|
|
3
|
+
//#region src/service/ParameterService.ts
|
|
4
|
+
/**
|
|
5
|
+
* 根据参数ID获取参数默认值SQL语句
|
|
6
|
+
* @param paramId 参数ID
|
|
7
|
+
* @returns 返回SQL语句
|
|
8
|
+
*/
|
|
9
|
+
const getParameterDefaultSQLById = (paramId) => {
|
|
10
|
+
return smartbi("ParameterService", "getParameterDefaultSQLById", [paramId]);
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* 根据参数ID获取参数备选值SQL语句
|
|
14
|
+
* @param paramId 参数ID
|
|
15
|
+
* @returns 返回SQL语句
|
|
16
|
+
*/
|
|
17
|
+
const getParameterStandbySQLById = (paramId) => {
|
|
18
|
+
return smartbi("ParameterService", "getParameterStandbySQLById", [paramId]);
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
//#endregion
|
|
22
|
+
export { getParameterDefaultSQLById, getParameterStandbySQLById };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//#region src/service/PoolService.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* 清除所有连接池
|
|
4
|
+
* @returns 无返回值
|
|
5
|
+
*/
|
|
6
|
+
declare const clearAllPools: () => Promise<void>;
|
|
7
|
+
/**
|
|
8
|
+
* 根据连接池名称清除连接池
|
|
9
|
+
* @param poolName 连接池名称
|
|
10
|
+
* @returns 无返回值
|
|
11
|
+
*/
|
|
12
|
+
declare const clearPoolByName: (poolName: string) => Promise<void>;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { clearAllPools, clearPoolByName };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { smartbi } from "../index.js";
|
|
2
|
+
|
|
3
|
+
//#region src/service/PoolService.ts
|
|
4
|
+
/**
|
|
5
|
+
* 清除所有连接池
|
|
6
|
+
* @returns 无返回值
|
|
7
|
+
*/
|
|
8
|
+
const clearAllPools = () => {
|
|
9
|
+
return smartbi("PoolService", "clearAllPools", []);
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* 根据连接池名称清除连接池
|
|
13
|
+
* @param poolName 连接池名称
|
|
14
|
+
* @returns 无返回值
|
|
15
|
+
*/
|
|
16
|
+
const clearPoolByName = (poolName) => {
|
|
17
|
+
return smartbi("PoolService", "clearPoolByName", [poolName]);
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
//#endregion
|
|
21
|
+
export { clearAllPools, clearPoolByName };
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { D as NameValuePair, j as Parameter } from "../types-DOYMZhxT.js";
|
|
2
|
+
|
|
3
|
+
//#region src/service/PortalService.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* 打开整个页面
|
|
6
|
+
* @param pageId 页面ID
|
|
7
|
+
* @returns 返回客户端ID
|
|
8
|
+
*/
|
|
9
|
+
declare const openEntirePage: (pageId: string) => Promise<string>;
|
|
10
|
+
/**
|
|
11
|
+
* 执行页面中所有的查询
|
|
12
|
+
* @param clientId 客户端ID
|
|
13
|
+
* @param portletType 组件类型
|
|
14
|
+
* @returns 无返回值
|
|
15
|
+
*/
|
|
16
|
+
declare const excuteAllQueryInPage: (clientId: string, portletType: string[]) => Promise<void>;
|
|
17
|
+
/**
|
|
18
|
+
* 关闭整个页面
|
|
19
|
+
* @param clientId 客户端ID
|
|
20
|
+
* @returns 无返回值
|
|
21
|
+
*/
|
|
22
|
+
declare const closeEntirePage: (clientId: string) => Promise<void>;
|
|
23
|
+
/**
|
|
24
|
+
* 导出页面
|
|
25
|
+
* @param clientId 客户端ID
|
|
26
|
+
* @param exportType 导出类型
|
|
27
|
+
* @param pageWidth 页面大小
|
|
28
|
+
* @param os 输出流
|
|
29
|
+
* @param postData 可选参数 - 参数
|
|
30
|
+
* @returns 无返回值
|
|
31
|
+
*/
|
|
32
|
+
declare const doExport: (clientId: string, exportType: string, pageWidth: number, os: any, postData?: string) => Promise<void>;
|
|
33
|
+
/**
|
|
34
|
+
* 根据参数ID获取参数默认值
|
|
35
|
+
* @param clientId 客户端ID
|
|
36
|
+
* @param paramId 参数ID
|
|
37
|
+
* @returns 返回参数默认值
|
|
38
|
+
*/
|
|
39
|
+
declare const getParamDefaultValue: (clientId: string, paramId: string) => Promise<string>;
|
|
40
|
+
/**
|
|
41
|
+
* 根据参数ID获取参数默认值列表
|
|
42
|
+
* @param clientId 客户端ID
|
|
43
|
+
* @param paramId 参数ID
|
|
44
|
+
* @returns 返回参数默认值列表
|
|
45
|
+
*/
|
|
46
|
+
declare const getParamDefaultValues: (clientId: string, paramId: string) => Promise<string[]>;
|
|
47
|
+
/**
|
|
48
|
+
* 设置参数值
|
|
49
|
+
* @param clientId 客户端ID
|
|
50
|
+
* @param paramId 参数ID
|
|
51
|
+
* @param paramValue 参数值
|
|
52
|
+
* @param paramDisplayValue 参数显示值
|
|
53
|
+
* @returns 无返回值
|
|
54
|
+
*/
|
|
55
|
+
declare const setParamValue: (clientId: string, paramId: string, paramValue: string, paramDisplayValue: string) => Promise<void>;
|
|
56
|
+
/**
|
|
57
|
+
* 获取页面的参数列表
|
|
58
|
+
* @param pageId 页面ID
|
|
59
|
+
* @returns 返回参数列表
|
|
60
|
+
*/
|
|
61
|
+
declare const getParameters: (pageId: string) => Promise<Parameter[]>;
|
|
62
|
+
/**
|
|
63
|
+
* 获取参数备选值
|
|
64
|
+
* @param clientId 客户端ID
|
|
65
|
+
* @param paramId 参数ID
|
|
66
|
+
* @returns 返回参数标准值
|
|
67
|
+
*/
|
|
68
|
+
declare const getParamStandbyValue: (clientId: string, paramId: string) => Promise<NameValuePair[]>;
|
|
69
|
+
//#endregion
|
|
70
|
+
export { closeEntirePage, doExport, excuteAllQueryInPage, getParamDefaultValue, getParamDefaultValues, getParamStandbyValue, getParameters, openEntirePage, setParamValue };
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { smartbi } from "../index.js";
|
|
2
|
+
|
|
3
|
+
//#region src/service/PortalService.ts
|
|
4
|
+
/**
|
|
5
|
+
* 打开整个页面
|
|
6
|
+
* @param pageId 页面ID
|
|
7
|
+
* @returns 返回客户端ID
|
|
8
|
+
*/
|
|
9
|
+
const openEntirePage = (pageId) => {
|
|
10
|
+
return smartbi("PortalService", "openEntirePage", [pageId]);
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* 执行页面中所有的查询
|
|
14
|
+
* @param clientId 客户端ID
|
|
15
|
+
* @param portletType 组件类型
|
|
16
|
+
* @returns 无返回值
|
|
17
|
+
*/
|
|
18
|
+
const excuteAllQueryInPage = (clientId, portletType) => {
|
|
19
|
+
return smartbi("PortalService", "excuteAllQueryInPage", [clientId, portletType.toString()]);
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* 关闭整个页面
|
|
23
|
+
* @param clientId 客户端ID
|
|
24
|
+
* @returns 无返回值
|
|
25
|
+
*/
|
|
26
|
+
const closeEntirePage = (clientId) => {
|
|
27
|
+
return smartbi("PortalService", "closeEntirePage", [clientId]);
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* 导出页面
|
|
31
|
+
* @param clientId 客户端ID
|
|
32
|
+
* @param exportType 导出类型
|
|
33
|
+
* @param pageWidth 页面大小
|
|
34
|
+
* @param os 输出流
|
|
35
|
+
* @param postData 可选参数 - 参数
|
|
36
|
+
* @returns 无返回值
|
|
37
|
+
*/
|
|
38
|
+
const doExport = (clientId, exportType, pageWidth, os, postData) => {
|
|
39
|
+
if (postData !== void 0) return smartbi("PortalService", "doExport", [
|
|
40
|
+
clientId,
|
|
41
|
+
exportType,
|
|
42
|
+
pageWidth,
|
|
43
|
+
os,
|
|
44
|
+
postData
|
|
45
|
+
]);
|
|
46
|
+
else return smartbi("PortalService", "doExport", [
|
|
47
|
+
clientId,
|
|
48
|
+
exportType,
|
|
49
|
+
pageWidth,
|
|
50
|
+
os
|
|
51
|
+
]);
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* 根据参数ID获取参数默认值
|
|
55
|
+
* @param clientId 客户端ID
|
|
56
|
+
* @param paramId 参数ID
|
|
57
|
+
* @returns 返回参数默认值
|
|
58
|
+
*/
|
|
59
|
+
const getParamDefaultValue = (clientId, paramId) => {
|
|
60
|
+
return smartbi("PortalService", "getParamDefaultValue", [clientId, paramId]);
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* 根据参数ID获取参数默认值列表
|
|
64
|
+
* @param clientId 客户端ID
|
|
65
|
+
* @param paramId 参数ID
|
|
66
|
+
* @returns 返回参数默认值列表
|
|
67
|
+
*/
|
|
68
|
+
const getParamDefaultValues = (clientId, paramId) => {
|
|
69
|
+
return smartbi("PortalService", "getParamDefaultValues", [clientId, paramId]);
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* 设置参数值
|
|
73
|
+
* @param clientId 客户端ID
|
|
74
|
+
* @param paramId 参数ID
|
|
75
|
+
* @param paramValue 参数值
|
|
76
|
+
* @param paramDisplayValue 参数显示值
|
|
77
|
+
* @returns 无返回值
|
|
78
|
+
*/
|
|
79
|
+
const setParamValue = (clientId, paramId, paramValue, paramDisplayValue) => {
|
|
80
|
+
return smartbi("PortalService", "setParamValue", [
|
|
81
|
+
clientId,
|
|
82
|
+
paramId,
|
|
83
|
+
paramValue,
|
|
84
|
+
paramDisplayValue
|
|
85
|
+
]);
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* 获取页面的参数列表
|
|
89
|
+
* @param pageId 页面ID
|
|
90
|
+
* @returns 返回参数列表
|
|
91
|
+
*/
|
|
92
|
+
const getParameters = (pageId) => {
|
|
93
|
+
return smartbi("PortalService", "getParameters", [pageId]);
|
|
94
|
+
};
|
|
95
|
+
/**
|
|
96
|
+
* 获取参数备选值
|
|
97
|
+
* @param clientId 客户端ID
|
|
98
|
+
* @param paramId 参数ID
|
|
99
|
+
* @returns 返回参数标准值
|
|
100
|
+
*/
|
|
101
|
+
const getParamStandbyValue = (clientId, paramId) => {
|
|
102
|
+
return smartbi("PortalService", "getParamStandbyValue", [clientId, paramId]);
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
//#endregion
|
|
106
|
+
export { closeEntirePage, doExport, excuteAllQueryInPage, getParamDefaultValue, getParamDefaultValues, getParamStandbyValue, getParameters, openEntirePage, setParamValue };
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import { B as RunningInfo, F as ReportData, I as ReportExportType, u as CustomFilterDataBean } from "../types-DOYMZhxT.js";
|
|
2
|
+
|
|
3
|
+
//#region src/service/Report.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* 取得当前报表名
|
|
6
|
+
* @returns 当前报表名
|
|
7
|
+
*/
|
|
8
|
+
declare const getCurrentReportName: () => Promise<string>;
|
|
9
|
+
/**
|
|
10
|
+
* 取得每页行数
|
|
11
|
+
* @returns 每页行数
|
|
12
|
+
*/
|
|
13
|
+
declare const getRowsPerPage: () => Promise<number>;
|
|
14
|
+
/**
|
|
15
|
+
* 取得报表的参数信息
|
|
16
|
+
* @returns 参数列表
|
|
17
|
+
*/
|
|
18
|
+
declare const getReportParameters: () => Promise<any[]>;
|
|
19
|
+
/**
|
|
20
|
+
* 取得报表的字段信息
|
|
21
|
+
* @returns 字段列表
|
|
22
|
+
*/
|
|
23
|
+
declare const getReportFields: () => Promise<any[]>;
|
|
24
|
+
/**
|
|
25
|
+
* 打开一个报表
|
|
26
|
+
* @param reportId 报表ID
|
|
27
|
+
* @returns 无返回值
|
|
28
|
+
*/
|
|
29
|
+
declare const openReport: (reportId: string) => Promise<void>;
|
|
30
|
+
/**
|
|
31
|
+
* 打开一个报表(不初始化)
|
|
32
|
+
* @param reportId 报表ID
|
|
33
|
+
* @returns 无返回值
|
|
34
|
+
*/
|
|
35
|
+
declare const openReportWithoutInit: (reportId: string) => Promise<void>;
|
|
36
|
+
/**
|
|
37
|
+
* 执行报表
|
|
38
|
+
* @param rowsPerPage 指定每页行数
|
|
39
|
+
* @returns 报表总行数
|
|
40
|
+
*/
|
|
41
|
+
declare const executeReport: (rowsPerPage: number) => Promise<number>;
|
|
42
|
+
/**
|
|
43
|
+
* 取得报表的指定页
|
|
44
|
+
* @param pageIndex 页码
|
|
45
|
+
* @returns 报表数据
|
|
46
|
+
*/
|
|
47
|
+
declare const getPage: (pageIndex: number) => Promise<ReportData>;
|
|
48
|
+
/**
|
|
49
|
+
* 关闭报表
|
|
50
|
+
* @returns 无返回值
|
|
51
|
+
*/
|
|
52
|
+
declare const closeReport: () => Promise<void>;
|
|
53
|
+
/**
|
|
54
|
+
* 设置参数值(仅值)
|
|
55
|
+
* @param paramId 参数ID
|
|
56
|
+
* @param paramValue 参数值
|
|
57
|
+
* @returns 无返回值
|
|
58
|
+
*/
|
|
59
|
+
declare const setReportParamValueOnly: (paramId: string, paramValue: string) => Promise<void>;
|
|
60
|
+
/**
|
|
61
|
+
* 设置参数值
|
|
62
|
+
* @param paramId 参数ID
|
|
63
|
+
* @param paramValue 参数值
|
|
64
|
+
* @param displayValue 参数显示值
|
|
65
|
+
* @returns 无返回值
|
|
66
|
+
*/
|
|
67
|
+
declare const setReportParamValue: (paramId: string, paramValue: string, displayValue: string) => Promise<void>;
|
|
68
|
+
/**
|
|
69
|
+
* 导出报表(基础版)
|
|
70
|
+
* @param type 指定导出类型 EXCEL, TXT, CSV
|
|
71
|
+
* @param delimiter 指定分割符(EXCEL类型不需要)
|
|
72
|
+
* @param maxRow 指定最大行数
|
|
73
|
+
* @param os 指定报表输出流
|
|
74
|
+
* @returns 无返回值
|
|
75
|
+
*/
|
|
76
|
+
declare const doExport: (type: ReportExportType | string, delimiter: string, maxRow: string, os: any) => Promise<void>;
|
|
77
|
+
/**
|
|
78
|
+
* 导出报表(带资源路径)
|
|
79
|
+
* @param type 指定导出类型 EXCEL, TXT, CSV
|
|
80
|
+
* @param delimiter 指定分割符(EXCEL类型不需要)
|
|
81
|
+
* @param maxRow 指定最大行数
|
|
82
|
+
* @param os 指定报表输出流
|
|
83
|
+
* @param resourceBasePath 资源基础路径
|
|
84
|
+
* @returns 无返回值
|
|
85
|
+
*/
|
|
86
|
+
declare const doExportWithResourcePath: (type: ReportExportType | string, delimiter: string, maxRow: string, os: any, resourceBasePath: string) => Promise<void>;
|
|
87
|
+
/**
|
|
88
|
+
* 导出报表(带值类型)
|
|
89
|
+
* @param type 指定导出类型 EXCEL, TXT, CSV
|
|
90
|
+
* @param delimiter 指定分割符(EXCEL类型不需要)
|
|
91
|
+
* @param maxRow 指定最大行数
|
|
92
|
+
* @param os 指定报表输出流
|
|
93
|
+
* @param resourceBasePath 资源基础路径
|
|
94
|
+
* @param valueType 值类型
|
|
95
|
+
* @returns 无返回值
|
|
96
|
+
*/
|
|
97
|
+
declare const doExportWithValueType: (type: ReportExportType | string, delimiter: string, maxRow: string, os: any, resourceBasePath: string, valueType: string) => Promise<void>;
|
|
98
|
+
/**
|
|
99
|
+
* 导出报表(完整版)
|
|
100
|
+
* @param type 指定导出类型 EXCEL, TXT, CSV
|
|
101
|
+
* @param delimiter 指定分割符(EXCEL类型不需要)
|
|
102
|
+
* @param maxRow 指定最大行数
|
|
103
|
+
* @param os 指定报表输出流
|
|
104
|
+
* @param resourceBasePath 资源基础路径
|
|
105
|
+
* @param valueType 值类型
|
|
106
|
+
* @param postData 数据
|
|
107
|
+
* @returns 无返回值
|
|
108
|
+
*/
|
|
109
|
+
declare const doExportFull: (type: ReportExportType | string, delimiter: string, maxRow: string, os: any, resourceBasePath: string, valueType: string, postData: string) => Promise<void>;
|
|
110
|
+
/**
|
|
111
|
+
* 指定某个字段的排序方式
|
|
112
|
+
* @param fieldId 字段ID
|
|
113
|
+
* @param orderType 排序方式 ASC, DESC, NONE
|
|
114
|
+
* @returns 无返回值
|
|
115
|
+
*/
|
|
116
|
+
declare const setReportOrderByType: (fieldId: string, orderType: string) => Promise<void>;
|
|
117
|
+
/**
|
|
118
|
+
* 指定某个字段的聚合方式
|
|
119
|
+
* @param fieldId 字段ID
|
|
120
|
+
* @param aggregate 聚合方式
|
|
121
|
+
* @returns 无返回值
|
|
122
|
+
*/
|
|
123
|
+
declare const setReportFieldAggregate: (fieldId: string, aggregate: string) => Promise<void>;
|
|
124
|
+
/**
|
|
125
|
+
* 指定报表过滤条件
|
|
126
|
+
* @param fieldId 字段ID
|
|
127
|
+
* @param operator 操作符
|
|
128
|
+
* @param value 值
|
|
129
|
+
* @returns 无返回值
|
|
130
|
+
*/
|
|
131
|
+
declare const setReportAutoCondition: (fieldId: string, operator: string, value: string) => Promise<void>;
|
|
132
|
+
/**
|
|
133
|
+
* 设置自定义过滤条件
|
|
134
|
+
* @param filterData 过滤条件数据
|
|
135
|
+
* @returns 是否设置成功
|
|
136
|
+
*/
|
|
137
|
+
declare const setReportCustomCondition: (filterData: CustomFilterDataBean) => Promise<boolean>;
|
|
138
|
+
/**
|
|
139
|
+
* 读取报表数据
|
|
140
|
+
* @param reportId 报表ID
|
|
141
|
+
* @returns 无返回值
|
|
142
|
+
*/
|
|
143
|
+
declare const dumpReport: (reportId: string) => Promise<void>;
|
|
144
|
+
/**
|
|
145
|
+
* 修改报表
|
|
146
|
+
* @returns 无返回值
|
|
147
|
+
*/
|
|
148
|
+
declare const updateReportQuery: () => Promise<void>;
|
|
149
|
+
/**
|
|
150
|
+
* 获得某个参数的候选值列表
|
|
151
|
+
* @param paramId 参数ID
|
|
152
|
+
* @returns 参数的候选值列表
|
|
153
|
+
*/
|
|
154
|
+
declare const getReportParamStandbyValue: (paramId: string) => Promise<any[]>;
|
|
155
|
+
/**
|
|
156
|
+
* 获取执行状态
|
|
157
|
+
* @returns 执行状态
|
|
158
|
+
*/
|
|
159
|
+
declare const getReportExecutingState: () => Promise<RunningInfo>;
|
|
160
|
+
/**
|
|
161
|
+
* 把报表查询结果复制在另一张新的报表中
|
|
162
|
+
* @param reportId 报表ID
|
|
163
|
+
* @param parentNodeId 父节点ID
|
|
164
|
+
* @param name 名称
|
|
165
|
+
* @param alias 别名
|
|
166
|
+
* @param desc 描述
|
|
167
|
+
* @returns 新的报表ID
|
|
168
|
+
*/
|
|
169
|
+
declare const cloneReportQuery: (reportId: string, parentNodeId: string, name: string, alias: string, desc: string) => Promise<string>;
|
|
170
|
+
/**
|
|
171
|
+
* 获取客户端配置
|
|
172
|
+
* @returns 客户端配置
|
|
173
|
+
*/
|
|
174
|
+
declare const getReportClientConfig: () => Promise<string>;
|
|
175
|
+
/**
|
|
176
|
+
* 设置客户端配置
|
|
177
|
+
* @param clientConfig 客户端配置
|
|
178
|
+
* @returns 无返回值
|
|
179
|
+
*/
|
|
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 };
|