win-chart 1.0.1 → 1.0.2

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 (184) hide show
  1. package/.vscode/settings.json +166 -0
  2. package/build/index.html +1 -0
  3. package/build/js/index.js +1 -0
  4. package/build/report-web.html +39 -0
  5. package/package.json +2 -2
  6. package/rsbuild.config.ts +5 -0
  7. package/tsconfig.json +1 -0
  8. package/src/api/README.md +0 -15
  9. package/src/api/index.js +0 -5
  10. package/src/api/layout/index.js +0 -32
  11. package/src/api/request.ts +0 -87
  12. package/src/api/url-map/index.js +0 -10
  13. package/src/api/user/index.js +0 -12
  14. package/src/components/FilterContext.tsx +0 -6
  15. package/src/components/GlobalStyle.tsx +0 -25
  16. package/src/components/HalfScreenBrowser.tsx +0 -95
  17. package/src/components/ImgBox.tsx +0 -19
  18. package/src/components/JumpBtn.tsx +0 -38
  19. package/src/components/MCardWrapper.tsx +0 -33
  20. package/src/components/NoContent/index.tsx +0 -85
  21. package/src/components/ResponsiveReactGridLayout.tsx +0 -218
  22. package/src/components/SliderDecoration.tsx +0 -27
  23. package/src/components/VisionUserConfigContext.ts +0 -6
  24. package/src/components/WinMenu/README.md +0 -11
  25. package/src/components/WinMenu/WinHeader.tsx +0 -5
  26. package/src/components/WinMenu/components/ExtraBox.tsx +0 -61
  27. package/src/components/WinMenu/components/FullMenuBox.tsx +0 -80
  28. package/src/components/WinMenu/components/FullMenuContainer.tsx +0 -50
  29. package/src/components/WinMenu/components/FullMenuItem.tsx +0 -128
  30. package/src/components/WinMenu/components/LangSwitch.tsx +0 -84
  31. package/src/components/WinMenu/components/LogoBox.tsx +0 -29
  32. package/src/components/WinMenu/components/PinDialog.tsx +0 -72
  33. package/src/components/WinMenu/components/PinnedMenuBox.tsx +0 -183
  34. package/src/components/WinMenu/components/UserBox.tsx +0 -83
  35. package/src/components/WinMenu/hooks/useUserInfo.ts +0 -21
  36. package/src/components/WinMenu/hooks/useUserMenu.ts +0 -35
  37. package/src/components/WinMenu/index.tsx +0 -100
  38. package/src/components/WinMenu/services/WinService.ts +0 -79
  39. package/src/components/WinMenu/services/request.ts +0 -53
  40. package/src/components/WinMenu/utils/const.ts +0 -80
  41. package/src/components/WinMenu/utils/enum.ts +0 -19
  42. package/src/components/WinMenu/utils/interface.ts +0 -61
  43. package/src/components/WinMenu/utils/map.ts +0 -39
  44. package/src/components/WinMenu/utils/tool.ts +0 -142
  45. package/src/components/WinMenu/utils/type.ts +0 -1
  46. package/src/components/hover-view.tsx +0 -48
  47. package/src/components/icon.tsx +0 -44
  48. package/src/components/indicator-remark.tsx +0 -25
  49. package/src/components/none-content.tsx +0 -93
  50. package/src/components/panel-tab.tsx +0 -150
  51. package/src/components/panel-title-tab.tsx +0 -60
  52. package/src/components/win-card/components/ChartContent.tsx +0 -47
  53. package/src/components/win-card/components/Indicator.tsx +0 -42
  54. package/src/components/win-card/components/IndicatorArea.tsx +0 -63
  55. package/src/components/win-card/components/IndicatorInfo.tsx +0 -78
  56. package/src/components/win-card/components/MatterContent.tsx +0 -121
  57. package/src/components/win-card/components/MatterList.tsx +0 -141
  58. package/src/components/win-card/components/NoticeContent.tsx +0 -73
  59. package/src/components/win-card/components/NoticeList.tsx +0 -68
  60. package/src/components/win-card/components/SelectDecoration.tsx +0 -34
  61. package/src/components/win-card/components/WinRankContent.tsx +0 -102
  62. package/src/components/win-card/index.tsx +0 -298
  63. package/src/components/win-card/utils/interface.ts +0 -12
  64. package/src/components/win-card/utils/tool.ts +0 -11
  65. package/src/components/win-card-mobile/components/ChartContent.tsx +0 -47
  66. package/src/components/win-card-mobile/components/DualLineBar.tsx +0 -61
  67. package/src/components/win-card-mobile/components/Indicator.tsx +0 -42
  68. package/src/components/win-card-mobile/components/IndicatorArea.tsx +0 -65
  69. package/src/components/win-card-mobile/components/IndicatorInfo.tsx +0 -83
  70. package/src/components/win-card-mobile/components/SelectDecoration.tsx +0 -28
  71. package/src/components/win-card-mobile/index.tsx +0 -235
  72. package/src/components/win-card-mobile/utils/interface.ts +0 -12
  73. package/src/components/win-card-mobile/utils/tool.ts +0 -9
  74. package/src/components/win-chart/components/chart-wrapper.tsx +0 -5
  75. package/src/components/win-chart/index.tsx +0 -59
  76. package/src/components/win-chart/theme/win-dark.json +0 -372
  77. package/src/components/win-chart/theme/win-light.json +0 -372
  78. package/src/components/win-chart/utils/const.ts +0 -37
  79. package/src/components/win-chart/utils/getAreaSpec.ts +0 -150
  80. package/src/components/win-chart/utils/getBarSpec.ts +0 -60
  81. package/src/components/win-chart/utils/getChartOptions.ts +0 -59
  82. package/src/components/win-chart/utils/getColumnSpec.ts +0 -112
  83. package/src/components/win-chart/utils/getDualSpec.ts +0 -79
  84. package/src/components/win-chart/utils/getFunnelSpec.ts +0 -70
  85. package/src/components/win-chart/utils/getLineSpec.ts +0 -53
  86. package/src/components/win-chart/utils/getPieSpec.ts +0 -124
  87. package/src/components/win-chart/utils/getRadarSpec.ts +0 -87
  88. package/src/components/win-chart/utils/tool.ts +0 -163
  89. package/src/components/win-chart/utils/type.ts +0 -96
  90. package/src/components/win-icon/index.tsx +0 -97
  91. package/src/components/win-v/components/EmptyBox.tsx +0 -9
  92. package/src/components/win-v/components/VDialog.tsx +0 -173
  93. package/src/components/win-v/components/VDialogBtn.tsx +0 -119
  94. package/src/components/win-v/components/VDialogMsg.tsx +0 -325
  95. package/src/components/win-v/components/VInput.tsx +0 -15
  96. package/src/components/win-v/components/VRemindMsgList.tsx +0 -303
  97. package/src/components/win-v/components/VRobot.tsx +0 -97
  98. package/src/components/win-v/hooks/useVDialogCore.ts +0 -102
  99. package/src/components/win-v/hooks/useVDialogOperate.ts +0 -132
  100. package/src/components/win-v/hooks/useVDialogState.ts +0 -52
  101. package/src/components/win-v/hooks/useVRemindMsgShow.ts +0 -15
  102. package/src/components/win-v/index.tsx +0 -205
  103. package/src/components/win-wrappers/card-wrapper.tsx +0 -103
  104. package/src/components/win-wrappers/dot-wrapper.tsx +0 -18
  105. package/src/components/win-wrappers/iframe-wrapper.tsx +0 -7
  106. package/src/components/win-wrappers/request-wrapper.tsx +0 -190
  107. package/src/global.d.ts +0 -53
  108. package/src/hooks/useCardOptionList.ts +0 -23
  109. package/src/hooks/useCostFiltersDicList.ts +0 -22
  110. package/src/hooks/useFbiUrl.ts +0 -22
  111. package/src/hooks/useHalfScreenState.ts +0 -50
  112. package/src/hooks/useHasIntersected.ts +0 -36
  113. package/src/hooks/useIndicatorCardInfo.ts +0 -26
  114. package/src/hooks/useIndicatorCardQueryList.ts +0 -22
  115. package/src/hooks/useIndicatorClassifyList.ts +0 -25
  116. package/src/hooks/useIndicatorDetailsDateList.ts +0 -22
  117. package/src/hooks/useIndicatorDetailsInfo.ts +0 -49
  118. package/src/hooks/useIndicatorDetailsTrend.ts +0 -25
  119. package/src/hooks/useIndicatorDicList.ts +0 -22
  120. package/src/hooks/useIndicatorLabelList.ts +0 -20
  121. package/src/hooks/useIndicatorList.ts +0 -24
  122. package/src/hooks/useIndicatorRangeList.ts +0 -20
  123. package/src/hooks/useIndicatorTypeList.ts +0 -20
  124. package/src/hooks/useIndicatorUnitList.ts +0 -21
  125. package/src/hooks/useListenQuery.ts +0 -29
  126. package/src/hooks/useMobile.ts +0 -58
  127. package/src/hooks/useNotice.ts +0 -42
  128. package/src/hooks/useOrgLevelList.ts +0 -23
  129. package/src/hooks/usePageSelection.ts +0 -121
  130. package/src/hooks/usePageState.ts +0 -22
  131. package/src/hooks/usePendingList.ts +0 -27
  132. package/src/hooks/usePortalPageInfo.ts +0 -43
  133. package/src/hooks/useRefreshByLocationChange.ts +0 -16
  134. package/src/hooks/useReportIndicatorList.ts +0 -21
  135. package/src/hooks/useReportInfo.ts +0 -45
  136. package/src/hooks/useReportPersonList.ts +0 -21
  137. package/src/hooks/useScriptLoader.ts +0 -22
  138. package/src/hooks/useUnreadMsgList.ts +0 -26
  139. package/src/hooks/useUserAvatar.ts +0 -23
  140. package/src/hooks/useVReportInfo.ts +0 -50
  141. package/src/hooks/useVisionUserConfig.ts +0 -25
  142. package/src/hooks/useWorkbenchOptions.ts +0 -63
  143. package/src/index.tsx +0 -20
  144. package/src/services/CardService.ts +0 -91
  145. package/src/services/CommonService.ts +0 -23
  146. package/src/services/CostService.ts +0 -56
  147. package/src/services/DialogService.ts +0 -74
  148. package/src/services/IndicatorService.ts +0 -406
  149. package/src/services/PageService.ts +0 -204
  150. package/src/services/ReportService.ts +0 -335
  151. package/src/services/WorkbenchService.ts +0 -411
  152. package/src/styles/README.md +0 -12
  153. package/src/styles/index.scss +0 -9
  154. package/src/styles/mixins/index.scss +0 -25
  155. package/src/styles/next-cover.scss +0 -4
  156. package/src/styles/normalize.scss +0 -27
  157. package/src/styles/utilities/index.scss +0 -5
  158. package/src/styles/vars/index.scss +0 -17
  159. package/src/types/enum-workbench.ts +0 -29
  160. package/src/types/enum.ts +0 -156
  161. package/src/types/index.ts +0 -19
  162. package/src/types/indicator.ts +0 -299
  163. package/src/types/interface.ts +0 -303
  164. package/src/types/portal.ts +0 -211
  165. package/src/types/report.ts +0 -28
  166. package/src/types/type.ts +0 -11
  167. package/src/types/user.ts +0 -28
  168. package/src/utils/README.md +0 -4
  169. package/src/utils/arms.ts +0 -59
  170. package/src/utils/arr.ts +0 -123
  171. package/src/utils/const-workbench.ts +0 -9
  172. package/src/utils/const.ts +0 -18
  173. package/src/utils/index.ts +0 -18
  174. package/src/utils/init.ts +0 -5
  175. package/src/utils/map-workbench.ts +0 -66
  176. package/src/utils/map.ts +0 -377
  177. package/src/utils/number.ts +0 -101
  178. package/src/utils/page.ts +0 -81
  179. package/src/utils/str.ts +0 -26
  180. package/src/utils/tools.ts +0 -44
  181. package/src/utils/tree.ts +0 -145
  182. package/src/utils/url.ts +0 -40
  183. package/src/utils/util.ts +0 -99
  184. package/src/utils/workbench.ts +0 -25
@@ -1,335 +0,0 @@
1
- import { newRequest } from '@/api/request';
2
- import {
3
- getAliyuncsNewSrc,
4
- replaceSrcValues,
5
- } from '@/pages/brief-report/utils/tool';
6
- import { handleResult } from '@/utils';
7
- import {
8
- IIndicatorInfo,
9
- IListItem,
10
- IOssSign,
11
- IOssUploadData,
12
- IReportContentInfo,
13
- IReportTplInfo,
14
- } from 'src/types';
15
-
16
- export class ReportService {
17
- /**
18
- * 获取模版
19
- * @returns
20
- */
21
- public static async getTemplateList() {
22
- const resp = handleResult(
23
- await newRequest<IReportTplInfo[]>({
24
- url: '/weekly/report/template/list',
25
- }),
26
- );
27
-
28
- return resp;
29
- }
30
-
31
- /**
32
- * 删除模版
33
- * @param templateId
34
- * @returns
35
- */
36
- public static async deleteTemplateById(templateId: number) {
37
- const resp = handleResult(
38
- await newRequest<boolean>({
39
- url: '/weekly/report/template/delete',
40
- method: 'POST',
41
- data: {
42
- templateId,
43
- },
44
- }),
45
- );
46
-
47
- return resp;
48
- }
49
-
50
- /**
51
- * 保存模版
52
- * @param data
53
- * @returns
54
- */
55
- public static async saveTemplate(data: Partial<IReportTplInfo>) {
56
- const resp = handleResult(
57
- await newRequest<boolean>({
58
- url: '/weekly/report/template/save',
59
- method: 'POST',
60
- data,
61
- }),
62
- );
63
-
64
- return resp;
65
- }
66
-
67
- /**
68
- * 获取模版详情
69
- * @param templateId
70
- * @returns
71
- */
72
- public static async getTemplateDetails(templateId: string | number) {
73
- const resp = handleResult(
74
- await newRequest<IReportTplInfo>({
75
- url: '/weekly/report/template/details',
76
- method: 'POST',
77
- data: {
78
- templateId,
79
- },
80
- }),
81
- );
82
-
83
- return {
84
- ...resp,
85
- ...(resp.content && {
86
- content: JSON.stringify(
87
- await replaceSrcValues(JSON.parse(resp.content), getAliyuncsNewSrc),
88
- ),
89
- }),
90
- };
91
- }
92
-
93
- /**
94
- * 获取使用人
95
- * @returns
96
- */
97
- public static async getPersonList() {
98
- const resp = handleResult(
99
- await newRequest<IListItem[]>({
100
- url: '/weekly/report/person',
101
- }),
102
- );
103
-
104
- return resp;
105
- }
106
-
107
- /**
108
- * 获取指标列表
109
- * @returns
110
- */
111
- public static async getIndicatorList() {
112
- const resp = handleResult(
113
- await newRequest<IListItem[]>({
114
- url: '/weekly/report/indicator/list',
115
- method: 'POST',
116
- data: {},
117
- }),
118
- );
119
-
120
- return resp;
121
- }
122
-
123
- /**
124
- * 获取指标详情
125
- * @param subId
126
- * @returns
127
- */
128
- public static async getIndicatorInfo(subId: number | string) {
129
- const resp = handleResult(
130
- await newRequest<IIndicatorInfo>({
131
- url: '/weekly/report/indicator/init',
132
- method: 'POST',
133
- data: {
134
- subId,
135
- },
136
- }),
137
- );
138
-
139
- return resp;
140
- }
141
-
142
- /**
143
- * 查询指标信息
144
- * @param subId
145
- * @returns
146
- */
147
- public static async queryIndicatorInfo(subId: number, type: string) {
148
- const {
149
- value,
150
- expectValue,
151
- ratio,
152
- selectLabel,
153
- uniqueCode,
154
- indicatorType,
155
- } = handleResult(
156
- await newRequest<IIndicatorInfo>({
157
- url: '/weekly/report/card/single',
158
- method: 'POST',
159
- data: {
160
- subId,
161
- type,
162
- },
163
- }),
164
- );
165
-
166
- return {
167
- value,
168
- expectValue,
169
- ratio,
170
- selectLabel,
171
- indicatorType,
172
- uniqueCode,
173
- };
174
- }
175
-
176
- /**
177
- * 获取内容
178
- * @returns
179
- */
180
- public static async getContentList() {
181
- const resp = handleResult(
182
- await newRequest<IReportContentInfo[]>({
183
- url: '/weekly/report/content/list',
184
- method: 'POST',
185
- data: {},
186
- }),
187
- );
188
-
189
- return resp;
190
- }
191
-
192
- /**
193
- * 保存内容
194
- * @param data
195
- * @returns
196
- */
197
- public static async saveContent(data: Partial<IReportContentInfo>) {
198
- const resp = handleResult(
199
- await newRequest<boolean>({
200
- url: '/weekly/report/content/save',
201
- method: 'POST',
202
- data,
203
- }),
204
- );
205
-
206
- return resp;
207
- }
208
-
209
- /**
210
- * 获取内容详情
211
- * @param templateId
212
- * @returns
213
- */
214
- public static async getContentDetails(
215
- templateId: string | number,
216
- importType?: string,
217
- ) {
218
- const resp = handleResult(
219
- await newRequest<IReportContentInfo>({
220
- url: '/weekly/report/content/import',
221
- method: 'POST',
222
- data: {
223
- templateId,
224
- importType,
225
- },
226
- }),
227
- );
228
-
229
- return {
230
- ...resp,
231
- ...(resp.content && {
232
- content: JSON.stringify(
233
- await replaceSrcValues(JSON.parse(resp.content), getAliyuncsNewSrc),
234
- ),
235
- }),
236
- };
237
- }
238
-
239
- /**
240
- * 获取钉钉跳转链接
241
- * @param content
242
- * @returns
243
- */
244
- public static async getDingLink(content: string, contentType = 'asl') {
245
- const resp = handleResult(
246
- await newRequest<string>({
247
- url: '/weekly/report/ding',
248
- method: 'POST',
249
- data: {
250
- content,
251
- contentType,
252
- },
253
- }),
254
- );
255
-
256
- return resp;
257
- }
258
-
259
- /**
260
- * 根据 key 获取地址
261
- * @param key
262
- * @returns
263
- */
264
- public static async getUrlByKey(key: string) {
265
- const resp = handleResult(
266
- await newRequest<string>({
267
- url: '/weekly/report/OssUrl',
268
- params: {
269
- key,
270
- },
271
- }),
272
- );
273
-
274
- return resp;
275
- }
276
-
277
- /**
278
- * 获取图片上传签名
279
- * @returns
280
- */
281
- public static async getOssSign() {
282
- const resp = handleResult(
283
- await newRequest<IOssSign>({
284
- url: '/weekly/report/generateOssPolicy',
285
- }),
286
- );
287
-
288
- return resp;
289
- }
290
-
291
- /**
292
- * 获取图片上传
293
- * @returns
294
- */
295
- public static async ossUpload({
296
- key,
297
- policy,
298
- ossAccessKeyId,
299
- signature,
300
- host,
301
- file,
302
- securityToken,
303
- }: IOssUploadData) {
304
- const data = new FormData();
305
- data.append('x-oss-security-token', securityToken);
306
- data.append('signature', signature);
307
- data.append('policy', policy);
308
- data.append('OSSAccessKeyId', ossAccessKeyId);
309
- data.append('key', key);
310
- data.append('file', file);
311
-
312
- await fetch(host, {
313
- method: 'POST',
314
- body: data,
315
- });
316
- }
317
-
318
- /**
319
- * AI 生成
320
- * @returns
321
- */
322
- public static async getAiSearch(content: string) {
323
- const resp = handleResult(
324
- await newRequest<string>({
325
- url: '/weekly/report/ai/search',
326
- method: 'POST',
327
- data: {
328
- content,
329
- },
330
- }),
331
- );
332
-
333
- return resp;
334
- }
335
- }