smartbi-toolkit 1.0.1 → 1.1.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.
Files changed (69) hide show
  1. package/README.md +41 -0
  2. package/dist/index.d.ts +2 -2
  3. package/dist/index.js +99 -0
  4. package/dist/main.d.ts +0 -1
  5. package/dist/main.js +18 -0
  6. package/dist/methods/AnalysisReportService.d.ts +93 -0
  7. package/dist/methods/AnalysisReportService.js +126 -0
  8. package/dist/methods/BusinessThemeService.d.ts +8 -0
  9. package/dist/methods/BusinessThemeService.js +11 -0
  10. package/dist/methods/BusinessViewService.d.ts +94 -0
  11. package/dist/methods/BusinessViewService.js +120 -0
  12. package/dist/methods/CatalogService.d.ts +1 -89
  13. package/dist/methods/CatalogService.js +224 -0
  14. package/dist/methods/ClientCombinedReportService.d.ts +63 -0
  15. package/dist/methods/ClientCombinedReportService.js +82 -0
  16. package/dist/methods/ClientInsightService.d.ts +83 -0
  17. package/dist/methods/ClientInsightService.js +107 -0
  18. package/dist/methods/ClientReportService.d.ts +162 -0
  19. package/dist/methods/ClientReportService.js +206 -0
  20. package/dist/methods/CombinedReportService.d.ts +7 -0
  21. package/dist/methods/CombinedReportService.js +10 -0
  22. package/dist/methods/DataSourceService.d.ts +178 -0
  23. package/dist/methods/DataSourceService.js +220 -0
  24. package/dist/methods/GraphicReportService.d.ts +6 -0
  25. package/dist/methods/GraphicReportService.js +10 -0
  26. package/dist/methods/InsightReport.d.ts +71 -0
  27. package/dist/methods/InsightReport.js +98 -0
  28. package/dist/methods/MetadataService.d.ts +37 -0
  29. package/dist/methods/MetadataService.js +47 -0
  30. package/dist/methods/OfficeReport.d.ts +49 -0
  31. package/dist/methods/OfficeReport.js +65 -0
  32. package/dist/methods/OfficeReportService.d.ts +36 -0
  33. package/dist/methods/OfficeReportService.js +46 -0
  34. package/dist/methods/OltpMetadataService.d.ts +19 -0
  35. package/dist/methods/OltpMetadataService.js +25 -0
  36. package/dist/methods/ParameterService.d.ts +12 -0
  37. package/dist/methods/ParameterService.js +18 -0
  38. package/dist/methods/PoolService.d.ts +11 -0
  39. package/dist/methods/PoolService.js +17 -0
  40. package/dist/methods/PortalService.d.ts +66 -0
  41. package/dist/methods/PortalService.js +89 -0
  42. package/dist/methods/Report.d.ts +178 -0
  43. package/dist/methods/Report.js +230 -0
  44. package/dist/methods/SSReport.d.ts +86 -0
  45. package/dist/methods/SSReport.js +114 -0
  46. package/dist/methods/ScheduleTaskService.d.ts +12 -0
  47. package/dist/methods/ScheduleTaskService.js +18 -0
  48. package/dist/methods/SimpleReportService.d.ts +12 -0
  49. package/dist/methods/SimpleReportService.js +18 -0
  50. package/dist/methods/SpreadSheetReportService.d.ts +43 -0
  51. package/dist/methods/SpreadSheetReportService.js +55 -0
  52. package/dist/methods/SystemConfigService.d.ts +28 -0
  53. package/dist/methods/SystemConfigService.js +24 -0
  54. package/dist/methods/TimeConsuming.d.ts +6 -0
  55. package/dist/methods/TimeConsuming.js +9 -0
  56. package/dist/methods/TimeConsumingService.d.ts +5 -0
  57. package/dist/methods/TimeConsumingService.js +9 -0
  58. package/dist/methods/UserManagerService.d.ts +258 -0
  59. package/dist/methods/UserManagerService.js +332 -0
  60. package/dist/types.d.ts +442 -0
  61. package/dist/types.js +125 -0
  62. package/dist/vite-plugin-smartbi/index.d.ts +36 -0
  63. package/dist/vite-plugin-smartbi/index.js +107 -0
  64. package/package.json +129 -11
  65. package/dist/CatalogService.es.js +0 -112
  66. package/dist/SmartbiToolbox.es.js +0 -51
  67. package/dist/index.d.ts.map +0 -1
  68. package/dist/main.d.ts.map +0 -1
  69. package/dist/methods/CatalogService.d.ts.map +0 -1
@@ -0,0 +1,19 @@
1
+ import type { CalcField, TableField, DataSource } from '../types';
2
+ /**
3
+ * 获取计算字段对象的基本信息
4
+ * @param calcFieldById 计算字段ID
5
+ * @returns 返回计算字段对象
6
+ */
7
+ export declare const getCalcFieldById: (calcFieldById: string) => Promise<CalcField>;
8
+ /**
9
+ * 获取指定的数据源的详细信息
10
+ * @param dataSourceID 数据源连接的ID值
11
+ * @returns 返回数据源对象
12
+ */
13
+ export declare const getOltpDataSource: (dataSourceID: string) => Promise<DataSource>;
14
+ /**
15
+ * 获取指定的表的字段的详细信息,包括:数据类型、字段长度
16
+ * @param fieldId 表的字段
17
+ * @returns 返回表的字段的详细信息
18
+ */
19
+ export declare const getFieldAttribute: (fieldId: string) => Promise<TableField>;
@@ -0,0 +1,25 @@
1
+ import { smartbi } from "../index";
2
+ /**
3
+ * 获取计算字段对象的基本信息
4
+ * @param calcFieldById 计算字段ID
5
+ * @returns 返回计算字段对象
6
+ */
7
+ export const getCalcFieldById = (calcFieldById) => {
8
+ return smartbi('OltpMetadataService', 'getCalcFieldById', [calcFieldById]);
9
+ };
10
+ /**
11
+ * 获取指定的数据源的详细信息
12
+ * @param dataSourceID 数据源连接的ID值
13
+ * @returns 返回数据源对象
14
+ */
15
+ export const getOltpDataSource = (dataSourceID) => {
16
+ return smartbi('OltpMetadataService', 'getDataSource', [dataSourceID]);
17
+ };
18
+ /**
19
+ * 获取指定的表的字段的详细信息,包括:数据类型、字段长度
20
+ * @param fieldId 表的字段
21
+ * @returns 返回表的字段的详细信息
22
+ */
23
+ export const getFieldAttribute = (fieldId) => {
24
+ return smartbi('OltpMetadataService', 'getFieldAttribute', [fieldId]);
25
+ };
@@ -0,0 +1,12 @@
1
+ /**
2
+ * 根据参数ID获取参数默认值SQL语句
3
+ * @param paramId 参数ID
4
+ * @returns 返回SQL语句
5
+ */
6
+ export declare const getParameterDefaultSQLById: (paramId: string) => Promise<string>;
7
+ /**
8
+ * 根据参数ID获取参数备选值SQL语句
9
+ * @param paramId 参数ID
10
+ * @returns 返回SQL语句
11
+ */
12
+ export declare const getParameterStandbySQLById: (paramId: string) => Promise<string>;
@@ -0,0 +1,18 @@
1
+ // 定义SmartBI参数服务相关的类型接口
2
+ import { smartbi } from "../index";
3
+ /**
4
+ * 根据参数ID获取参数默认值SQL语句
5
+ * @param paramId 参数ID
6
+ * @returns 返回SQL语句
7
+ */
8
+ export const getParameterDefaultSQLById = (paramId) => {
9
+ return smartbi('ParameterService', 'getParameterDefaultSQLById', [paramId]);
10
+ };
11
+ /**
12
+ * 根据参数ID获取参数备选值SQL语句
13
+ * @param paramId 参数ID
14
+ * @returns 返回SQL语句
15
+ */
16
+ export const getParameterStandbySQLById = (paramId) => {
17
+ return smartbi('ParameterService', 'getParameterStandbySQLById', [paramId]);
18
+ };
@@ -0,0 +1,11 @@
1
+ /**
2
+ * 清除所有连接池
3
+ * @returns 无返回值
4
+ */
5
+ export declare const clearAllPools: () => Promise<void>;
6
+ /**
7
+ * 根据连接池名称清除连接池
8
+ * @param poolName 连接池名称
9
+ * @returns 无返回值
10
+ */
11
+ export declare const clearPoolByName: (poolName: string) => Promise<void>;
@@ -0,0 +1,17 @@
1
+ // 定义SmartBI连接池服务相关的类型接口
2
+ import { smartbi } from "../index";
3
+ /**
4
+ * 清除所有连接池
5
+ * @returns 无返回值
6
+ */
7
+ export const clearAllPools = () => {
8
+ return smartbi('PoolService', 'clearAllPools', []);
9
+ };
10
+ /**
11
+ * 根据连接池名称清除连接池
12
+ * @param poolName 连接池名称
13
+ * @returns 无返回值
14
+ */
15
+ export const clearPoolByName = (poolName) => {
16
+ return smartbi('PoolService', 'clearPoolByName', [poolName]);
17
+ };
@@ -0,0 +1,66 @@
1
+ import type { Parameter, NameValuePair } from '../types';
2
+ /**
3
+ * 打开整个页面
4
+ * @param pageId 页面ID
5
+ * @returns 返回客户端ID
6
+ */
7
+ export declare const openEntirePage: (pageId: string) => Promise<string>;
8
+ /**
9
+ * 执行页面中所有的查询
10
+ * @param clientId 客户端ID
11
+ * @param portletType 组件类型
12
+ * @returns 无返回值
13
+ */
14
+ export declare const excuteAllQueryInPage: (clientId: string, portletType: string[]) => Promise<void>;
15
+ /**
16
+ * 关闭整个页面
17
+ * @param clientId 客户端ID
18
+ * @returns 无返回值
19
+ */
20
+ export declare const closeEntirePage: (clientId: string) => Promise<void>;
21
+ /**
22
+ * 导出页面
23
+ * @param clientId 客户端ID
24
+ * @param exportType 导出类型
25
+ * @param pageWidth 页面大小
26
+ * @param os 输出流
27
+ * @param postData 可选参数 - 参数
28
+ * @returns 无返回值
29
+ */
30
+ export declare const doExport: (clientId: string, exportType: string, pageWidth: number, os: any, postData?: string) => Promise<void>;
31
+ /**
32
+ * 根据参数ID获取参数默认值
33
+ * @param clientId 客户端ID
34
+ * @param paramId 参数ID
35
+ * @returns 返回参数默认值
36
+ */
37
+ export declare const getParamDefaultValue: (clientId: string, paramId: string) => Promise<string>;
38
+ /**
39
+ * 根据参数ID获取参数默认值列表
40
+ * @param clientId 客户端ID
41
+ * @param paramId 参数ID
42
+ * @returns 返回参数默认值列表
43
+ */
44
+ export declare const getParamDefaultValues: (clientId: string, paramId: string) => Promise<string[]>;
45
+ /**
46
+ * 设置参数值
47
+ * @param clientId 客户端ID
48
+ * @param paramId 参数ID
49
+ * @param paramValue 参数值
50
+ * @param paramDisplayValue 参数显示值
51
+ * @returns 无返回值
52
+ */
53
+ export declare const setParamValue: (clientId: string, paramId: string, paramValue: string, paramDisplayValue: string) => Promise<void>;
54
+ /**
55
+ * 获取页面的参数列表
56
+ * @param pageId 页面ID
57
+ * @returns 返回参数列表
58
+ */
59
+ export declare const getParameters: (pageId: string) => Promise<Parameter[]>;
60
+ /**
61
+ * 获取参数备选值
62
+ * @param clientId 客户端ID
63
+ * @param paramId 参数ID
64
+ * @returns 返回参数标准值
65
+ */
66
+ export declare const getParamStandbyValue: (clientId: string, paramId: string) => Promise<NameValuePair[]>;
@@ -0,0 +1,89 @@
1
+ import { smartbi } from "../index";
2
+ /**
3
+ * 打开整个页面
4
+ * @param pageId 页面ID
5
+ * @returns 返回客户端ID
6
+ */
7
+ export const openEntirePage = (pageId) => {
8
+ return smartbi('PortalService', 'openEntirePage', [pageId]);
9
+ };
10
+ /**
11
+ * 执行页面中所有的查询
12
+ * @param clientId 客户端ID
13
+ * @param portletType 组件类型
14
+ * @returns 无返回值
15
+ */
16
+ export const excuteAllQueryInPage = (clientId, portletType) => {
17
+ return smartbi('PortalService', 'excuteAllQueryInPage', [clientId, portletType.toString()]);
18
+ };
19
+ /**
20
+ * 关闭整个页面
21
+ * @param clientId 客户端ID
22
+ * @returns 无返回值
23
+ */
24
+ export const closeEntirePage = (clientId) => {
25
+ return smartbi('PortalService', 'closeEntirePage', [clientId]);
26
+ };
27
+ /**
28
+ * 导出页面
29
+ * @param clientId 客户端ID
30
+ * @param exportType 导出类型
31
+ * @param pageWidth 页面大小
32
+ * @param os 输出流
33
+ * @param postData 可选参数 - 参数
34
+ * @returns 无返回值
35
+ */
36
+ export const doExport = (clientId, exportType, pageWidth, os, postData) => {
37
+ if (postData !== undefined) {
38
+ return smartbi('PortalService', 'doExport', [clientId, exportType, pageWidth, os, postData]);
39
+ }
40
+ else {
41
+ return smartbi('PortalService', 'doExport', [clientId, exportType, pageWidth, os]);
42
+ }
43
+ };
44
+ /**
45
+ * 根据参数ID获取参数默认值
46
+ * @param clientId 客户端ID
47
+ * @param paramId 参数ID
48
+ * @returns 返回参数默认值
49
+ */
50
+ export const getParamDefaultValue = (clientId, paramId) => {
51
+ return smartbi('PortalService', 'getParamDefaultValue', [clientId, paramId]);
52
+ };
53
+ /**
54
+ * 根据参数ID获取参数默认值列表
55
+ * @param clientId 客户端ID
56
+ * @param paramId 参数ID
57
+ * @returns 返回参数默认值列表
58
+ */
59
+ export const getParamDefaultValues = (clientId, paramId) => {
60
+ return smartbi('PortalService', 'getParamDefaultValues', [clientId, paramId]);
61
+ };
62
+ /**
63
+ * 设置参数值
64
+ * @param clientId 客户端ID
65
+ * @param paramId 参数ID
66
+ * @param paramValue 参数值
67
+ * @param paramDisplayValue 参数显示值
68
+ * @returns 无返回值
69
+ */
70
+ export const setParamValue = (clientId, paramId, paramValue, paramDisplayValue) => {
71
+ return smartbi('PortalService', 'setParamValue', [clientId, paramId, paramValue, paramDisplayValue]);
72
+ };
73
+ /**
74
+ * 获取页面的参数列表
75
+ * @param pageId 页面ID
76
+ * @returns 返回参数列表
77
+ */
78
+ export const getParameters = (pageId) => {
79
+ return smartbi('PortalService', 'getParameters', [pageId]);
80
+ };
81
+ /**
82
+ * 获取参数备选值
83
+ * @param clientId 客户端ID
84
+ * @param paramId 参数ID
85
+ * @returns 返回参数标准值
86
+ */
87
+ export const getParamStandbyValue = (clientId, paramId) => {
88
+ return smartbi('PortalService', 'getParamStandbyValue', [clientId, paramId]);
89
+ };
@@ -0,0 +1,178 @@
1
+ import type { CustomFilterDataBean, ReportData, ReportExportType, RunningInfo } from '../types';
2
+ /**
3
+ * 取得当前报表名
4
+ * @returns 当前报表名
5
+ */
6
+ export declare const getCurrentReportName: () => Promise<string>;
7
+ /**
8
+ * 取得每页行数
9
+ * @returns 每页行数
10
+ */
11
+ export declare const getRowsPerPage: () => Promise<number>;
12
+ /**
13
+ * 取得报表的参数信息
14
+ * @returns 参数列表
15
+ */
16
+ export declare const getReportParameters: () => Promise<any[]>;
17
+ /**
18
+ * 取得报表的字段信息
19
+ * @returns 字段列表
20
+ */
21
+ export declare const getReportFields: () => Promise<any[]>;
22
+ /**
23
+ * 打开一个报表
24
+ * @param reportId 报表ID
25
+ * @returns 无返回值
26
+ */
27
+ export declare const openReport: (reportId: string) => Promise<void>;
28
+ /**
29
+ * 打开一个报表(不初始化)
30
+ * @param reportId 报表ID
31
+ * @returns 无返回值
32
+ */
33
+ export declare const openReportWithoutInit: (reportId: string) => Promise<void>;
34
+ /**
35
+ * 执行报表
36
+ * @param rowsPerPage 指定每页行数
37
+ * @returns 报表总行数
38
+ */
39
+ export declare const executeReport: (rowsPerPage: number) => Promise<number>;
40
+ /**
41
+ * 取得报表的指定页
42
+ * @param pageIndex 页码
43
+ * @returns 报表数据
44
+ */
45
+ export declare const getPage: (pageIndex: number) => Promise<ReportData>;
46
+ /**
47
+ * 关闭报表
48
+ * @returns 无返回值
49
+ */
50
+ export declare const closeReport: () => Promise<void>;
51
+ /**
52
+ * 设置参数值(仅值)
53
+ * @param paramId 参数ID
54
+ * @param paramValue 参数值
55
+ * @returns 无返回值
56
+ */
57
+ export declare const setReportParamValueOnly: (paramId: string, paramValue: string) => Promise<void>;
58
+ /**
59
+ * 设置参数值
60
+ * @param paramId 参数ID
61
+ * @param paramValue 参数值
62
+ * @param displayValue 参数显示值
63
+ * @returns 无返回值
64
+ */
65
+ export declare const setReportParamValue: (paramId: string, paramValue: string, displayValue: string) => Promise<void>;
66
+ /**
67
+ * 导出报表(基础版)
68
+ * @param type 指定导出类型 EXCEL, TXT, CSV
69
+ * @param delimiter 指定分割符(EXCEL类型不需要)
70
+ * @param maxRow 指定最大行数
71
+ * @param os 指定报表输出流
72
+ * @returns 无返回值
73
+ */
74
+ export declare const doExport: (type: ReportExportType | string, delimiter: string, maxRow: string, os: any) => Promise<void>;
75
+ /**
76
+ * 导出报表(带资源路径)
77
+ * @param type 指定导出类型 EXCEL, TXT, CSV
78
+ * @param delimiter 指定分割符(EXCEL类型不需要)
79
+ * @param maxRow 指定最大行数
80
+ * @param os 指定报表输出流
81
+ * @param resourceBasePath 资源基础路径
82
+ * @returns 无返回值
83
+ */
84
+ export declare const doExportWithResourcePath: (type: ReportExportType | string, delimiter: string, maxRow: string, os: any, resourceBasePath: string) => Promise<void>;
85
+ /**
86
+ * 导出报表(带值类型)
87
+ * @param type 指定导出类型 EXCEL, TXT, CSV
88
+ * @param delimiter 指定分割符(EXCEL类型不需要)
89
+ * @param maxRow 指定最大行数
90
+ * @param os 指定报表输出流
91
+ * @param resourceBasePath 资源基础路径
92
+ * @param valueType 值类型
93
+ * @returns 无返回值
94
+ */
95
+ export declare const doExportWithValueType: (type: ReportExportType | string, delimiter: string, maxRow: string, os: any, resourceBasePath: string, valueType: string) => Promise<void>;
96
+ /**
97
+ * 导出报表(完整版)
98
+ * @param type 指定导出类型 EXCEL, TXT, CSV
99
+ * @param delimiter 指定分割符(EXCEL类型不需要)
100
+ * @param maxRow 指定最大行数
101
+ * @param os 指定报表输出流
102
+ * @param resourceBasePath 资源基础路径
103
+ * @param valueType 值类型
104
+ * @param postData 数据
105
+ * @returns 无返回值
106
+ */
107
+ export declare const doExportFull: (type: ReportExportType | string, delimiter: string, maxRow: string, os: any, resourceBasePath: string, valueType: string, postData: string) => Promise<void>;
108
+ /**
109
+ * 指定某个字段的排序方式
110
+ * @param fieldId 字段ID
111
+ * @param orderType 排序方式 ASC, DESC, NONE
112
+ * @returns 无返回值
113
+ */
114
+ export declare const setReportOrderByType: (fieldId: string, orderType: string) => Promise<void>;
115
+ /**
116
+ * 指定某个字段的聚合方式
117
+ * @param fieldId 字段ID
118
+ * @param aggregate 聚合方式
119
+ * @returns 无返回值
120
+ */
121
+ export declare const setReportFieldAggregate: (fieldId: string, aggregate: string) => Promise<void>;
122
+ /**
123
+ * 指定报表过滤条件
124
+ * @param fieldId 字段ID
125
+ * @param operator 操作符
126
+ * @param value 值
127
+ * @returns 无返回值
128
+ */
129
+ export declare const setReportAutoCondition: (fieldId: string, operator: string, value: string) => Promise<void>;
130
+ /**
131
+ * 设置自定义过滤条件
132
+ * @param filterData 过滤条件数据
133
+ * @returns 是否设置成功
134
+ */
135
+ export declare const setReportCustomCondition: (filterData: CustomFilterDataBean) => Promise<boolean>;
136
+ /**
137
+ * 读取报表数据
138
+ * @param reportId 报表ID
139
+ * @returns 无返回值
140
+ */
141
+ export declare const dumpReport: (reportId: string) => Promise<void>;
142
+ /**
143
+ * 修改报表
144
+ * @returns 无返回值
145
+ */
146
+ export declare const updateReportQuery: () => Promise<void>;
147
+ /**
148
+ * 获得某个参数的候选值列表
149
+ * @param paramId 参数ID
150
+ * @returns 参数的候选值列表
151
+ */
152
+ export declare const getReportParamStandbyValue: (paramId: string) => Promise<any[]>;
153
+ /**
154
+ * 获取执行状态
155
+ * @returns 执行状态
156
+ */
157
+ export declare const getReportExecutingState: () => Promise<RunningInfo>;
158
+ /**
159
+ * 把报表查询结果复制在另一张新的报表中
160
+ * @param reportId 报表ID
161
+ * @param parentNodeId 父节点ID
162
+ * @param name 名称
163
+ * @param alias 别名
164
+ * @param desc 描述
165
+ * @returns 新的报表ID
166
+ */
167
+ export declare const cloneReportQuery: (reportId: string, parentNodeId: string, name: string, alias: string, desc: string) => Promise<string>;
168
+ /**
169
+ * 获取客户端配置
170
+ * @returns 客户端配置
171
+ */
172
+ export declare const getReportClientConfig: () => Promise<string>;
173
+ /**
174
+ * 设置客户端配置
175
+ * @param clientConfig 客户端配置
176
+ * @returns 无返回值
177
+ */
178
+ export declare const setReportClientConfig: (clientConfig: string) => Promise<void>;
@@ -0,0 +1,230 @@
1
+ import { smartbi } from "../index";
2
+ /**
3
+ * 取得当前报表名
4
+ * @returns 当前报表名
5
+ */
6
+ export const getCurrentReportName = () => {
7
+ return smartbi('Report', 'getCurrentReportName', []);
8
+ };
9
+ /**
10
+ * 取得每页行数
11
+ * @returns 每页行数
12
+ */
13
+ export const getRowsPerPage = () => {
14
+ return smartbi('Report', 'getRowsPerPage', []);
15
+ };
16
+ /**
17
+ * 取得报表的参数信息
18
+ * @returns 参数列表
19
+ */
20
+ export const getReportParameters = () => {
21
+ return smartbi('Report', 'getParameters', []);
22
+ };
23
+ /**
24
+ * 取得报表的字段信息
25
+ * @returns 字段列表
26
+ */
27
+ export const getReportFields = () => {
28
+ return smartbi('Report', 'getFields', []);
29
+ };
30
+ /**
31
+ * 打开一个报表
32
+ * @param reportId 报表ID
33
+ * @returns 无返回值
34
+ */
35
+ export const openReport = (reportId) => {
36
+ return smartbi('Report', 'open', [reportId]);
37
+ };
38
+ /**
39
+ * 打开一个报表(不初始化)
40
+ * @param reportId 报表ID
41
+ * @returns 无返回值
42
+ */
43
+ export const openReportWithoutInit = (reportId) => {
44
+ return smartbi('Report', 'openWithoutInit', [reportId]);
45
+ };
46
+ /**
47
+ * 执行报表
48
+ * @param rowsPerPage 指定每页行数
49
+ * @returns 报表总行数
50
+ */
51
+ export const executeReport = (rowsPerPage) => {
52
+ return smartbi('Report', 'execute', [rowsPerPage]);
53
+ };
54
+ /**
55
+ * 取得报表的指定页
56
+ * @param pageIndex 页码
57
+ * @returns 报表数据
58
+ */
59
+ export const getPage = (pageIndex) => {
60
+ return smartbi('Report', 'getPage', [pageIndex]);
61
+ };
62
+ /**
63
+ * 关闭报表
64
+ * @returns 无返回值
65
+ */
66
+ export const closeReport = () => {
67
+ return smartbi('Report', 'close', []);
68
+ };
69
+ /**
70
+ * 设置参数值(仅值)
71
+ * @param paramId 参数ID
72
+ * @param paramValue 参数值
73
+ * @returns 无返回值
74
+ */
75
+ export const setReportParamValueOnly = (paramId, paramValue) => {
76
+ return smartbi('Report', 'setParamValue', [paramId, paramValue]);
77
+ };
78
+ /**
79
+ * 设置参数值
80
+ * @param paramId 参数ID
81
+ * @param paramValue 参数值
82
+ * @param displayValue 参数显示值
83
+ * @returns 无返回值
84
+ */
85
+ export const setReportParamValue = (paramId, paramValue, displayValue) => {
86
+ return smartbi('Report', 'setParamValue', [paramId, paramValue, displayValue]);
87
+ };
88
+ /**
89
+ * 导出报表(基础版)
90
+ * @param type 指定导出类型 EXCEL, TXT, CSV
91
+ * @param delimiter 指定分割符(EXCEL类型不需要)
92
+ * @param maxRow 指定最大行数
93
+ * @param os 指定报表输出流
94
+ * @returns 无返回值
95
+ */
96
+ export const doExport = (type, delimiter, maxRow, os) => {
97
+ return smartbi('Report', 'doExport', [type, delimiter, maxRow, os]);
98
+ };
99
+ /**
100
+ * 导出报表(带资源路径)
101
+ * @param type 指定导出类型 EXCEL, TXT, CSV
102
+ * @param delimiter 指定分割符(EXCEL类型不需要)
103
+ * @param maxRow 指定最大行数
104
+ * @param os 指定报表输出流
105
+ * @param resourceBasePath 资源基础路径
106
+ * @returns 无返回值
107
+ */
108
+ export const doExportWithResourcePath = (type, delimiter, maxRow, os, resourceBasePath) => {
109
+ return smartbi('Report', 'doExport', [type, delimiter, maxRow, os, resourceBasePath]);
110
+ };
111
+ /**
112
+ * 导出报表(带值类型)
113
+ * @param type 指定导出类型 EXCEL, TXT, CSV
114
+ * @param delimiter 指定分割符(EXCEL类型不需要)
115
+ * @param maxRow 指定最大行数
116
+ * @param os 指定报表输出流
117
+ * @param resourceBasePath 资源基础路径
118
+ * @param valueType 值类型
119
+ * @returns 无返回值
120
+ */
121
+ export const doExportWithValueType = (type, delimiter, maxRow, os, resourceBasePath, valueType) => {
122
+ return smartbi('Report', 'doExport', [type, delimiter, maxRow, os, resourceBasePath, valueType]);
123
+ };
124
+ /**
125
+ * 导出报表(完整版)
126
+ * @param type 指定导出类型 EXCEL, TXT, CSV
127
+ * @param delimiter 指定分割符(EXCEL类型不需要)
128
+ * @param maxRow 指定最大行数
129
+ * @param os 指定报表输出流
130
+ * @param resourceBasePath 资源基础路径
131
+ * @param valueType 值类型
132
+ * @param postData 数据
133
+ * @returns 无返回值
134
+ */
135
+ export const doExportFull = (type, delimiter, maxRow, os, resourceBasePath, valueType, postData) => {
136
+ return smartbi('Report', 'doExport', [type, delimiter, maxRow, os, resourceBasePath, valueType, postData]);
137
+ };
138
+ /**
139
+ * 指定某个字段的排序方式
140
+ * @param fieldId 字段ID
141
+ * @param orderType 排序方式 ASC, DESC, NONE
142
+ * @returns 无返回值
143
+ */
144
+ export const setReportOrderByType = (fieldId, orderType) => {
145
+ return smartbi('Report', 'setOrderByType', [fieldId, orderType]);
146
+ };
147
+ /**
148
+ * 指定某个字段的聚合方式
149
+ * @param fieldId 字段ID
150
+ * @param aggregate 聚合方式
151
+ * @returns 无返回值
152
+ */
153
+ export const setReportFieldAggregate = (fieldId, aggregate) => {
154
+ return smartbi('Report', 'setFieldAggregate', [fieldId, aggregate]);
155
+ };
156
+ /**
157
+ * 指定报表过滤条件
158
+ * @param fieldId 字段ID
159
+ * @param operator 操作符
160
+ * @param value 值
161
+ * @returns 无返回值
162
+ */
163
+ export const setReportAutoCondition = (fieldId, operator, value) => {
164
+ return smartbi('Report', 'setAutoCondition', [fieldId, operator, value]);
165
+ };
166
+ /**
167
+ * 设置自定义过滤条件
168
+ * @param filterData 过滤条件数据
169
+ * @returns 是否设置成功
170
+ */
171
+ export const setReportCustomCondition = (filterData) => {
172
+ return smartbi('Report', 'setCustomCondition', [filterData.toString()]);
173
+ };
174
+ /**
175
+ * 读取报表数据
176
+ * @param reportId 报表ID
177
+ * @returns 无返回值
178
+ */
179
+ export const dumpReport = (reportId) => {
180
+ return smartbi('Report', 'dump', [reportId]);
181
+ };
182
+ /**
183
+ * 修改报表
184
+ * @returns 无返回值
185
+ */
186
+ export const updateReportQuery = () => {
187
+ return smartbi('Report', 'updateQuery', []);
188
+ };
189
+ /**
190
+ * 获得某个参数的候选值列表
191
+ * @param paramId 参数ID
192
+ * @returns 参数的候选值列表
193
+ */
194
+ export const getReportParamStandbyValue = (paramId) => {
195
+ return smartbi('Report', 'getParamStandbyValue', [paramId]);
196
+ };
197
+ /**
198
+ * 获取执行状态
199
+ * @returns 执行状态
200
+ */
201
+ export const getReportExecutingState = () => {
202
+ return smartbi('Report', 'getExecutingState', []);
203
+ };
204
+ /**
205
+ * 把报表查询结果复制在另一张新的报表中
206
+ * @param reportId 报表ID
207
+ * @param parentNodeId 父节点ID
208
+ * @param name 名称
209
+ * @param alias 别名
210
+ * @param desc 描述
211
+ * @returns 新的报表ID
212
+ */
213
+ export const cloneReportQuery = (reportId, parentNodeId, name, alias, desc) => {
214
+ return smartbi('Report', 'cloneQuery', [reportId, parentNodeId, name, alias, desc]);
215
+ };
216
+ /**
217
+ * 获取客户端配置
218
+ * @returns 客户端配置
219
+ */
220
+ export const getReportClientConfig = () => {
221
+ return smartbi('Report', 'getClientConfig', []);
222
+ };
223
+ /**
224
+ * 设置客户端配置
225
+ * @param clientConfig 客户端配置
226
+ * @returns 无返回值
227
+ */
228
+ export const setReportClientConfig = (clientConfig) => {
229
+ return smartbi('Report', 'setClientConfig', [clientConfig]);
230
+ };