smartbi-toolkit 1.1.4 → 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.
Files changed (111) hide show
  1. package/README.md +59 -12
  2. package/dist/common-Cnq1SoER.d.ts +25 -0
  3. package/dist/console-BJttltN4.js +93 -0
  4. package/dist/index.d.ts +23 -14
  5. package/dist/index.js +97 -127
  6. package/dist/{methods → service}/AnalysisReportService.d.ts +18 -14
  7. package/dist/service/AnalysisReportService.js +138 -0
  8. package/dist/service/BusinessThemeService.d.ts +11 -0
  9. package/dist/service/BusinessThemeService.js +20 -0
  10. package/dist/{methods → service}/BusinessViewService.d.ts +18 -14
  11. package/dist/service/BusinessViewService.js +146 -0
  12. package/dist/{methods → service}/CatalogService.d.ts +26 -22
  13. package/dist/service/CatalogService.js +300 -0
  14. package/dist/{methods → service}/ClientCombinedReportService.d.ts +14 -10
  15. package/dist/service/ClientCombinedReportService.js +96 -0
  16. package/dist/{methods → service}/ClientInsightService.d.ts +17 -13
  17. package/dist/service/ClientInsightService.js +123 -0
  18. package/dist/{methods → service}/ClientReportService.d.ts +27 -23
  19. package/dist/service/ClientReportService.js +244 -0
  20. package/dist/service/CombinedReportService.d.ts +11 -0
  21. package/dist/service/CombinedReportService.js +14 -0
  22. package/dist/{methods → service}/DataSourceService.d.ts +26 -22
  23. package/dist/service/DataSourceService.js +306 -0
  24. package/dist/service/GraphicReportService.d.ts +11 -0
  25. package/dist/service/GraphicReportService.js +14 -0
  26. package/dist/service/InsightReport.d.ts +75 -0
  27. package/dist/service/InsightReport.js +118 -0
  28. package/dist/{methods → service}/MetadataService.d.ts +10 -6
  29. package/dist/service/MetadataService.js +60 -0
  30. package/dist/service/OfficeReport.d.ts +53 -0
  31. package/dist/service/OfficeReport.js +74 -0
  32. package/dist/{methods → service}/OfficeReportService.d.ts +10 -6
  33. package/dist/service/OfficeReportService.js +56 -0
  34. package/dist/service/OltpMetadataService.d.ts +23 -0
  35. package/dist/service/OltpMetadataService.js +30 -0
  36. package/dist/service/ParameterService.d.ts +15 -0
  37. package/dist/service/ParameterService.js +22 -0
  38. package/dist/service/PoolService.d.ts +14 -0
  39. package/dist/service/PoolService.js +21 -0
  40. package/dist/{methods → service}/PortalService.d.ts +14 -10
  41. package/dist/service/PortalService.js +106 -0
  42. package/dist/{methods → service}/Report.d.ts +31 -27
  43. package/dist/service/Report.js +275 -0
  44. package/dist/service/SSReport.d.ts +90 -0
  45. package/dist/service/SSReport.js +127 -0
  46. package/dist/service/ScheduleTaskService.d.ts +15 -0
  47. package/dist/service/ScheduleTaskService.js +22 -0
  48. package/dist/service/SimpleReportService.d.ts +15 -0
  49. package/dist/service/SimpleReportService.js +22 -0
  50. package/dist/service/SpreadSheetReportService.d.ts +47 -0
  51. package/dist/service/SpreadSheetReportService.js +65 -0
  52. package/dist/service/SystemConfigService.d.ts +21 -0
  53. package/dist/service/SystemConfigService.js +28 -0
  54. package/dist/service/TimeConsuming.d.ts +10 -0
  55. package/dist/service/TimeConsuming.js +13 -0
  56. package/dist/service/TimeConsumingService.d.ts +8 -0
  57. package/dist/service/TimeConsumingService.js +13 -0
  58. package/dist/{methods → service}/UserManagerService.d.ts +40 -36
  59. package/dist/service/UserManagerService.js +365 -0
  60. package/dist/types-DOYMZhxT.d.ts +409 -0
  61. package/dist/vite-plugin/vite-plugin-smartbi.d.ts +21 -0
  62. package/dist/vite-plugin/vite-plugin-smartbi.js +54 -0
  63. package/dist/vite-plugin/vite-plugin-smartbix.d.ts +17 -0
  64. package/dist/vite-plugin/vite-plugin-smartbix.js +101 -0
  65. package/package.json +59 -141
  66. package/dist/methods/AnalysisReportService.js +0 -126
  67. package/dist/methods/BusinessThemeService.d.ts +0 -8
  68. package/dist/methods/BusinessThemeService.js +0 -11
  69. package/dist/methods/BusinessViewService.js +0 -120
  70. package/dist/methods/CatalogService.js +0 -230
  71. package/dist/methods/ClientCombinedReportService.js +0 -82
  72. package/dist/methods/ClientInsightService.js +0 -107
  73. package/dist/methods/ClientReportService.js +0 -206
  74. package/dist/methods/CombinedReportService.d.ts +0 -7
  75. package/dist/methods/CombinedReportService.js +0 -10
  76. package/dist/methods/DataSourceService.js +0 -220
  77. package/dist/methods/GraphicReportService.d.ts +0 -7
  78. package/dist/methods/GraphicReportService.js +0 -10
  79. package/dist/methods/InsightReport.d.ts +0 -71
  80. package/dist/methods/InsightReport.js +0 -98
  81. package/dist/methods/MetadataService.js +0 -47
  82. package/dist/methods/OfficeReport.d.ts +0 -49
  83. package/dist/methods/OfficeReport.js +0 -65
  84. package/dist/methods/OfficeReportService.js +0 -46
  85. package/dist/methods/OltpMetadataService.d.ts +0 -19
  86. package/dist/methods/OltpMetadataService.js +0 -25
  87. package/dist/methods/ParameterService.d.ts +0 -12
  88. package/dist/methods/ParameterService.js +0 -18
  89. package/dist/methods/PoolService.d.ts +0 -11
  90. package/dist/methods/PoolService.js +0 -17
  91. package/dist/methods/PortalService.js +0 -89
  92. package/dist/methods/Report.js +0 -230
  93. package/dist/methods/SSReport.d.ts +0 -86
  94. package/dist/methods/SSReport.js +0 -114
  95. package/dist/methods/ScheduleTaskService.d.ts +0 -12
  96. package/dist/methods/ScheduleTaskService.js +0 -18
  97. package/dist/methods/SimpleReportService.d.ts +0 -12
  98. package/dist/methods/SimpleReportService.js +0 -18
  99. package/dist/methods/SpreadSheetReportService.d.ts +0 -43
  100. package/dist/methods/SpreadSheetReportService.js +0 -55
  101. package/dist/methods/SystemConfigService.d.ts +0 -17
  102. package/dist/methods/SystemConfigService.js +0 -23
  103. package/dist/methods/TimeConsuming.d.ts +0 -6
  104. package/dist/methods/TimeConsuming.js +0 -9
  105. package/dist/methods/TimeConsumingService.d.ts +0 -5
  106. package/dist/methods/TimeConsumingService.js +0 -9
  107. package/dist/methods/UserManagerService.js +0 -312
  108. package/dist/types.d.ts +0 -412
  109. package/dist/types.js +0 -61
  110. package/dist/vite-plugin-smartbi/index.d.ts +0 -36
  111. package/dist/vite-plugin-smartbi/index.js +0 -107
package/package.json CHANGED
@@ -1,159 +1,77 @@
1
1
  {
2
2
  "name": "smartbi-toolkit",
3
- "private": false,
4
- "version": "1.1.4",
5
- "keys": [
6
- "smartbi",
7
- "扩展包",
8
- "ext",
9
- "typescript",
10
- "smartbi-toolkit"
11
- ],
12
3
  "type": "module",
13
- "module": "./dist/index.js",
14
- "types": "./dist/index.d.ts",
15
- "description": "SmartBI 非官方JS sdk和ext构建工具",
4
+ "version": "1.2.0",
5
+ "description": "A starter for creating a TypeScript package.",
6
+ "author": "Alex Liu <648632561@qq.com>",
7
+ "license": "MIT",
8
+ "homepage": "https://github.com/author/library#readme",
16
9
  "repository": {
17
10
  "type": "git",
18
- "url": "https://github.com/StillAlexLiu/smartbi-toolkit.git"
11
+ "url": "git+https://github.com/author/library.git"
19
12
  },
20
- "exports": {
21
- ".": {
22
- "import": "./dist/index.js",
23
- "types": "./dist/index.d.ts"
24
- },
25
- "./VitePluginSmartbi": {
26
- "import": "./dist/vite-plugin-smartbi/index.js",
27
- "types": "./dist/vite-plugin-smartbi/index.d.ts"
28
- },
29
- "./AnalysisReportService": {
30
- "import": "./dist/methods/AnalysisReportService.js",
31
- "types": "./dist/methods/AnalysisReportService.d.ts"
32
- },
33
- "./BusinessThemeService": {
34
- "import": "./dist/methods/BusinessThemeService.js",
35
- "types": "./dist/methods/BusinessThemeService.d.ts"
36
- },
37
- "./BusinessViewService": {
38
- "import": "./dist/methods/BusinessViewService.js",
39
- "types": "./dist/methods/BusinessViewService.d.ts"
40
- },
41
- "./CatalogService": {
42
- "import": "./dist/methods/CatalogService.js",
43
- "types": "./dist/methods/CatalogService.d.ts"
44
- },
45
- "./ClientCombinedReportService": {
46
- "import": "./dist/methods/ClientCombinedReportService.js",
47
- "types": "./dist/methods/ClientCombinedReportService.d.ts"
48
- },
49
- "./ClientInsightService": {
50
- "import": "./dist/methods/ClientInsightService.js",
51
- "types": "./dist/methods/ClientInsightService.d.ts"
52
- },
53
- "./ClientReportService": {
54
- "import": "./dist/methods/ClientReportService.js",
55
- "types": "./dist/methods/ClientReportService.d.ts"
56
- },
57
- "./CombinedReportService": {
58
- "import": "./dist/methods/CombinedReportService.js",
59
- "types": "./dist/methods/CombinedReportService.d.ts"
60
- },
61
- "./DataSourceService": {
62
- "import": "./dist/methods/DataSourceService.js",
63
- "types": "./dist/methods/DataSourceService.d.ts"
64
- },
65
- "./GraphicReportService": {
66
- "import": "./dist/methods/GraphicReportService.js",
67
- "types": "./dist/methods/GraphicReportService.d.ts"
68
- },
69
- "./InsightReport": {
70
- "import": "./dist/methods/InsightReport.js",
71
- "types": "./dist/methods/InsightReport.d.ts"
72
- },
73
- "./MetadataService": {
74
- "import": "./dist/methods/MetadataService.js",
75
- "types": "./dist/methods/MetadataService.d.ts"
76
- },
77
- "./OfficeReport": {
78
- "import": "./dist/methods/OfficeReport.js",
79
- "types": "./dist/methods/OfficeReport.d.ts"
80
- },
81
- "./OfficeReportService": {
82
- "import": "./dist/methods/OfficeReportService.js",
83
- "types": "./dist/methods/OfficeReportService.d.ts"
84
- },
85
- "./OltpMetadataService": {
86
- "import": "./dist/methods/OltpMetadataService.js",
87
- "types": "./dist/methods/OltpMetadataService.d.ts"
88
- },
89
- "./ParameterService": {
90
- "import": "./dist/methods/ParameterService.js",
91
- "types": "./dist/methods/ParameterService.d.ts"
92
- },
93
- "./PoolService": {
94
- "import": "./dist/methods/PoolService.js",
95
- "types": "./dist/methods/PoolService.d.ts"
96
- },
97
- "./PortalService": {
98
- "import": "./dist/methods/PortalService.js",
99
- "types": "./dist/methods/PortalService.d.ts"
100
- },
101
- "./Report": {
102
- "import": "./dist/methods/Report.js",
103
- "types": "./dist/methods/Report.d.ts"
104
- },
105
- "./SSReport": {
106
- "import": "./dist/methods/SSReport.js",
107
- "types": "./dist/methods/SSReport.d.ts"
108
- },
109
- "./ScheduleTaskService": {
110
- "import": "./dist/methods/ScheduleTaskService.js",
111
- "types": "./dist/methods/ScheduleTaskService.d.ts"
112
- },
113
- "./SimpleReportService": {
114
- "import": "./dist/methods/SimpleReportService.js",
115
- "types": "./dist/methods/SimpleReportService.d.ts"
116
- },
117
- "./SpreadSheetReportService": {
118
- "import": "./dist/methods/SpreadSheetReportService.js",
119
- "types": "./dist/methods/SpreadSheetReportService.d.ts"
120
- },
121
- "./SystemConfigService": {
122
- "import": "./dist/methods/SystemConfigService.js",
123
- "types": "./dist/methods/SystemConfigService.d.ts"
124
- },
125
- "./TimeConsuming": {
126
- "import": "./dist/methods/TimeConsuming.js",
127
- "types": "./dist/methods/TimeConsuming.d.ts"
128
- },
129
- "./TimeConsumingService": {
130
- "import": "./dist/methods/TimeConsumingService.js",
131
- "types": "./dist/methods/TimeConsumingService.d.ts"
132
- },
133
- "./UserManagerService": {
134
- "import": "./dist/methods/UserManagerService.js",
135
- "types": "./dist/methods/UserManagerService.d.ts"
136
- }
13
+ "bugs": {
14
+ "url": "https://github.com/author/library/issues"
137
15
  },
138
- "scripts": {
139
- "build": "tsc"
16
+ "exports": {
17
+ ".": "./dist/index.js",
18
+ "./service/AnalysisReportService": "./dist/service/AnalysisReportService.js",
19
+ "./service/BusinessThemeService": "./dist/service/BusinessThemeService.js",
20
+ "./service/BusinessViewService": "./dist/service/BusinessViewService.js",
21
+ "./service/CatalogService": "./dist/service/CatalogService.js",
22
+ "./service/ClientCombinedReportService": "./dist/service/ClientCombinedReportService.js",
23
+ "./service/ClientInsightService": "./dist/service/ClientInsightService.js",
24
+ "./service/ClientReportService": "./dist/service/ClientReportService.js",
25
+ "./service/CombinedReportService": "./dist/service/CombinedReportService.js",
26
+ "./service/DataSourceService": "./dist/service/DataSourceService.js",
27
+ "./service/GraphicReportService": "./dist/service/GraphicReportService.js",
28
+ "./service/InsightReport": "./dist/service/InsightReport.js",
29
+ "./service/MetadataService": "./dist/service/MetadataService.js",
30
+ "./service/OfficeReport": "./dist/service/OfficeReport.js",
31
+ "./service/OfficeReportService": "./dist/service/OfficeReportService.js",
32
+ "./service/OltpMetadataService": "./dist/service/OltpMetadataService.js",
33
+ "./service/ParameterService": "./dist/service/ParameterService.js",
34
+ "./service/PoolService": "./dist/service/PoolService.js",
35
+ "./service/PortalService": "./dist/service/PortalService.js",
36
+ "./service/Report": "./dist/service/Report.js",
37
+ "./service/ScheduleTaskService": "./dist/service/ScheduleTaskService.js",
38
+ "./service/SimpleReportService": "./dist/service/SimpleReportService.js",
39
+ "./service/SpreadSheetReportService": "./dist/service/SpreadSheetReportService.js",
40
+ "./service/SSReport": "./dist/service/SSReport.js",
41
+ "./service/SystemConfigService": "./dist/service/SystemConfigService.js",
42
+ "./service/TimeConsuming": "./dist/service/TimeConsuming.js",
43
+ "./service/TimeConsumingService": "./dist/service/TimeConsumingService.js",
44
+ "./service/UserManagerService": "./dist/service/UserManagerService.js",
45
+ "./vite-plugin/vite-plugin-smartbi": "./dist/vite-plugin/vite-plugin-smartbi.js",
46
+ "./vite-plugin/vite-plugin-smartbix": "./dist/vite-plugin/vite-plugin-smartbix.js",
47
+ "./package.json": "./package.json"
140
48
  },
49
+ "types": "./dist/index.d.cts",
141
50
  "files": [
142
51
  "dist"
143
52
  ],
53
+ "scripts": {
54
+ "build": "tsdown",
55
+ "dev": "tsdown --watch",
56
+ "typecheck": "tsc --noEmit",
57
+ "prepublishOnly": "npm run build"
58
+ },
144
59
  "devDependencies": {
145
60
  "@types/fs-extra": "^11.0.4",
146
- "@types/node": "^25.0.10",
147
- "typescript": "~5.9.3",
148
- "vite": "8.0.0-beta.9"
149
- },
150
- "peerDependencies": {
151
- "axios": "^1.3.6",
152
- "chalk": "^5.2.0"
61
+ "@types/node": "^25.2.0",
62
+ "bumpp": "^10.4.0",
63
+ "tsdown": "^0.20.1",
64
+ "typescript": "^5.9.3"
153
65
  },
154
66
  "dependencies": {
155
- "axios": "^1.13.2",
67
+ "@rollup/plugin-commonjs": "^29.0.0",
68
+ "@rollup/plugin-node-resolve": "^16.0.3",
69
+ "@rollup/plugin-terser": "^0.4.4",
70
+ "axios": "^1.13.4",
156
71
  "chalk": "^5.6.2",
157
- "fs-extra": "^11.3.3"
72
+ "fs-extra": "^11.3.3",
73
+ "rollup": "^4.57.1",
74
+ "rollup-plugin-vue": "^5.1.9",
75
+ "vite": "^7.3.1"
158
76
  }
159
77
  }
@@ -1,126 +0,0 @@
1
- /**
2
- * 打开多维报表
3
- * @param reportId 报表ID
4
- * @returns 返回报表客户端ID
5
- */
6
- export const openAnalysisReport = (reportId) => {
7
- return smartbi('AnalysisReportService', 'openAnalysisReport', [reportId]);
8
- };
9
- /**
10
- * 打开多维报表(不初始化)
11
- * @param reportId 报表ID
12
- * @returns 返回报表客户端ID
13
- */
14
- export const openOlapReportWithoutInit = (reportId) => {
15
- return smartbi('AnalysisReportService', 'openOlapReportWithoutInit', [reportId]);
16
- };
17
- /**
18
- * 关闭多维报表
19
- * @param clientId 客户端ID
20
- * @returns 无返回值
21
- */
22
- export const closeAnalysisReport = (clientId) => {
23
- return smartbi('AnalysisReportService', 'closeAnalysisReport', [clientId]);
24
- };
25
- /**
26
- * 设置多维报表参数值
27
- * @param clientId 客户端ID
28
- * @param id 参数ID
29
- * @param value 参数值
30
- * @param displayValue 参数显示值
31
- * @returns 无返回值
32
- */
33
- export const setParamValue = (clientId, id, value, displayValue) => {
34
- return smartbi('AnalysisReportService', 'setParamValue', [clientId, id, value, displayValue]);
35
- };
36
- /**
37
- * 执行多维查询
38
- * @param clientId 客户端ID
39
- * @returns 返回查询结果
40
- */
41
- export const executeQuery = (clientId) => {
42
- return smartbi('AnalysisReportService', 'executeQuery', [clientId]);
43
- };
44
- /**
45
- * 导出报表
46
- * @param clientId 客户端ID
47
- * @param exportType 导出类型
48
- * @param delimiter 分割符
49
- * @param os 输出流
50
- * @param resourceBasePath 资源路径前缀(可选)
51
- * @param valueType 值类型(可选)
52
- * @returns 无返回值
53
- */
54
- export const doExport = (clientId, exportType, delimiter, os, // 输出流
55
- resourceBasePath, valueType) => {
56
- const params = [clientId, exportType, delimiter, os];
57
- if (resourceBasePath !== undefined) {
58
- params.push(resourceBasePath);
59
- if (valueType !== undefined) {
60
- params.push(valueType);
61
- }
62
- }
63
- return smartbi('AnalysisReportService', 'doExport', params);
64
- };
65
- /**
66
- * 设置参数为默认值
67
- * @param clientId 客户端ID
68
- * @param paramId 参数ID
69
- * @returns 无返回值
70
- */
71
- export const setParameterValueAsDefault = (clientId, paramId) => {
72
- return smartbi('AnalysisReportService', 'setParameterValueAsDefault', [clientId, paramId]);
73
- };
74
- /**
75
- * 获取参数
76
- * @param clientId 客户端ID
77
- * @param paramId 参数ID
78
- * @returns 返回参数信息
79
- */
80
- export const getParameter = (clientId, paramId) => {
81
- return smartbi('AnalysisReportService', 'getParameter', [clientId, paramId]);
82
- };
83
- /**
84
- * 获取参数显示值
85
- * @param clientId 客户端ID
86
- * @param paramId 参数ID
87
- * @returns 返回参数显示值
88
- */
89
- export const getParameterDisplayValue = (clientId, paramId) => {
90
- return smartbi('AnalysisReportService', 'getParameterDisplayValue', [clientId, paramId]);
91
- };
92
- /**
93
- * 获取参数默认值
94
- * @param clientId 客户端ID
95
- * @param paramId 参数ID
96
- * @returns 返回参数默认值列表
97
- */
98
- export const getParameterDefaultValue = (clientId, paramId) => {
99
- return smartbi('AnalysisReportService', 'getParameterDefaultValue', [clientId, paramId]);
100
- };
101
- /**
102
- * 获取所有参数
103
- * @param clientId 客户端ID
104
- * @returns 返回参数列表
105
- */
106
- export const getParameters = (clientId) => {
107
- return smartbi('AnalysisReportService', 'getParameters', [clientId]);
108
- };
109
- /**
110
- * 获取参数候选值列表
111
- * @param clientId 客户端ID
112
- * @param paramId 参数ID
113
- * @returns 返回候选值列表
114
- */
115
- export const getParamStandbyValue = (clientId, paramId) => {
116
- return smartbi('AnalysisReportService', 'getParamStandbyValue', [clientId, paramId]);
117
- };
118
- /**
119
- * 获取执行状态
120
- * @param clientId 客户端ID
121
- * @returns 返回执行状态信息
122
- */
123
- export const getExecutingState = (clientId) => {
124
- return smartbi('AnalysisReportService', 'getExecutingState', [clientId]);
125
- };
126
- import { smartbi } from "../index";
@@ -1,8 +0,0 @@
1
- /**
2
- * 创建业务对象
3
- * @param businessThemeId 业务主题ID
4
- * @param parentId 业务对象父ID
5
- * @param tableId 表ID
6
- * @returns 无返回值
7
- */
8
- export declare const createBusinessThemeObject: (businessThemeId: string, parentId: string, tableId: string) => Promise<void>;
@@ -1,11 +0,0 @@
1
- import { smartbi } from '../index';
2
- /**
3
- * 创建业务对象
4
- * @param businessThemeId 业务主题ID
5
- * @param parentId 业务对象父ID
6
- * @param tableId 表ID
7
- * @returns 无返回值
8
- */
9
- export const createBusinessThemeObject = (businessThemeId, parentId, tableId) => {
10
- return smartbi('BusinessThemeService', 'createBusinessThemeObject', [businessThemeId, parentId, tableId]);
11
- };
@@ -1,120 +0,0 @@
1
- import { smartbi } from "../index";
2
- /**
3
- * 根据数据集(可视化查询、原生SQL查询、SQL查询)的ID查询其SQL语句
4
- * @param bizViewId (可视化查询、原生SQL查询、SQL查询)的ID
5
- * @returns 返回其SQL语句
6
- */
7
- export const getSqlString = (bizViewId) => {
8
- return smartbi('BusinessViewService', 'getSqlString', [bizViewId]);
9
- };
10
- /**
11
- * 打开业务查询以备读取结果集数据
12
- * @param bizViewId 业务查询ID
13
- * @param paramsJsonArrStr 报表的参数信息
14
- * @param rowsPerPage 加载数据时每页返回的行数
15
- * @param getTotalRows 是否获取总行数
16
- * @returns 返回查询基本元数据信息
17
- */
18
- export const openLoadDataView = (bizViewId, paramsJsonArrStr, rowsPerPage, getTotalRows) => {
19
- return smartbi('BusinessViewService', 'openLoadDataView', [bizViewId, paramsJsonArrStr, rowsPerPage, getTotalRows]);
20
- };
21
- /**
22
- * 按页读取结果集数据
23
- * @param loadDataClientId 打开查询后的客户端标识
24
- * @param pageNum 页码(第1页的页码为0,第2页的页码为1,如此类推)
25
- * @returns 返回原始报表数据
26
- */
27
- export const loadViewData = (loadDataClientId, pageNum) => {
28
- return smartbi('BusinessViewService', 'loadViewData', [loadDataClientId, pageNum]);
29
- };
30
- /**
31
- * 按页读取结果集数据
32
- * @param loadDataClientId 打开查询后的客户端标识
33
- * @param pageNum 页码(第1页的页码为0,第2页的页码为1,如此类推)
34
- * @param dataFormatMap 数据格式映射,如:"DOUBLE", "<浮点型-默认值>",目前仅支持double
35
- * @returns 返回原始报表数据
36
- */
37
- export const loadViewDataWithDataformat = (loadDataClientId, pageNum, dataFormatMap) => {
38
- return smartbi('BusinessViewService', 'loadViewDataWithDataformat', [loadDataClientId, pageNum, dataFormatMap.toString()]);
39
- };
40
- /**
41
- * 关闭业务查询
42
- * @param loadDataClientId 打开查询后的客户端标识
43
- * @returns 无返回值
44
- */
45
- export const closeLoadDataView = (loadDataClientId) => {
46
- return smartbi('BusinessViewService', 'closeLoadDataView', [loadDataClientId]);
47
- };
48
- /**
49
- * 打开业务查询
50
- * @param bizViewId 打开业务查询ID
51
- * @returns 返回业务查询结果
52
- */
53
- export const openBusinessView = (bizViewId) => {
54
- return smartbi('BusinessViewService', 'openBusinessView', [bizViewId]);
55
- };
56
- /**
57
- * 关闭业务查询
58
- * @param bizViewClientId 打开查询后的客户端标识
59
- * @returns 无返回值
60
- */
61
- export const closeBusinessView = (bizViewClientId) => {
62
- return smartbi('BusinessViewService', 'closeBusinessView', [bizViewClientId]);
63
- };
64
- /**
65
- * 检测输出字段
66
- * @param bizViewClientId 打开查询后的客户端标识
67
- * @returns 无返回值
68
- */
69
- export const getRawSqlOutputField = (bizViewClientId) => {
70
- return smartbi('BusinessViewService', 'getRawSqlOutputField', [bizViewClientId]);
71
- };
72
- /**
73
- * 检测输出字段
74
- * @param clientId 客户端ID
75
- * @returns 返回输出字段
76
- */
77
- export const detectOutputFields = (clientId) => {
78
- return smartbi('BusinessViewService', 'detectOutputFields', [clientId]);
79
- };
80
- /**
81
- * 覆盖业务视图
82
- * @param bizViewClientId 业务视图ID
83
- * @returns 无返回值
84
- */
85
- export const overwriteBusinessView = (bizViewClientId) => {
86
- return smartbi('BusinessViewService', 'overwriteBusinessView', [bizViewClientId]);
87
- };
88
- /**
89
- * 创建"原生SQL查询"数据集,并保存到指定目录下
90
- * @param datasourceId 数据源ID
91
- * @param sql "原生SQL查询"的SQL语句
92
- * @param name 数据集的名称
93
- * @param alias 数据集的别名
94
- * @param desc 数据集的描述
95
- * @param folderId 用来保存数据集的指定目录ID
96
- * @returns 返回所创建的"原生SQL查询"数据集ID
97
- */
98
- export const createRawSqlQueryBusinessViewAndSave = (datasourceId, sql, name, alias, desc, folderId) => {
99
- return smartbi('BusinessViewService', 'createRawSqlQueryBusinessViewAndSave', [datasourceId, sql, name, alias, desc, folderId]);
100
- };
101
- /**
102
- * 更新指定的"原生SQL查询"数据集的SQL语句,并自动检测输出字段
103
- * @param businessViewId "原生SQL查询"数据集ID
104
- * @param sql 新的SQL语句
105
- * @returns 返回数据集ID
106
- */
107
- export const updateRawSqlQueryBusinessView = (businessViewId, sql) => {
108
- return smartbi('BusinessViewService', 'updateRawSqlQueryBusinessView', [businessViewId, sql]);
109
- };
110
- /**
111
- * 设置输出字段信息
112
- * @param businessViewClientId clientId
113
- * @param fieldId 字段信息
114
- * @param propertyName 属性名,如alias,desc,dataType,dataFormat,orderby,transformRule
115
- * @param propertyValue 属性值
116
- * @returns 无返回值
117
- */
118
- export const setOutputFieldInfo = (businessViewClientId, fieldId, propertyName, propertyValue) => {
119
- return smartbi('BusinessViewService', 'setOutputFieldInfo', [businessViewClientId, fieldId, propertyName, propertyValue]);
120
- };