win-chart 1.6.3 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (209) hide show
  1. package/dist/bundle.cjs.js +306 -0
  2. package/dist/bundle.esm.js +306 -0
  3. package/dist/bundle.umd.js +306 -0
  4. package/dist/index.d.ts +384 -0
  5. package/{esm → dist/types}/components/win-card/components/ChartContent.d.ts +1 -2
  6. package/{esm/components/win-card-mobile → dist/types/components/win-card}/components/Indicator.d.ts +1 -1
  7. package/{esm/components/win-card-mobile → dist/types/components/win-card}/components/IndicatorArea.d.ts +1 -1
  8. package/dist/types/components/win-card/components/IndicatorInfo.d.ts +11 -0
  9. package/{esm → dist/types}/components/win-chart/index.d.ts +1 -3
  10. package/{esm → dist/types}/components/win-chart/utils/getAreaSpec.d.ts +1 -1
  11. package/{esm → dist/types}/components/win-chart/utils/getBarSpec.d.ts +1 -1
  12. package/{esm → dist/types}/components/win-chart/utils/getChartOptions.d.ts +1 -1
  13. package/{esm → dist/types}/components/win-chart/utils/getColumnSpec.d.ts +1 -1
  14. package/{esm → dist/types}/components/win-chart/utils/getDualSpec.d.ts +1 -1
  15. package/{esm → dist/types}/components/win-chart/utils/getFunnelSpec.d.ts +1 -1
  16. package/{esm → dist/types}/components/win-chart/utils/getLineSpec.d.ts +1 -1
  17. package/{esm → dist/types}/components/win-chart/utils/getPieSpec.d.ts +1 -1
  18. package/{esm → dist/types}/components/win-chart/utils/getRadarSpec.d.ts +1 -1
  19. package/{esm → dist/types}/components/win-chart/utils/tool.d.ts +1 -1
  20. package/{esm → dist/types}/index.d.ts +2 -1
  21. package/dist/types/services/IndicatorService.d.ts +19 -0
  22. package/dist/types/services/WorkbenchService.d.ts +17 -0
  23. package/{esm/components/win-chart/utils/type.d.ts → dist/types/types/index.d.ts} +22 -9
  24. package/{esm → dist/types}/types/indicator.d.ts +2 -2
  25. package/{esm → dist/types}/types/interface.d.ts +11 -0
  26. package/{esm → dist/types}/utils/index.d.ts +0 -3
  27. package/{esm → dist/types}/utils/map.d.ts +1 -1
  28. package/{esm → dist/types}/utils/url.d.ts +0 -5
  29. package/dist/types/utils/util.d.ts +14 -0
  30. package/package.json +29 -34
  31. package/esm/api/request.js +0 -89
  32. package/esm/api/request.js.map +0 -1
  33. package/esm/components/NoContent.js +0 -70
  34. package/esm/components/NoContent.js.map +0 -1
  35. package/esm/components/VisionUserConfigContext.js +0 -4
  36. package/esm/components/VisionUserConfigContext.js.map +0 -1
  37. package/esm/components/hover-view.js +0 -27
  38. package/esm/components/hover-view.js.map +0 -1
  39. package/esm/components/icon.js +0 -36
  40. package/esm/components/icon.js.map +0 -1
  41. package/esm/components/panel-title-tab.js +0 -40
  42. package/esm/components/panel-title-tab.js.map +0 -1
  43. package/esm/components/win-card/components/ChartContent.js +0 -45
  44. package/esm/components/win-card/components/ChartContent.js.map +0 -1
  45. package/esm/components/win-card/components/Indicator.d.ts +0 -2
  46. package/esm/components/win-card/components/Indicator.js +0 -40
  47. package/esm/components/win-card/components/Indicator.js.map +0 -1
  48. package/esm/components/win-card/components/IndicatorArea.d.ts +0 -2
  49. package/esm/components/win-card/components/IndicatorArea.js +0 -57
  50. package/esm/components/win-card/components/IndicatorArea.js.map +0 -1
  51. package/esm/components/win-card/components/IndicatorInfo.d.ts +0 -14
  52. package/esm/components/win-card/components/IndicatorInfo.js +0 -67
  53. package/esm/components/win-card/components/IndicatorInfo.js.map +0 -1
  54. package/esm/components/win-card/components/MatterContent.js +0 -124
  55. package/esm/components/win-card/components/MatterContent.js.map +0 -1
  56. package/esm/components/win-card/components/MatterList.js +0 -115
  57. package/esm/components/win-card/components/MatterList.js.map +0 -1
  58. package/esm/components/win-card/components/SelectDecoration.js +0 -43
  59. package/esm/components/win-card/components/SelectDecoration.js.map +0 -1
  60. package/esm/components/win-card/components/WinRankContent.js +0 -99
  61. package/esm/components/win-card/components/WinRankContent.js.map +0 -1
  62. package/esm/components/win-card/index.js +0 -270
  63. package/esm/components/win-card/index.js.map +0 -1
  64. package/esm/components/win-card/utils/interface.d.ts +0 -12
  65. package/esm/components/win-card/utils/interface.js +0 -1
  66. package/esm/components/win-card/utils/tool.d.ts +0 -1
  67. package/esm/components/win-card/utils/tool.js +0 -14
  68. package/esm/components/win-card/utils/tool.js.map +0 -1
  69. package/esm/components/win-card-mobile/components/ChartContent.d.ts +0 -8
  70. package/esm/components/win-card-mobile/components/ChartContent.js +0 -36
  71. package/esm/components/win-card-mobile/components/ChartContent.js.map +0 -1
  72. package/esm/components/win-card-mobile/components/DualLineBar.d.ts +0 -2
  73. package/esm/components/win-card-mobile/components/DualLineBar.js +0 -41
  74. package/esm/components/win-card-mobile/components/DualLineBar.js.map +0 -1
  75. package/esm/components/win-card-mobile/components/Indicator.js +0 -40
  76. package/esm/components/win-card-mobile/components/Indicator.js.map +0 -1
  77. package/esm/components/win-card-mobile/components/IndicatorArea.js +0 -59
  78. package/esm/components/win-card-mobile/components/IndicatorArea.js.map +0 -1
  79. package/esm/components/win-card-mobile/components/IndicatorInfo.d.ts +0 -13
  80. package/esm/components/win-card-mobile/components/IndicatorInfo.js +0 -72
  81. package/esm/components/win-card-mobile/components/IndicatorInfo.js.map +0 -1
  82. package/esm/components/win-card-mobile/components/SelectDecoration.d.ts +0 -9
  83. package/esm/components/win-card-mobile/components/SelectDecoration.js +0 -33
  84. package/esm/components/win-card-mobile/components/SelectDecoration.js.map +0 -1
  85. package/esm/components/win-card-mobile/index.d.ts +0 -7
  86. package/esm/components/win-card-mobile/index.js +0 -215
  87. package/esm/components/win-card-mobile/index.js.map +0 -1
  88. package/esm/components/win-card-mobile/utils/interface.d.ts +0 -10
  89. package/esm/components/win-card-mobile/utils/interface.js +0 -1
  90. package/esm/components/win-card-mobile/utils/tool.d.ts +0 -1
  91. package/esm/components/win-card-mobile/utils/tool.js +0 -8
  92. package/esm/components/win-chart/components/chart-wrapper.js +0 -14
  93. package/esm/components/win-chart/components/chart-wrapper.js.map +0 -1
  94. package/esm/components/win-chart/index.js +0 -61
  95. package/esm/components/win-chart/index.js.map +0 -1
  96. package/esm/components/win-chart/theme/win-dark.json +0 -372
  97. package/esm/components/win-chart/theme/win-light.json +0 -372
  98. package/esm/components/win-chart/utils/const.js +0 -34
  99. package/esm/components/win-chart/utils/getAreaSpec.js +0 -149
  100. package/esm/components/win-chart/utils/getAreaSpec.js.map +0 -1
  101. package/esm/components/win-chart/utils/getBarSpec.js +0 -66
  102. package/esm/components/win-chart/utils/getBarSpec.js.map +0 -1
  103. package/esm/components/win-chart/utils/getChartOptions.js +0 -47
  104. package/esm/components/win-chart/utils/getChartOptions.js.map +0 -1
  105. package/esm/components/win-chart/utils/getColumnSpec.js +0 -119
  106. package/esm/components/win-chart/utils/getColumnSpec.js.map +0 -1
  107. package/esm/components/win-chart/utils/getDualSpec.js +0 -168
  108. package/esm/components/win-chart/utils/getDualSpec.js.map +0 -1
  109. package/esm/components/win-chart/utils/getFunnelSpec.js +0 -66
  110. package/esm/components/win-chart/utils/getFunnelSpec.js.map +0 -1
  111. package/esm/components/win-chart/utils/getLineSpec.js +0 -52
  112. package/esm/components/win-chart/utils/getLineSpec.js.map +0 -1
  113. package/esm/components/win-chart/utils/getPieSpec.js +0 -126
  114. package/esm/components/win-chart/utils/getPieSpec.js.map +0 -1
  115. package/esm/components/win-chart/utils/getRadarSpec.js +0 -88
  116. package/esm/components/win-chart/utils/getRadarSpec.js.map +0 -1
  117. package/esm/components/win-chart/utils/tool.js +0 -163
  118. package/esm/components/win-chart/utils/tool.js.map +0 -1
  119. package/esm/components/win-chart/utils/type.js +0 -39
  120. package/esm/components/win-icon/index.js +0 -79
  121. package/esm/components/win-icon/index.js.map +0 -1
  122. package/esm/components/win-wrappers/card-wrapper.js +0 -170
  123. package/esm/components/win-wrappers/card-wrapper.js.map +0 -1
  124. package/esm/components/win-wrappers/dot-wrapper.js +0 -29
  125. package/esm/components/win-wrappers/dot-wrapper.js.map +0 -1
  126. package/esm/components/win-wrappers/iframe-wrapper.js +0 -14
  127. package/esm/components/win-wrappers/iframe-wrapper.js.map +0 -1
  128. package/esm/components/win-wrappers/request-wrapper.js +0 -170
  129. package/esm/components/win-wrappers/request-wrapper.js.map +0 -1
  130. package/esm/hooks/useCardOptionList.js +0 -58
  131. package/esm/hooks/useCardOptionList.js.map +0 -1
  132. package/esm/hooks/useHasIntersected.js +0 -33
  133. package/esm/hooks/useHasIntersected.js.map +0 -1
  134. package/esm/index.js +0 -7
  135. package/esm/index.js.map +0 -1
  136. package/esm/services/CardService.js +0 -183
  137. package/esm/services/CardService.js.map +0 -1
  138. package/esm/services/IndicatorService.d.ts +0 -138
  139. package/esm/services/IndicatorService.js +0 -732
  140. package/esm/services/IndicatorService.js.map +0 -1
  141. package/esm/services/WorkbenchService.d.ts +0 -129
  142. package/esm/services/WorkbenchService.js +0 -718
  143. package/esm/services/WorkbenchService.js.map +0 -1
  144. package/esm/types/enum.js +0 -98
  145. package/esm/types/index.d.ts +0 -14
  146. package/esm/types/index.js +0 -9
  147. package/esm/types/index.js.map +0 -1
  148. package/esm/types/indicator.js +0 -1
  149. package/esm/types/interface.js +0 -1
  150. package/esm/types/portal.js +0 -1
  151. package/esm/types/report.js +0 -1
  152. package/esm/types/type.js +0 -1
  153. package/esm/types/user.js +0 -1
  154. package/esm/typings.d.ts +0 -1
  155. package/esm/utils/arms.js +0 -46
  156. package/esm/utils/arr.js +0 -132
  157. package/esm/utils/arr.js.map +0 -1
  158. package/esm/utils/const.js +0 -11
  159. package/esm/utils/index.js +0 -14
  160. package/esm/utils/index.js.map +0 -1
  161. package/esm/utils/init.js +0 -7
  162. package/esm/utils/init.js.map +0 -1
  163. package/esm/utils/map.js +0 -509
  164. package/esm/utils/map.js.map +0 -1
  165. package/esm/utils/number.d.ts +0 -44
  166. package/esm/utils/number.js +0 -92
  167. package/esm/utils/number.js.map +0 -1
  168. package/esm/utils/str.js +0 -21
  169. package/esm/utils/tools.d.ts +0 -7
  170. package/esm/utils/tools.js +0 -35
  171. package/esm/utils/tools.js.map +0 -1
  172. package/esm/utils/tree.d.ts +0 -49
  173. package/esm/utils/tree.js +0 -153
  174. package/esm/utils/tree.js.map +0 -1
  175. package/esm/utils/url.js +0 -40
  176. package/esm/utils/url.js.map +0 -1
  177. package/esm/utils/util.d.ts +0 -38
  178. package/esm/utils/util.js +0 -89
  179. package/esm/utils/util.js.map +0 -1
  180. /package/{esm → dist/types}/api/request.d.ts +0 -0
  181. /package/{esm → dist/types}/components/NoContent.d.ts +0 -0
  182. /package/{esm → dist/types}/components/VisionUserConfigContext.d.ts +0 -0
  183. /package/{esm → dist/types}/components/hover-view.d.ts +0 -0
  184. /package/{esm → dist/types}/components/icon.d.ts +0 -0
  185. /package/{esm → dist/types}/components/panel-title-tab.d.ts +0 -0
  186. /package/{esm → dist/types}/components/win-card/components/MatterContent.d.ts +0 -0
  187. /package/{esm → dist/types}/components/win-card/components/MatterList.d.ts +0 -0
  188. /package/{esm → dist/types}/components/win-card/components/SelectDecoration.d.ts +0 -0
  189. /package/{esm → dist/types}/components/win-card/components/WinRankContent.d.ts +0 -0
  190. /package/{esm → dist/types}/components/win-card/index.d.ts +0 -0
  191. /package/{esm → dist/types}/components/win-chart/components/chart-wrapper.d.ts +0 -0
  192. /package/{esm → dist/types}/components/win-chart/utils/const.d.ts +0 -0
  193. /package/{esm → dist/types}/components/win-icon/index.d.ts +0 -0
  194. /package/{esm → dist/types}/components/win-wrappers/card-wrapper.d.ts +0 -0
  195. /package/{esm → dist/types}/components/win-wrappers/dot-wrapper.d.ts +0 -0
  196. /package/{esm → dist/types}/components/win-wrappers/iframe-wrapper.d.ts +0 -0
  197. /package/{esm → dist/types}/components/win-wrappers/request-wrapper.d.ts +0 -0
  198. /package/{esm → dist/types}/hooks/useCardOptionList.d.ts +0 -0
  199. /package/{esm → dist/types}/hooks/useHasIntersected.d.ts +0 -0
  200. /package/{esm → dist/types}/services/CardService.d.ts +0 -0
  201. /package/{esm → dist/types}/types/enum.d.ts +0 -0
  202. /package/{esm → dist/types}/types/portal.d.ts +0 -0
  203. /package/{esm → dist/types}/types/report.d.ts +0 -0
  204. /package/{esm → dist/types}/types/type.d.ts +0 -0
  205. /package/{esm → dist/types}/types/user.d.ts +0 -0
  206. /package/{esm → dist/types}/utils/arr.d.ts +0 -0
  207. /package/{esm → dist/types}/utils/const.d.ts +0 -0
  208. /package/{esm → dist/types}/utils/init.d.ts +0 -0
  209. /package/{esm → dist/types}/utils/str.d.ts +0 -0
@@ -0,0 +1,384 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import React$1, { CSSProperties } from 'react';
3
+
4
+ declare enum WinCardChartType {
5
+ /**
6
+ * 指标卡片
7
+ */
8
+ INDICATOR = 'INDICATOR',
9
+
10
+ /**
11
+ * 指标加面积图
12
+ */
13
+ INDICATOR_AREA = 'INDICATOR_AREA',
14
+
15
+ /**
16
+ * 指标加面积图
17
+ */
18
+ AREA_CHART = 'AREA_CHART',
19
+
20
+ /**
21
+ * 折线图卡片
22
+ */
23
+ LINE_CHART = 'LINE_CHART',
24
+
25
+ /**
26
+ * 柱状图
27
+ */
28
+ COLUMN_CHART = 'COLUMN_CHART',
29
+
30
+ /**
31
+ * 堆叠柱状图
32
+ */
33
+ STACK_COLUMN_CHART = 'STACK_COLUMN_CHART',
34
+
35
+ /**
36
+ * 条形图
37
+ */
38
+ BAR_CHART = 'BAR_CHART',
39
+
40
+ /**
41
+ * 双轴图
42
+ */
43
+ DUAL_LINE_BAR_CHART = 'DUAL_LINE_COLUMN_CHART',
44
+
45
+ /**
46
+ * 漏斗图
47
+ */
48
+ FUNNEL_CHART = 'FUNNEL_CHART',
49
+
50
+ /**
51
+ * 饼图
52
+ */
53
+ PIE_CHART = 'PIE_CHART',
54
+
55
+ /**
56
+ * 饼图(以指标项展示)
57
+ */
58
+ PIE_CHART_RESERVE = 'PIE_CHART_RESERVE',
59
+
60
+ /**
61
+ * 环图
62
+ */
63
+ CYCLE_CHART = 'CYCLE_CHART',
64
+
65
+ /**
66
+ * 雷达图
67
+ */
68
+ RADAR_CHART = 'RADAR_CHART',
69
+
70
+ /**
71
+ * 雷达图(以指标项展示)
72
+ */
73
+ RADAR_CHART_RESERVE = 'RADAR_CHART_RESERVE',
74
+
75
+ /**
76
+ * 自定义卡片
77
+ */
78
+ CUSTOM_CARD = 'CUSTOM_CARD',
79
+ }
80
+
81
+ interface IVisionUserConfig {
82
+ [p: string]: string;
83
+ }
84
+
85
+ /**
86
+ * 页面状态
87
+ */
88
+ type WinCardStatus = 'ONLINE' | 'OFFLINE';
89
+
90
+ interface IIndicatorConfig {
91
+ id: number;
92
+
93
+ /**
94
+ * 单位
95
+ */
96
+ unit: string;
97
+ /**
98
+ * 指标所在侧 0 左 1 右
99
+ */
100
+ yAxis: number;
101
+
102
+ /**
103
+ * 指标别名
104
+ */
105
+ alias?: string;
106
+
107
+ /**
108
+ * 是否堆叠
109
+ */
110
+ isStack?: boolean;
111
+
112
+ extra?: {
113
+ /**
114
+ * 默认 0 日期 0 目标 1
115
+ */
116
+ subTitle: number;
117
+ };
118
+ }
119
+
120
+ type IndicatorCardSize = 'min' | 'medium' | 'max';
121
+
122
+ interface IIndicatorCardConfig {
123
+ subscribed?: boolean;
124
+ name: string;
125
+ id: number;
126
+ type: string;
127
+ dataAccCode: string;
128
+
129
+ /**
130
+ * 业务分类
131
+ */
132
+ bizCode: string;
133
+
134
+ /**
135
+ * 卡片类型
136
+ */
137
+ chartType: WinCardChartType;
138
+
139
+ /**
140
+ * 占多少个网格
141
+ */
142
+ colWidth: number;
143
+ colHeight: number;
144
+ description: string;
145
+ detailUrl: string;
146
+ status: WinCardStatus;
147
+
148
+ /**
149
+ * 排序
150
+ */
151
+ rankOrder: number;
152
+ commonConfig: {
153
+ orgLevel: string;
154
+ labelField: string;
155
+ limit: number;
156
+ color?: string[];
157
+ yStart?: number[];
158
+ xAxisLabelRotate?: number;
159
+ xAxisLabelLength?: number;
160
+ sort?: 'asc' | 'desc';
161
+ };
162
+ indicatorConfig: IIndicatorConfig[];
163
+ sizeMap: {
164
+ min: [1, 2];
165
+ medium: [1, 4];
166
+ max: [2, 4];
167
+ };
168
+ size: IndicatorCardSize;
169
+ }
170
+
171
+ /**
172
+ * 标准图表数据
173
+ */
174
+ interface ICharInfo$1 {
175
+ label: string;
176
+ value: number;
177
+ type?: string;
178
+ }
179
+
180
+ interface IWinChartProps$1 {
181
+ theme?: 'light' | 'dark';
182
+ sort?: 'asc' | 'desc';
183
+ color?: string[];
184
+ chartType?: WinChartType$1;
185
+ xAxisLabelRotate?: number;
186
+ xAxisLabelLength?: number;
187
+ data?: ICharInfo$1[];
188
+ extraData?: ICharInfo$1[];
189
+ className?: string;
190
+ style?: React.CSSProperties;
191
+
192
+ /**
193
+ * label 与 value 取值互换 (只作用饼图、环图、雷达图图表)
194
+ */
195
+ reserveValueWithLabelType?: boolean;
196
+
197
+ /**
198
+ * Y 轴起始值
199
+ */
200
+ yStart?: number[];
201
+
202
+ /**
203
+ * 系列配置
204
+ */
205
+ extraSeriesOption?: echarts.SeriesOption[];
206
+
207
+ /**
208
+ * 自定义配置,优先级最高,会覆盖默认配置(采用deepmerge,只覆盖差异部分)
209
+ */
210
+ extraOption?: echarts.EChartsOption;
211
+ }
212
+
213
+ /**
214
+ * 图表类型
215
+ */
216
+ declare enum WinChartType$1 {
217
+ /**
218
+ * MINI面积图
219
+ */
220
+ MINI_AREA,
221
+
222
+ /**
223
+ * 面积图
224
+ */
225
+ AREA,
226
+
227
+ /**
228
+ * 双轴图
229
+ */
230
+ DUAL_LINE_BAR,
231
+
232
+ /**
233
+ * 堆叠双轴图
234
+ */
235
+ STACK_DUAL_LINE_BAR,
236
+
237
+ /**
238
+ * 柱状图
239
+ */
240
+ COLUMN,
241
+
242
+ /**
243
+ * 堆叠柱状图
244
+ */
245
+ STACK_COLUMN,
246
+
247
+ /**
248
+ * 折线图
249
+ */
250
+ LINE,
251
+
252
+ /**
253
+ * 条形图
254
+ */
255
+ BAR,
256
+
257
+ /**
258
+ * 漏斗图
259
+ */
260
+ FUNNEL,
261
+
262
+ /**
263
+ * 饼图
264
+ */
265
+ PIE,
266
+
267
+ /**
268
+ * 环形图
269
+ */
270
+ CYCLE,
271
+
272
+ /**
273
+ * 雷达图
274
+ */
275
+ RADAR,
276
+ }
277
+
278
+ declare const WinChart: ({ className, style, extraOption, theme, ...args }: IWinChartProps$1) => react_jsx_runtime.JSX.Element;
279
+
280
+ interface IProps {
281
+ id: number;
282
+ config?: IIndicatorCardConfig;
283
+ style?: CSSProperties;
284
+ context?: React.Context<IVisionUserConfig>;
285
+ fixSize?: boolean;
286
+ spanWidth?: number;
287
+ spanHeight?: number;
288
+ showSwitch?: boolean;
289
+ }
290
+ declare const WinCard: ({ id, config, style, fixSize, context, spanWidth, spanHeight, showSwitch, }: IProps) => react_jsx_runtime.JSX.Element;
291
+
292
+ declare const VisionUserConfigContext: React$1.Context<IVisionUserConfig>;
293
+
294
+ /**
295
+ * 标准图表数据
296
+ */
297
+ interface ICharInfo {
298
+ label: string;
299
+ value: number;
300
+ type?: string;
301
+ }
302
+ interface IWinChartProps {
303
+ theme?: 'light' | 'dark';
304
+ sort?: 'asc' | 'desc';
305
+ color?: string[];
306
+ chartType?: WinChartType;
307
+ xAxisLabelRotate?: number;
308
+ xAxisLabelLength?: number;
309
+ data?: ICharInfo[];
310
+ extraData?: ICharInfo[];
311
+ className?: string;
312
+ style?: React.CSSProperties;
313
+ /**
314
+ * label 与 value 取值互换 (只作用饼图、环图、雷达图图表)
315
+ */
316
+ reserveValueWithLabelType?: boolean;
317
+ /**
318
+ * Y 轴起始值
319
+ */
320
+ yStart?: number[];
321
+ /**
322
+ * 系列配置
323
+ */
324
+ extraSeriesOption?: echarts.SeriesOption[];
325
+ /**
326
+ * 自定义配置,优先级最高,会覆盖默认配置(采用deepmerge,只覆盖差异部分)
327
+ */
328
+ extraOption?: echarts.EChartsOption;
329
+ }
330
+ /**
331
+ * 图表类型
332
+ */
333
+ declare enum WinChartType {
334
+ /**
335
+ * MINI面积图
336
+ */
337
+ MINI_AREA = 0,
338
+ /**
339
+ * 面积图
340
+ */
341
+ AREA = 1,
342
+ /**
343
+ * 双轴图
344
+ */
345
+ DUAL_LINE_BAR = 2,
346
+ /**
347
+ * 堆叠双轴图
348
+ */
349
+ STACK_DUAL_LINE_BAR = 3,
350
+ /**
351
+ * 柱状图
352
+ */
353
+ COLUMN = 4,
354
+ /**
355
+ * 堆叠柱状图
356
+ */
357
+ STACK_COLUMN = 5,
358
+ /**
359
+ * 折线图
360
+ */
361
+ LINE = 6,
362
+ /**
363
+ * 条形图
364
+ */
365
+ BAR = 7,
366
+ /**
367
+ * 漏斗图
368
+ */
369
+ FUNNEL = 8,
370
+ /**
371
+ * 饼图
372
+ */
373
+ PIE = 9,
374
+ /**
375
+ * 环形图
376
+ */
377
+ CYCLE = 10,
378
+ /**
379
+ * 雷达图
380
+ */
381
+ RADAR = 11
382
+ }
383
+
384
+ export { type IWinChartProps, VisionUserConfigContext, WinCard, WinChart, WinChartType, WinChart as default };
@@ -1,5 +1,4 @@
1
- import { IContentProps } from '../utils/interface';
2
- import { WinChartType } from '@/components/win-chart';
1
+ import { IContentProps, WinChartType } from '@/types';
3
2
  interface IProps extends IContentProps {
4
3
  winChartType: WinChartType;
5
4
  reserveValueWithLabelType?: boolean;
@@ -1,2 +1,2 @@
1
- import { IContentProps } from '../utils/interface';
1
+ import { IContentProps } from '@/types';
2
2
  export declare const Indicator: ({ configData, unit, orgLevelVal }: IContentProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1,2 @@
1
- import { IContentProps } from '../utils/interface';
1
+ import { IContentProps } from '@/types';
2
2
  export declare const IndicatorArea: ({ configData, orgLevelVal }: IContentProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,11 @@
1
+ import { IStyleProps } from '@/types';
2
+ import { ReactNode } from 'react';
3
+ interface IProps extends IStyleProps {
4
+ label: string;
5
+ value: ReactNode;
6
+ unit: string;
7
+ jumpUrl?: string;
8
+ isUnitWrap?: boolean;
9
+ }
10
+ export declare const IndicatorInfo: ({ label, value, unit, jumpUrl, isUnitWrap, ...args }: Partial<IProps>) => import("react/jsx-runtime").JSX.Element;
11
+ export {};
@@ -1,4 +1,2 @@
1
- import { IWinChartProps } from './utils/type';
2
- export * from './utils/const';
3
- export * from './utils/type';
1
+ import { IWinChartProps } from '@/types';
4
2
  export declare const WinChart: ({ className, style, extraOption, theme, ...args }: IWinChartProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,4 @@
1
- import { IWinChartProps } from './type';
1
+ import { IWinChartProps } from '@/types';
2
2
  import * as echarts from 'echarts';
3
3
  /**
4
4
  * Mini 面积图
@@ -1,4 +1,4 @@
1
- import { IWinChartProps } from './type';
1
+ import { IWinChartProps } from '@/types';
2
2
  import * as echarts from 'echarts';
3
3
  /**
4
4
  * 条形图
@@ -1,4 +1,4 @@
1
- import { IWinChartProps } from './type';
1
+ import { IWinChartProps } from '@/types';
2
2
  /**
3
3
  * 获取图表配置
4
4
  * @param chartType
@@ -1,4 +1,4 @@
1
- import { IWinChartProps } from './type';
1
+ import { IWinChartProps } from '@/types';
2
2
  import * as echarts from 'echarts';
3
3
  /**
4
4
  * 柱状图
@@ -1,4 +1,4 @@
1
- import { IWinChartProps } from './type';
1
+ import { IWinChartProps } from '@/types';
2
2
  /**
3
3
  * 双轴图(分组柱状 折线)
4
4
  * @param winChartProps
@@ -1,4 +1,4 @@
1
- import { IWinChartProps } from './type';
1
+ import { IWinChartProps } from '@/types';
2
2
  import * as echarts from 'echarts';
3
3
  /**
4
4
  * 漏斗图
@@ -1,4 +1,4 @@
1
- import { IWinChartProps } from './type';
1
+ import { IWinChartProps } from '@/types';
2
2
  import * as echarts from 'echarts';
3
3
  /**
4
4
  * 折线图
@@ -1,4 +1,4 @@
1
- import { IWinChartProps } from './type';
1
+ import { IWinChartProps } from '@/types';
2
2
  /**
3
3
  * 饼图
4
4
  * @param winChartProps
@@ -1,4 +1,4 @@
1
- import { IWinChartProps } from './type';
1
+ import { IWinChartProps } from '@/types';
2
2
  /**
3
3
  * 雷达图
4
4
  * @param winChartProps
@@ -1,4 +1,4 @@
1
- import { ICharInfo, IWinChartProps } from './type';
1
+ import { ICharInfo, IWinChartProps } from '@/types';
2
2
  /**
3
3
  * 数据转百分比
4
4
  * @param value
@@ -1,5 +1,6 @@
1
- import { IWinChartProps, WinChart, WinChartType } from './components/win-chart';
1
+ import { WinChart } from './components/win-chart';
2
2
  import { WinCard } from './components/win-card';
3
3
  import { VisionUserConfigContext } from './components/VisionUserConfigContext';
4
+ import { IWinChartProps, WinChartType } from './types';
4
5
  export { WinChart, WinChartType, IWinChartProps, WinCard, VisionUserConfigContext, };
5
6
  export default WinChart;
@@ -0,0 +1,19 @@
1
+ import { IIndicatorCardConfig, IIndicatorDataInfo } from '@/types';
2
+ export declare class IndicatorService {
3
+ /**
4
+ * 指标服务通用接口
5
+ * @param request
6
+ * @returns
7
+ */
8
+ static getConfigInfo(request?: {
9
+ url: string;
10
+ }): Promise<IIndicatorCardConfig>;
11
+ /**
12
+ * 指标服务通用接口 List
13
+ * @param request
14
+ * @returns
15
+ */
16
+ static getDataInfoList(request?: {
17
+ url: string;
18
+ }): Promise<IIndicatorDataInfo>;
19
+ }
@@ -0,0 +1,17 @@
1
+ import { ICnTableData, IMatterInfo, IRankInfo } from '@/types';
2
+ export declare class WorkbenchService {
3
+ /**
4
+ * 获取事项数据
5
+ * @returns
6
+ */
7
+ static getMatterDataList(data?: {
8
+ workflowType: string;
9
+ currentPage?: number;
10
+ pageSize?: number;
11
+ }): Promise<ICnTableData<IMatterInfo>>;
12
+ /**
13
+ * 查询红黑榜单
14
+ * @returns
15
+ */
16
+ static queryWinRankList(): Promise<IRankInfo[]>;
17
+ }
@@ -1,4 +1,25 @@
1
- /// <reference types="react" />
1
+ import { CSSProperties } from 'react';
2
+ export type Fn = (...args: unknown[]) => unknown;
3
+ export * from './user';
4
+ export * from './portal';
5
+ export * from './indicator';
6
+ export * from './interface';
7
+ export * from './enum';
8
+ export * from './type';
9
+ export * from './report';
10
+ /**
11
+ * 标准图表数据
12
+ */
13
+ export interface ICharInfo {
14
+ label: string;
15
+ value: number;
16
+ type?: string;
17
+ }
18
+ export interface IStyleProps {
19
+ style?: CSSProperties;
20
+ className?: string;
21
+ id?: string;
22
+ }
2
23
  export interface IWinChartProps {
3
24
  theme?: 'light' | 'dark';
4
25
  sort?: 'asc' | 'desc';
@@ -80,11 +101,3 @@ export declare enum WinChartType {
80
101
  */
81
102
  RADAR = 11
82
103
  }
83
- /**
84
- * 标准图表数据
85
- */
86
- export interface ICharInfo {
87
- label: string;
88
- value: number;
89
- type?: string;
90
- }
@@ -1,4 +1,4 @@
1
- import { ICharInfo } from '@/components/win-chart';
1
+ import { ICharInfo } from '.';
2
2
  import { WinCardChartType } from './enum';
3
3
  import { IListItem } from './interface';
4
4
  import { WinCardStatus } from './type';
@@ -83,7 +83,7 @@ export interface IIndicatorDataInfo {
83
83
  value: string;
84
84
  expected: string;
85
85
  };
86
- list0?: IIndicatorListInfo[];
86
+ list0?: ICharInfo[];
87
87
  list1?: IIndicatorListInfo[];
88
88
  }
89
89
  export interface IIndicatorInfo {
@@ -257,4 +257,15 @@ export interface IWorkbenchOptions {
257
257
  LEVEL_4?: IListItem[];
258
258
  LEVEL_5?: IListItem[];
259
259
  }
260
+ export interface IContentProps {
261
+ color?: string[];
262
+ configData: IIndicatorCardConfig;
263
+ theme?: string;
264
+ orgLevelVal?: string;
265
+ unit?: string;
266
+ extraCondition?: {
267
+ [p: string]: string;
268
+ };
269
+ visionUserConfig: IVisionUserConfig;
270
+ }
260
271
  export {};
@@ -4,10 +4,7 @@
4
4
  import './init';
5
5
  export * from './const';
6
6
  export * from './str';
7
- export * from './tools';
8
7
  export * from './url';
9
8
  export * from './util';
10
- export * from './number';
11
9
  export * from './map';
12
10
  export * from './arr';
13
- export * from './tree';
@@ -1,5 +1,5 @@
1
- import { WinChartType } from '@/components/win-chart';
2
1
  import { IListItem, MatterType, WinCardChartType, WinCardType } from '@/types';
2
+ import { WinChartType } from '..';
3
3
  /**
4
4
  * 时间范围列表
5
5
  */
@@ -1,8 +1,3 @@
1
- /**
2
- * 获取地址栏参数
3
- * @returns
4
- */
5
- export declare const getSearchParams: () => Record<string, string>;
6
1
  /**
7
2
  * 拼接 Query
8
3
  * @param url
@@ -0,0 +1,14 @@
1
+ import { IListItem, IResponse } from '@/types';
2
+ /**
3
+ * 过滤接口返回内容
4
+ * @param {*} res
5
+ * @returns
6
+ */
7
+ export declare function handleResult<T>({ success, data, errorMsg }: IResponse<T>): T;
8
+ /**
9
+ * 获取值列表值
10
+ * @param list
11
+ * @param value
12
+ * @returns
13
+ */
14
+ export declare function getListLabel<T>(list: IListItem<T>[], value?: T): string;