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.
- package/README.md +41 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +99 -0
- package/dist/main.d.ts +0 -1
- package/dist/main.js +18 -0
- package/dist/methods/AnalysisReportService.d.ts +93 -0
- package/dist/methods/AnalysisReportService.js +126 -0
- package/dist/methods/BusinessThemeService.d.ts +8 -0
- package/dist/methods/BusinessThemeService.js +11 -0
- package/dist/methods/BusinessViewService.d.ts +94 -0
- package/dist/methods/BusinessViewService.js +120 -0
- package/dist/methods/CatalogService.d.ts +1 -89
- package/dist/methods/CatalogService.js +224 -0
- package/dist/methods/ClientCombinedReportService.d.ts +63 -0
- package/dist/methods/ClientCombinedReportService.js +82 -0
- package/dist/methods/ClientInsightService.d.ts +83 -0
- package/dist/methods/ClientInsightService.js +107 -0
- package/dist/methods/ClientReportService.d.ts +162 -0
- package/dist/methods/ClientReportService.js +206 -0
- package/dist/methods/CombinedReportService.d.ts +7 -0
- package/dist/methods/CombinedReportService.js +10 -0
- package/dist/methods/DataSourceService.d.ts +178 -0
- package/dist/methods/DataSourceService.js +220 -0
- package/dist/methods/GraphicReportService.d.ts +6 -0
- package/dist/methods/GraphicReportService.js +10 -0
- package/dist/methods/InsightReport.d.ts +71 -0
- package/dist/methods/InsightReport.js +98 -0
- package/dist/methods/MetadataService.d.ts +37 -0
- package/dist/methods/MetadataService.js +47 -0
- package/dist/methods/OfficeReport.d.ts +49 -0
- package/dist/methods/OfficeReport.js +65 -0
- package/dist/methods/OfficeReportService.d.ts +36 -0
- package/dist/methods/OfficeReportService.js +46 -0
- package/dist/methods/OltpMetadataService.d.ts +19 -0
- package/dist/methods/OltpMetadataService.js +25 -0
- package/dist/methods/ParameterService.d.ts +12 -0
- package/dist/methods/ParameterService.js +18 -0
- package/dist/methods/PoolService.d.ts +11 -0
- package/dist/methods/PoolService.js +17 -0
- package/dist/methods/PortalService.d.ts +66 -0
- package/dist/methods/PortalService.js +89 -0
- package/dist/methods/Report.d.ts +178 -0
- package/dist/methods/Report.js +230 -0
- package/dist/methods/SSReport.d.ts +86 -0
- package/dist/methods/SSReport.js +114 -0
- package/dist/methods/ScheduleTaskService.d.ts +12 -0
- package/dist/methods/ScheduleTaskService.js +18 -0
- package/dist/methods/SimpleReportService.d.ts +12 -0
- package/dist/methods/SimpleReportService.js +18 -0
- package/dist/methods/SpreadSheetReportService.d.ts +43 -0
- package/dist/methods/SpreadSheetReportService.js +55 -0
- package/dist/methods/SystemConfigService.d.ts +28 -0
- package/dist/methods/SystemConfigService.js +24 -0
- package/dist/methods/TimeConsuming.d.ts +6 -0
- package/dist/methods/TimeConsuming.js +9 -0
- package/dist/methods/TimeConsumingService.d.ts +5 -0
- package/dist/methods/TimeConsumingService.js +9 -0
- package/dist/methods/UserManagerService.d.ts +258 -0
- package/dist/methods/UserManagerService.js +332 -0
- package/dist/types.d.ts +442 -0
- package/dist/types.js +125 -0
- package/dist/vite-plugin-smartbi/index.d.ts +36 -0
- package/dist/vite-plugin-smartbi/index.js +107 -0
- package/package.json +129 -11
- package/dist/CatalogService.es.js +0 -112
- package/dist/SmartbiToolbox.es.js +0 -51
- package/dist/index.d.ts.map +0 -1
- package/dist/main.d.ts.map +0 -1
- package/dist/methods/CatalogService.d.ts.map +0 -1
|
@@ -1,91 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
id: string;
|
|
3
|
-
name: string;
|
|
4
|
-
alias: string;
|
|
5
|
-
description?: string;
|
|
6
|
-
type: string;
|
|
7
|
-
parentId?: string;
|
|
8
|
-
children?: ICatalogElement[];
|
|
9
|
-
createTime?: Date;
|
|
10
|
-
updateTime?: Date;
|
|
11
|
-
[key: string]: any;
|
|
12
|
-
}
|
|
13
|
-
export interface IResourcePermission {
|
|
14
|
-
resourceId: string;
|
|
15
|
-
permissions: string[];
|
|
16
|
-
grantedBy: string;
|
|
17
|
-
grantTime: Date;
|
|
18
|
-
[key: string]: any;
|
|
19
|
-
}
|
|
20
|
-
export interface IResourcePermissionItem {
|
|
21
|
-
itemId: string;
|
|
22
|
-
itemName: string;
|
|
23
|
-
permissionType: string;
|
|
24
|
-
inherited: boolean;
|
|
25
|
-
[key: string]: any;
|
|
26
|
-
}
|
|
27
|
-
export interface ICatalogSearchResult {
|
|
28
|
-
id: string;
|
|
29
|
-
name: string;
|
|
30
|
-
alias: string;
|
|
31
|
-
type: string;
|
|
32
|
-
parentId: string;
|
|
33
|
-
score: number;
|
|
34
|
-
[key: string]: any;
|
|
35
|
-
}
|
|
36
|
-
export type AccessType = 'REF' | 'READ' | 'WRITE';
|
|
37
|
-
export declare const AccessType: {
|
|
38
|
-
REF: "REF";
|
|
39
|
-
READ: "READ";
|
|
40
|
-
WRITE: "WRITE";
|
|
41
|
-
};
|
|
42
|
-
export type CatalogElementType = 'FOLDER' | 'SIMPLE_REPORT' | 'ANALYSIS_REPORT' | 'COMBINED_QUERY' | 'INSIGHT' | 'OLAP_REPORT' | 'DASHBOARD' | 'SMARTBIX_PAGE' | 'DATASET' | 'VISUAL' | 'SQL' | 'PROCEDURE' | 'NATIVE_SQL' | 'JAVA' | 'SMARTBIX_DATASET' | 'AUGMENTED_DATASET' | 'BUSINESS_VIEW' | 'BUSINESS_SUBJECT' | 'BUSINESS_QUERY' | 'SPREADSHEET_REPORT' | 'WEB_SPREADSHEET_REPORT' | 'SMARTBI_DATAPROCESS' | 'ETL_AUTOMATION' | 'JOB_FLOW' | 'SMARTBI_MINING' | 'URL' | 'excelimport' | 'TXTQUERYOBJECT' | 'TXTDATASOURCE' | 'SCHEMA' | 'OLD_DATASET';
|
|
43
|
-
export declare const CatalogElementType: {
|
|
44
|
-
FOLDER: "FOLDER";
|
|
45
|
-
SIMPLE_REPORT: "SIMPLE_REPORT";
|
|
46
|
-
ANALYSIS_REPORT: "ANALYSIS_REPORT";
|
|
47
|
-
COMBINED_QUERY: "COMBINED_QUERY";
|
|
48
|
-
INSIGHT: "INSIGHT";
|
|
49
|
-
OLAP_REPORT: "OLAP_REPORT";
|
|
50
|
-
DASHBOARD: "DASHBOARD";
|
|
51
|
-
SMARTBIX_PAGE: "SMARTBIX_PAGE";
|
|
52
|
-
DATASET: "DATASET";
|
|
53
|
-
VISUAL: "VISUAL";
|
|
54
|
-
SQL: "SQL";
|
|
55
|
-
PROCEDURE: "PROCEDURE";
|
|
56
|
-
NATIVE_SQL: "NATIVE_SQL";
|
|
57
|
-
JAVA: "JAVA";
|
|
58
|
-
SMARTBIX_DATASET: "SMARTBIX_DATASET";
|
|
59
|
-
AUGMENTED_DATASET: "AUGMENTED_DATASET";
|
|
60
|
-
BUSINESS_VIEW: "BUSINESS_VIEW";
|
|
61
|
-
BUSINESS_SUBJECT: "BUSINESS_SUBJECT";
|
|
62
|
-
BUSINESS_QUERY: "BUSINESS_QUERY";
|
|
63
|
-
SPREADSHEET_REPORT: "SPREADSHEET_REPORT";
|
|
64
|
-
WEB_SPREADSHEET_REPORT: "WEB_SPREADSHEET_REPORT";
|
|
65
|
-
DATA_PROCESS: "SMARTBI_DATAPROCESS";
|
|
66
|
-
ETL_AUTOMATION: "ETL_AUTOMATION";
|
|
67
|
-
JOB_FLOW: "JOB_FLOW";
|
|
68
|
-
DATA_MINING: "SMARTBI_MINING";
|
|
69
|
-
URL_LINK: "URL";
|
|
70
|
-
EXCEL_IMPORT_TEMPLATE: "excelimport";
|
|
71
|
-
TXT_QUERY_OBJECT: "TXTQUERYOBJECT";
|
|
72
|
-
TXT_DATA_SOURCE: "TXTDATASOURCE";
|
|
73
|
-
SCHEMA: "SCHEMA";
|
|
74
|
-
OLD_DATASET: "OLD_DATASET";
|
|
75
|
-
};
|
|
76
|
-
export type PermissionType = 'REF' | 'READ' | 'WRITE';
|
|
77
|
-
export declare const PermissionType: {
|
|
78
|
-
REF: "REF";
|
|
79
|
-
READ: "READ";
|
|
80
|
-
WRITE: "WRITE";
|
|
81
|
-
};
|
|
82
|
-
export type PermissionDescendType = 'ALL' | 'NONE' | 'READ_WRITE';
|
|
83
|
-
export declare const PermissionDescendType: {
|
|
84
|
-
ALL: "ALL";
|
|
85
|
-
NONE: "NONE";
|
|
86
|
-
READ_WRITE: "READ_WRITE";
|
|
87
|
-
};
|
|
88
|
-
export type HiddenInBrowse = boolean;
|
|
1
|
+
import type { AccessType, CatalogElementType, HiddenInBrowse, ICatalogElement, ICatalogSearchResult, IResourcePermission, IResourcePermissionItem, PermissionDescendType, PermissionType } from '../types';
|
|
89
2
|
/**
|
|
90
3
|
* 判断某个资源是否可访问。
|
|
91
4
|
* 参数:
|
|
@@ -267,4 +180,3 @@ export declare const copyAndPasteReturnNewId: (toId: string, srcId: string, name
|
|
|
267
180
|
* @returns 返回创建的资源节点,类型为ICatalogElement
|
|
268
181
|
*/
|
|
269
182
|
export declare const createCatalogElement: (parentId: string, id: string, name: string, alias: string, desc: string, order: number, type: CatalogElementType | string) => Promise<ICatalogElement>;
|
|
270
|
-
//# sourceMappingURL=CatalogService.d.ts.map
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
import { smartbi } from "../index";
|
|
2
|
+
/**
|
|
3
|
+
* 判断某个资源是否可访问。
|
|
4
|
+
* 参数:
|
|
5
|
+
* elementId - 资源ID
|
|
6
|
+
* type - 访问类型:
|
|
7
|
+
* 1.引用权限:REF
|
|
8
|
+
* 2.查看权限:READ
|
|
9
|
+
* 3.编辑权限:WRITE
|
|
10
|
+
* @param elementId 资源ID
|
|
11
|
+
* @param type 访问类型
|
|
12
|
+
* @returns 返回是否有权限的布尔值
|
|
13
|
+
*/
|
|
14
|
+
export const isCatalogElementAccessible = (elementId, type) => {
|
|
15
|
+
return smartbi('CatalogService', 'isCatalogElementAccessible', [elementId, type]);
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* 获取资源树的顶层节点列表
|
|
19
|
+
* @returns 返回顶层节点列表,节点类型为ICatalogElement
|
|
20
|
+
*/
|
|
21
|
+
export const getRootElements = () => {
|
|
22
|
+
return smartbi('CatalogService', 'getRootElements', []);
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* 获得指定节点的子节点列表
|
|
26
|
+
* @param nodeId 指定节点ID
|
|
27
|
+
* @returns 返回子节点列表,节点类型为ICatalogElement
|
|
28
|
+
*/
|
|
29
|
+
export const getChildElements = (nodeId) => {
|
|
30
|
+
return smartbi('CatalogService', 'getChildElements', [nodeId]);
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* 创建目录
|
|
34
|
+
* @param parentNodeId 父目录ID
|
|
35
|
+
* @param name 目录名称
|
|
36
|
+
* @param alias 目录别名
|
|
37
|
+
* @param desc 目录描述
|
|
38
|
+
* @param type 目录类型,此项可为空,系统会自动根据父目录的类型进行设置
|
|
39
|
+
* @param hiddenInBrowse 是否在浏览模块中隐藏此目录
|
|
40
|
+
* @returns 返回创建的目录对象,类型为ICatalogElement
|
|
41
|
+
*/
|
|
42
|
+
export const createFolder = (parentNodeId, name, alias, desc, type, hiddenInBrowse) => {
|
|
43
|
+
return smartbi('CatalogService', 'createFolder', [parentNodeId, name, alias, desc, type, hiddenInBrowse]);
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* 通过ID创建目录
|
|
47
|
+
* @param parentNodeId 父目录ID
|
|
48
|
+
* @param id 目录ID
|
|
49
|
+
* @param name 目录名称
|
|
50
|
+
* @param alias 目录别名
|
|
51
|
+
* @param desc 目录描述
|
|
52
|
+
* @param type 目录类型,此项可为空,系统会自动根据父目录的类型进行设置
|
|
53
|
+
* @param hiddenInBrowse 是否在浏览模块中隐藏此目录
|
|
54
|
+
* @returns 返回创建的目录对象,类型为ICatalogElement
|
|
55
|
+
*/
|
|
56
|
+
export const createFolderById = (parentNodeId, id, name, alias, desc, type, hiddenInBrowse) => {
|
|
57
|
+
return smartbi('CatalogService', 'createFolderById', [parentNodeId, id, name, alias, desc, type, hiddenInBrowse]);
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* 通过ID访问资源
|
|
61
|
+
* @param elementId 资源ID
|
|
62
|
+
* @returns 返回资源对象,类型为ICatalogElement
|
|
63
|
+
*/
|
|
64
|
+
export const getCatalogElementById = (elementId) => {
|
|
65
|
+
return smartbi('CatalogService', 'getCatalogElementById', [elementId]);
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* 通过类型获取结点
|
|
69
|
+
* @param type 节点类型
|
|
70
|
+
* @returns 返回指定类型的节点列表,节点类型为ICatalogElement
|
|
71
|
+
*/
|
|
72
|
+
export const getCatalogElementByType = (type) => {
|
|
73
|
+
return smartbi('CatalogService', 'getCatalogElementByType', [type]);
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* 获取目录下指定类型的子元素
|
|
77
|
+
* @param parentNodeId 父节点ID
|
|
78
|
+
* @param types 要获取的子元素类型数组
|
|
79
|
+
* @returns 返回指定类型的子元素列表,节点类型为ICatalogElement
|
|
80
|
+
*/
|
|
81
|
+
export const getChildElementsByTypes = (parentNodeId, types) => {
|
|
82
|
+
return smartbi('CatalogService', 'getChildElementsByTypes', [parentNodeId, types.toString()]);
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* 获取资源直接被授予的权限信息
|
|
86
|
+
* @param resId 资源ID
|
|
87
|
+
* @returns 返回资源直接被授予的权限信息,类型为IResourcePermission
|
|
88
|
+
*/
|
|
89
|
+
export const getAssignedPermissions = (resId) => {
|
|
90
|
+
return smartbi('CatalogService', 'getAssignedPermissions', [resId]);
|
|
91
|
+
};
|
|
92
|
+
/**
|
|
93
|
+
* 获取资源继承的权限信息
|
|
94
|
+
* @param resId 资源ID
|
|
95
|
+
* @returns 返回资源继承的权限信息列表,类型为IResourcePermissionItem[]
|
|
96
|
+
*/
|
|
97
|
+
export const getInheritedPermissions = (resId) => {
|
|
98
|
+
return smartbi('CatalogService', 'getInheritedPermissions', [resId]);
|
|
99
|
+
};
|
|
100
|
+
/**
|
|
101
|
+
* 通过ID删除资源
|
|
102
|
+
* @param id 资源ID
|
|
103
|
+
* @returns 无返回值
|
|
104
|
+
*/
|
|
105
|
+
export const deleteCatalogElement = (id) => {
|
|
106
|
+
return smartbi('CatalogService', 'deleteCatalogElement', [id]);
|
|
107
|
+
};
|
|
108
|
+
/**
|
|
109
|
+
* 根据别名或名称模糊查询资源信息
|
|
110
|
+
* @param alias 别名或名称关键字
|
|
111
|
+
* @param purview 权限范围
|
|
112
|
+
* @returns 返回搜索结果列表,类型为ICatalogSearchResult[]
|
|
113
|
+
*/
|
|
114
|
+
export const searchCatalogElementLikeAlias = (alias, purview) => {
|
|
115
|
+
return smartbi('CatalogService', 'searchCatalogElementLikeAlias', [alias, purview]);
|
|
116
|
+
};
|
|
117
|
+
/**
|
|
118
|
+
* 设置该资源的组权限
|
|
119
|
+
* @param elementId 资源ID
|
|
120
|
+
* @param groupId 组ID
|
|
121
|
+
* @param type 权限类型
|
|
122
|
+
* @param inherited 是否继承
|
|
123
|
+
* @param permissionDescendType 权限下降类型
|
|
124
|
+
* @param isGroupDescend 是否组下降
|
|
125
|
+
* @returns 无返回值
|
|
126
|
+
*/
|
|
127
|
+
export const setAssignedPermissionByGroup = (elementId, groupId, type, inherited, permissionDescendType, isGroupDescend) => {
|
|
128
|
+
return smartbi('CatalogService', 'setAssignedPermissionByGroup', [elementId, groupId, type, inherited, permissionDescendType, isGroupDescend]);
|
|
129
|
+
};
|
|
130
|
+
/**
|
|
131
|
+
* 设置该资源的角色权限
|
|
132
|
+
* @param elementId 资源ID
|
|
133
|
+
* @param roleId 角色ID
|
|
134
|
+
* @param type 权限类型
|
|
135
|
+
* @param inherited 是否继承
|
|
136
|
+
* @param permissionDescendType 权限下降类型
|
|
137
|
+
* @returns 无返回值
|
|
138
|
+
*/
|
|
139
|
+
export const setAssignedPermissionByRole = (elementId, roleId, type, inherited, permissionDescendType) => {
|
|
140
|
+
return smartbi('CatalogService', 'setAssignedPermissionByRole', [elementId, roleId, type, inherited, permissionDescendType]);
|
|
141
|
+
};
|
|
142
|
+
/**
|
|
143
|
+
* 设置该资源的用户权限
|
|
144
|
+
* @param elementId 资源ID
|
|
145
|
+
* @param userId 用户ID
|
|
146
|
+
* @param type 权限类型
|
|
147
|
+
* @param inherited 是否继承
|
|
148
|
+
* @param permissionDescendType 权限下降类型
|
|
149
|
+
* @returns 无返回值
|
|
150
|
+
*/
|
|
151
|
+
export const setAssignedPermissionByUser = (elementId, userId, type, inherited, permissionDescendType) => {
|
|
152
|
+
return smartbi('CatalogService', 'setAssignedPermissionByUser', [elementId, userId, type, inherited, permissionDescendType]);
|
|
153
|
+
};
|
|
154
|
+
/**
|
|
155
|
+
* 更换资源节点的图片
|
|
156
|
+
* @param id 资源ID
|
|
157
|
+
* @param image 图片路径或图片数据
|
|
158
|
+
* @returns 无返回值
|
|
159
|
+
*/
|
|
160
|
+
export const updateCatalogElementImage = (id, image) => {
|
|
161
|
+
return smartbi('CatalogService', 'updateCatalogElementImage', [id, image]);
|
|
162
|
+
};
|
|
163
|
+
/**
|
|
164
|
+
* 根据ID修改资源信息
|
|
165
|
+
* @param id 资源ID
|
|
166
|
+
* @param jsonNodeConfig JSON节点配置
|
|
167
|
+
* @param wholeExtended 完整扩展信息
|
|
168
|
+
* @returns 无返回值
|
|
169
|
+
*/
|
|
170
|
+
export const updateCatalogNode = (id, jsonNodeConfig, wholeExtended) => {
|
|
171
|
+
return smartbi('CatalogService', 'updateCatalogNode', [id, jsonNodeConfig, wholeExtended]);
|
|
172
|
+
};
|
|
173
|
+
/**
|
|
174
|
+
* 创建WEB链接
|
|
175
|
+
* @param parentFolderId 父文件夹ID
|
|
176
|
+
* @param urlName URL名称
|
|
177
|
+
* @param urlAlias URL别名
|
|
178
|
+
* @param urlDesc URL描述
|
|
179
|
+
* @param url URL地址
|
|
180
|
+
* @param setting 设置参数
|
|
181
|
+
* @returns 返回新创建的URL链接ID
|
|
182
|
+
*/
|
|
183
|
+
export const createURLLink = (parentFolderId, urlName, urlAlias, urlDesc, url, setting) => {
|
|
184
|
+
return smartbi('CatalogService', 'createURLLink', [parentFolderId, urlName, urlAlias, urlDesc, url, setting]);
|
|
185
|
+
};
|
|
186
|
+
/**
|
|
187
|
+
* 更新WEB链接
|
|
188
|
+
* @param urlID URL ID
|
|
189
|
+
* @param urlAlias URL别名
|
|
190
|
+
* @param urlDesc URL描述
|
|
191
|
+
* @param url URL地址
|
|
192
|
+
* @param setting 设置参数
|
|
193
|
+
* @returns 无返回值
|
|
194
|
+
*/
|
|
195
|
+
export const updateURLLink = (urlID, urlAlias, urlDesc, url, setting) => {
|
|
196
|
+
return smartbi('CatalogService', 'updateURLLink', [urlID, urlAlias, urlDesc, url, setting]);
|
|
197
|
+
};
|
|
198
|
+
/**
|
|
199
|
+
* 复制粘贴并返回新ID
|
|
200
|
+
* @param toId 目标ID
|
|
201
|
+
* @param srcId 源ID
|
|
202
|
+
* @param name 名称
|
|
203
|
+
* @param alias 别名
|
|
204
|
+
* @param desc 描述
|
|
205
|
+
* @returns 返回新创建元素的ID
|
|
206
|
+
*/
|
|
207
|
+
export const copyAndPasteReturnNewId = (toId, srcId, name, alias, desc) => {
|
|
208
|
+
return smartbi('CatalogService', 'copyAndPasteReturnNewId', [toId, srcId, name, alias, desc]);
|
|
209
|
+
};
|
|
210
|
+
/**
|
|
211
|
+
* 创建资源树结点
|
|
212
|
+
* 注意:此方法是单纯新建一个树结点,调用此方法前,必须存在此结点类型的实体资源.
|
|
213
|
+
* @param parentId 父ID
|
|
214
|
+
* @param id ID
|
|
215
|
+
* @param name 名称
|
|
216
|
+
* @param alias 别名
|
|
217
|
+
* @param desc 描述
|
|
218
|
+
* @param order 顺序
|
|
219
|
+
* @param type 类型
|
|
220
|
+
* @returns 返回创建的资源节点,类型为ICatalogElement
|
|
221
|
+
*/
|
|
222
|
+
export const createCatalogElement = (parentId, id, name, alias, desc, order, type) => {
|
|
223
|
+
return smartbi('CatalogService', 'createCatalogElement', [parentId, id, name, alias, desc, order, type]);
|
|
224
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { IClientCombinedReportView } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* 打开一个即席查询报表
|
|
4
|
+
* @param queryId 报表ID
|
|
5
|
+
* @returns 返回打开的报表视图,类型为IClientCombinedReportView
|
|
6
|
+
*/
|
|
7
|
+
export declare const openQuery: (queryId: string) => Promise<IClientCombinedReportView>;
|
|
8
|
+
/**
|
|
9
|
+
* 打开一个即席查询报表(不初始化)
|
|
10
|
+
* @param queryId 报表ID
|
|
11
|
+
* @returns 返回打开的报表视图,类型为IClientCombinedReportView
|
|
12
|
+
*/
|
|
13
|
+
export declare const openQueryWithoutInit: (queryId: string) => Promise<IClientCombinedReportView>;
|
|
14
|
+
/**
|
|
15
|
+
* 同步条件面板参数
|
|
16
|
+
* @param combinedClientId combinedClientId
|
|
17
|
+
* @param condPanelClientId condPanelClientId
|
|
18
|
+
* @returns 无返回值
|
|
19
|
+
*/
|
|
20
|
+
export declare const updateConditionPanel: (combinedClientId: string, condPanelClientId: string) => Promise<void>;
|
|
21
|
+
/**
|
|
22
|
+
* 将报表信息从服务端的会话状态中清除
|
|
23
|
+
* @param combinedClientId 客户ID
|
|
24
|
+
* @returns 无返回值
|
|
25
|
+
*/
|
|
26
|
+
export declare const removeFromSession: (combinedClientId: string) => Promise<void>;
|
|
27
|
+
/**
|
|
28
|
+
* 克隆查询
|
|
29
|
+
* @param clientId 客户端ID
|
|
30
|
+
* @param parentNodeId 父节点ID
|
|
31
|
+
* @param name 名称
|
|
32
|
+
* @param alias 别名
|
|
33
|
+
* @param desc 描述
|
|
34
|
+
* @returns 返回新客户端ID
|
|
35
|
+
*/
|
|
36
|
+
export declare const cloneQuery: (clientId: string, parentNodeId: string, name: string, alias: string, desc: string) => Promise<string>;
|
|
37
|
+
/**
|
|
38
|
+
* 导出报表
|
|
39
|
+
* @param clientId 客户端ID
|
|
40
|
+
* @param reportId 报表ID
|
|
41
|
+
* @returns 无返回值
|
|
42
|
+
*/
|
|
43
|
+
export declare const dump: (clientId: string, reportId: string) => Promise<void>;
|
|
44
|
+
/**
|
|
45
|
+
* 覆盖查询
|
|
46
|
+
* @param clientId 客户端ID
|
|
47
|
+
* @param replacedReportId 报表ID
|
|
48
|
+
* @param desc 描述
|
|
49
|
+
* @returns 返回true/false
|
|
50
|
+
*/
|
|
51
|
+
export declare const overwriteQuery: (clientId: string, replacedReportId: string, desc: string) => Promise<boolean>;
|
|
52
|
+
/**
|
|
53
|
+
* 获取即席查询的数据来源类型
|
|
54
|
+
* @param queryId 即席查询id
|
|
55
|
+
* @returns 返回数据来源类型
|
|
56
|
+
*/
|
|
57
|
+
export declare const getDataSourceType: (queryId: string) => Promise<string>;
|
|
58
|
+
/**
|
|
59
|
+
* 获取即席查询的类型
|
|
60
|
+
* @param reportId 即席查询id
|
|
61
|
+
* @returns 返回类型
|
|
62
|
+
*/
|
|
63
|
+
export declare const getExtendedType: (reportId: string) => Promise<string>;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
// ClientCombinedReportService 服务方法
|
|
2
|
+
import { smartbi } from "../index";
|
|
3
|
+
/**
|
|
4
|
+
* 打开一个即席查询报表
|
|
5
|
+
* @param queryId 报表ID
|
|
6
|
+
* @returns 返回打开的报表视图,类型为IClientCombinedReportView
|
|
7
|
+
*/
|
|
8
|
+
export const openQuery = (queryId) => {
|
|
9
|
+
return smartbi('ClientCombinedReportService', 'openQuery', [queryId]);
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* 打开一个即席查询报表(不初始化)
|
|
13
|
+
* @param queryId 报表ID
|
|
14
|
+
* @returns 返回打开的报表视图,类型为IClientCombinedReportView
|
|
15
|
+
*/
|
|
16
|
+
export const openQueryWithoutInit = (queryId) => {
|
|
17
|
+
return smartbi('ClientCombinedReportService', 'openQueryWithoutInit', [queryId]);
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* 同步条件面板参数
|
|
21
|
+
* @param combinedClientId combinedClientId
|
|
22
|
+
* @param condPanelClientId condPanelClientId
|
|
23
|
+
* @returns 无返回值
|
|
24
|
+
*/
|
|
25
|
+
export const updateConditionPanel = (combinedClientId, condPanelClientId) => {
|
|
26
|
+
return smartbi('ClientCombinedReportService', 'updateConditionPanel', [combinedClientId, condPanelClientId]);
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* 将报表信息从服务端的会话状态中清除
|
|
30
|
+
* @param combinedClientId 客户ID
|
|
31
|
+
* @returns 无返回值
|
|
32
|
+
*/
|
|
33
|
+
export const removeFromSession = (combinedClientId) => {
|
|
34
|
+
return smartbi('ClientCombinedReportService', 'removeFromSession', [combinedClientId]);
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* 克隆查询
|
|
38
|
+
* @param clientId 客户端ID
|
|
39
|
+
* @param parentNodeId 父节点ID
|
|
40
|
+
* @param name 名称
|
|
41
|
+
* @param alias 别名
|
|
42
|
+
* @param desc 描述
|
|
43
|
+
* @returns 返回新客户端ID
|
|
44
|
+
*/
|
|
45
|
+
export const cloneQuery = (clientId, parentNodeId, name, alias, desc) => {
|
|
46
|
+
return smartbi('ClientCombinedReportService', 'cloneQuery', [clientId, parentNodeId, name, alias, desc]);
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* 导出报表
|
|
50
|
+
* @param clientId 客户端ID
|
|
51
|
+
* @param reportId 报表ID
|
|
52
|
+
* @returns 无返回值
|
|
53
|
+
*/
|
|
54
|
+
export const dump = (clientId, reportId) => {
|
|
55
|
+
return smartbi('ClientCombinedReportService', 'dump', [clientId, reportId]);
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* 覆盖查询
|
|
59
|
+
* @param clientId 客户端ID
|
|
60
|
+
* @param replacedReportId 报表ID
|
|
61
|
+
* @param desc 描述
|
|
62
|
+
* @returns 返回true/false
|
|
63
|
+
*/
|
|
64
|
+
export const overwriteQuery = (clientId, replacedReportId, desc) => {
|
|
65
|
+
return smartbi('ClientCombinedReportService', 'overwriteQuery', [clientId, replacedReportId, desc]);
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* 获取即席查询的数据来源类型
|
|
69
|
+
* @param queryId 即席查询id
|
|
70
|
+
* @returns 返回数据来源类型
|
|
71
|
+
*/
|
|
72
|
+
export const getDataSourceType = (queryId) => {
|
|
73
|
+
return smartbi('ClientCombinedReportService', 'getDataSourceType', [queryId]);
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* 获取即席查询的类型
|
|
77
|
+
* @param reportId 即席查询id
|
|
78
|
+
* @returns 返回类型
|
|
79
|
+
*/
|
|
80
|
+
export const getExtendedType = (reportId) => {
|
|
81
|
+
return smartbi('ClientCombinedReportService', 'getExtendedType', [reportId]);
|
|
82
|
+
};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import type { NameValuePair, ReportData, SystemConfig } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* 清空透视分析临时表
|
|
4
|
+
* @returns 无返回值
|
|
5
|
+
*/
|
|
6
|
+
export declare const cleanTempTablePool: () => Promise<void>;
|
|
7
|
+
/**
|
|
8
|
+
* 打开透视分析
|
|
9
|
+
* @param reportId 报表Id
|
|
10
|
+
* @param pageId 页面Id
|
|
11
|
+
* @returns 返回JSON对象
|
|
12
|
+
*/
|
|
13
|
+
export declare const openQuery: (reportId: string, pageId: string) => Promise<any>;
|
|
14
|
+
/**
|
|
15
|
+
* 获取参数备选值
|
|
16
|
+
* @param panelId 参数面板ClientId
|
|
17
|
+
* @param paramId 参数Id
|
|
18
|
+
* @returns 返回键值对列表
|
|
19
|
+
*/
|
|
20
|
+
export declare const getParamStandbyValue: (panelId: string, paramId: string) => Promise<NameValuePair[]>;
|
|
21
|
+
/**
|
|
22
|
+
* 根据参数Id获取参数默认值
|
|
23
|
+
* @param panelId 参数面板ClientId
|
|
24
|
+
* @param paramId 参数Id
|
|
25
|
+
* @returns 返回JSON数组
|
|
26
|
+
*/
|
|
27
|
+
export declare const getParamDefaultValueByPID: (panelId: string, paramId: string) => Promise<any[]>;
|
|
28
|
+
/**
|
|
29
|
+
* 设置参数值
|
|
30
|
+
* @param panelId 参数面板ClientId
|
|
31
|
+
* @param paramId 参数Id
|
|
32
|
+
* @param value 参数真实值
|
|
33
|
+
* @param displayValue 参数显示值
|
|
34
|
+
* @returns 无返回值
|
|
35
|
+
*/
|
|
36
|
+
export declare const setParamValue: (panelId: string, paramId: string, value: string, displayValue: string) => Promise<void>;
|
|
37
|
+
/**
|
|
38
|
+
* 关闭透视分析
|
|
39
|
+
* @param clientId clientId
|
|
40
|
+
* @returns 无返回值
|
|
41
|
+
*/
|
|
42
|
+
export declare const close: (clientId: string) => Promise<void>;
|
|
43
|
+
/**
|
|
44
|
+
* 创建透视分析
|
|
45
|
+
* @param businessViewId 业务查询ID
|
|
46
|
+
* @param name 名称
|
|
47
|
+
* @param alias 别名
|
|
48
|
+
* @param desc 描述
|
|
49
|
+
* @param folderId 保存目录的ID
|
|
50
|
+
* @returns 返回透视分析ID
|
|
51
|
+
*/
|
|
52
|
+
export declare const createInsightQuery: (businessViewId: string, name: string, alias: string, desc: string, folderId: string) => Promise<string>;
|
|
53
|
+
/**
|
|
54
|
+
* 重新获取报表对象的当前状态
|
|
55
|
+
* @param clientId clientId
|
|
56
|
+
* @returns 返回查询结果JSON对象
|
|
57
|
+
*/
|
|
58
|
+
export declare const getInsightQuery: (clientId: string) => Promise<any>;
|
|
59
|
+
/**
|
|
60
|
+
* 获取透视分析系统选项导出使用缓存默认值
|
|
61
|
+
* @returns 返回systemconfig
|
|
62
|
+
*/
|
|
63
|
+
export declare const getExportWithCacheConfig: () => Promise<SystemConfig>;
|
|
64
|
+
/**
|
|
65
|
+
* 获取原始报表数据
|
|
66
|
+
* @param clientId 客户端ID
|
|
67
|
+
* @param pageNum 页码
|
|
68
|
+
* @returns 返回原始报表数据
|
|
69
|
+
*/
|
|
70
|
+
export declare const getRawReportData: (clientId: string, pageNum: number) => Promise<ReportData>;
|
|
71
|
+
/**
|
|
72
|
+
* 取得一个表达式的值
|
|
73
|
+
* @param clientId 客户ID
|
|
74
|
+
* @param func 表达式
|
|
75
|
+
* @returns 返回表达式的值
|
|
76
|
+
*/
|
|
77
|
+
export declare const getFunctionValue: (clientId: string, func: string) => Promise<string>;
|
|
78
|
+
/**
|
|
79
|
+
* 取得clientConfig
|
|
80
|
+
* @param clientId 客户ID
|
|
81
|
+
* @returns 返回clientConfig
|
|
82
|
+
*/
|
|
83
|
+
export declare const getClientConfig: (clientId: string) => Promise<string>;
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { smartbi } from "../index";
|
|
2
|
+
/**
|
|
3
|
+
* 清空透视分析临时表
|
|
4
|
+
* @returns 无返回值
|
|
5
|
+
*/
|
|
6
|
+
export const cleanTempTablePool = () => {
|
|
7
|
+
return smartbi('ClientInsightService', 'cleanTempTablePool', []);
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* 打开透视分析
|
|
11
|
+
* @param reportId 报表Id
|
|
12
|
+
* @param pageId 页面Id
|
|
13
|
+
* @returns 返回JSON对象
|
|
14
|
+
*/
|
|
15
|
+
export const openQuery = (reportId, pageId) => {
|
|
16
|
+
return smartbi('ClientInsightService', 'openQuery', [reportId, pageId]);
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* 获取参数备选值
|
|
20
|
+
* @param panelId 参数面板ClientId
|
|
21
|
+
* @param paramId 参数Id
|
|
22
|
+
* @returns 返回键值对列表
|
|
23
|
+
*/
|
|
24
|
+
export const getParamStandbyValue = (panelId, paramId) => {
|
|
25
|
+
return smartbi('ClientInsightService', 'getParamStandbyValue', [panelId, paramId]);
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* 根据参数Id获取参数默认值
|
|
29
|
+
* @param panelId 参数面板ClientId
|
|
30
|
+
* @param paramId 参数Id
|
|
31
|
+
* @returns 返回JSON数组
|
|
32
|
+
*/
|
|
33
|
+
export const getParamDefaultValueByPID = (panelId, paramId) => {
|
|
34
|
+
return smartbi('ClientInsightService', 'getParamDefaultValueByPID', [panelId, paramId]);
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* 设置参数值
|
|
38
|
+
* @param panelId 参数面板ClientId
|
|
39
|
+
* @param paramId 参数Id
|
|
40
|
+
* @param value 参数真实值
|
|
41
|
+
* @param displayValue 参数显示值
|
|
42
|
+
* @returns 无返回值
|
|
43
|
+
*/
|
|
44
|
+
export const setParamValue = (panelId, paramId, value, displayValue) => {
|
|
45
|
+
return smartbi('ClientInsightService', 'setParamValue', [panelId, paramId, value, displayValue]);
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* 关闭透视分析
|
|
49
|
+
* @param clientId clientId
|
|
50
|
+
* @returns 无返回值
|
|
51
|
+
*/
|
|
52
|
+
export const close = (clientId) => {
|
|
53
|
+
return smartbi('ClientInsightService', 'close', [clientId]);
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* 创建透视分析
|
|
57
|
+
* @param businessViewId 业务查询ID
|
|
58
|
+
* @param name 名称
|
|
59
|
+
* @param alias 别名
|
|
60
|
+
* @param desc 描述
|
|
61
|
+
* @param folderId 保存目录的ID
|
|
62
|
+
* @returns 返回透视分析ID
|
|
63
|
+
*/
|
|
64
|
+
export const createInsightQuery = (businessViewId, name, alias, desc, folderId) => {
|
|
65
|
+
return smartbi('ClientInsightService', 'createInsightQuery', [businessViewId, name, alias, desc, folderId]);
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* 重新获取报表对象的当前状态
|
|
69
|
+
* @param clientId clientId
|
|
70
|
+
* @returns 返回查询结果JSON对象
|
|
71
|
+
*/
|
|
72
|
+
export const getInsightQuery = (clientId) => {
|
|
73
|
+
return smartbi('ClientInsightService', 'getInsightQuery', [clientId]);
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* 获取透视分析系统选项导出使用缓存默认值
|
|
77
|
+
* @returns 返回systemconfig
|
|
78
|
+
*/
|
|
79
|
+
export const getExportWithCacheConfig = () => {
|
|
80
|
+
return smartbi('ClientInsightService', 'getExportWithCacheConfig', []);
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* 获取原始报表数据
|
|
84
|
+
* @param clientId 客户端ID
|
|
85
|
+
* @param pageNum 页码
|
|
86
|
+
* @returns 返回原始报表数据
|
|
87
|
+
*/
|
|
88
|
+
export const getRawReportData = (clientId, pageNum) => {
|
|
89
|
+
return smartbi('ClientInsightService', 'getRawReportData', [clientId, pageNum]);
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* 取得一个表达式的值
|
|
93
|
+
* @param clientId 客户ID
|
|
94
|
+
* @param func 表达式
|
|
95
|
+
* @returns 返回表达式的值
|
|
96
|
+
*/
|
|
97
|
+
export const getFunctionValue = (clientId, func) => {
|
|
98
|
+
return smartbi('ClientInsightService', 'getFunctionValue', [clientId, func]);
|
|
99
|
+
};
|
|
100
|
+
/**
|
|
101
|
+
* 取得clientConfig
|
|
102
|
+
* @param clientId 客户ID
|
|
103
|
+
* @returns 返回clientConfig
|
|
104
|
+
*/
|
|
105
|
+
export const getClientConfig = (clientId) => {
|
|
106
|
+
return smartbi('ClientInsightService', 'getClientConfig', [clientId]);
|
|
107
|
+
};
|