win-chart 1.0.0 → 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 +3 -1
  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,63 +0,0 @@
1
- import { IListItem, IWorkbenchOptions } from '@/types';
2
- import { CnMessage } from '@cainiaofe/cn-ui';
3
- import { useEffect, useState } from 'react';
4
- import {
5
- atom,
6
- useRecoilState,
7
- useRecoilValue,
8
- useSetRecoilState,
9
- } from 'recoil';
10
- import { WorkbenchService } from 'src/services/WorkbenchService';
11
-
12
- const optionsState = atom<IWorkbenchOptions>({
13
- key: 'workbench-options',
14
- default: {
15
- roleList: [],
16
- pendingList: [],
17
- noticeList: [],
18
- },
19
- });
20
-
21
- export const useWorkbenchOptions = () => {
22
- const [state, setState] = useRecoilState(optionsState);
23
-
24
- useEffect(() => {
25
- (async () => {
26
- try {
27
- const data = await WorkbenchService.getWorkbenchOptions();
28
- setState(data);
29
- } catch (error) {
30
- CnMessage(error.message);
31
- }
32
- })();
33
- }, [setState]);
34
-
35
- return state;
36
- };
37
-
38
- export const useWorkbenchOptionsValue = () => useRecoilValue(optionsState);
39
-
40
- const initState = atom({
41
- key: 'has-init-workbench-role-code',
42
- default: false,
43
- });
44
- export const useHasInitWorkbenchRoleCode = () => useRecoilValue(initState);
45
- export const useSetHasInitWorkbenchRoleCode = () =>
46
- useSetRecoilState(initState);
47
-
48
- export const useWorkbenchRoleList = () => {
49
- const [state, setState] = useState<IListItem[]>([]);
50
-
51
- useEffect(() => {
52
- (async () => {
53
- try {
54
- const data = await WorkbenchService.getWorkbenchRoleList();
55
- setState(data);
56
- } catch (error) {
57
- CnMessage(error.message);
58
- }
59
- })();
60
- }, []);
61
-
62
- return state;
63
- };
package/src/index.tsx DELETED
@@ -1,20 +0,0 @@
1
- import React from 'react';
2
- import ReactDOM from 'react-dom/client';
3
- import { WinChart } from './components/win-chart';
4
- import { WinCard } from './components/win-card';
5
-
6
- export { WinCard, WinChart };
7
-
8
- // const App = () => {
9
- // return (
10
- // <div>
11
- // <h1>Win Chart</h1>
12
- // </div>
13
- // );
14
- // };
15
-
16
- // ReactDOM.createRoot(document.getElementById('root')!).render(
17
- // <React.StrictMode>
18
- // <App />
19
- // </React.StrictMode>,
20
- // );
@@ -1,91 +0,0 @@
1
- import { newRequest } from '@/api/request';
2
- import { handleResult } from '@/utils';
3
- import { IIndicatorCardConfig, IListItem } from 'src/types';
4
-
5
- export class CardService {
6
- /**
7
- * 查询卡片配置
8
- * @param request
9
- * @returns
10
- */
11
- public static async getConfigInfo(id: number) {
12
- const resp = handleResult(
13
- await newRequest<IIndicatorCardConfig>({
14
- url: `/workbench/widget/queryById?id=${id}`,
15
- }),
16
- );
17
-
18
- return resp;
19
- }
20
-
21
- /**
22
- * 新增卡片配置
23
- * @param data
24
- * @returns
25
- */
26
- public static async addConfigInfo(data: Partial<IIndicatorCardConfig>) {
27
- const resp = handleResult(
28
- await newRequest<Partial<IIndicatorCardConfig>>({
29
- url: '/workbench/widget/save',
30
- method: 'POST',
31
- data,
32
- }),
33
- );
34
-
35
- return resp;
36
- }
37
-
38
- /**
39
- * 新增卡片配置
40
- * @param data
41
- * @returns
42
- */
43
- public static async updateConfigInfo(data: Partial<IIndicatorCardConfig>) {
44
- const resp = handleResult(
45
- await newRequest<Partial<IIndicatorCardConfig>>({
46
- url: '/workbench/widget/save',
47
- method: 'POST',
48
- data,
49
- }),
50
- );
51
-
52
- return resp;
53
- }
54
-
55
- /**
56
- * 查询卡片下拉列表
57
- * @param id
58
- * @returns
59
- */
60
- public static async queryOptionList(id: number) {
61
- const resp = handleResult(
62
- await newRequest<IListItem[]>({
63
- url: '/workbench/widget/option',
64
- params: {
65
- id,
66
- },
67
- }),
68
- );
69
-
70
- return resp;
71
- }
72
-
73
- /**
74
- * 删除卡片
75
- * @param id
76
- * @returns
77
- */
78
- public static async delete(id: number) {
79
- const resp = handleResult(
80
- await newRequest<boolean>({
81
- url: '/workbench/widget/delete',
82
- method: 'GET',
83
- params: {
84
- id,
85
- },
86
- }),
87
- );
88
-
89
- return resp;
90
- }
91
- }
@@ -1,23 +0,0 @@
1
- import { newRequest } from '@/api/request';
2
- import { handleResult } from '@/utils';
3
-
4
- export class CommonService {
5
- /**
6
- * 获取 FBI 地址
7
- * @param id
8
- * @returns
9
- */
10
- public static async getFbiUrl(id: number | string) {
11
- // const resp = handleResult(
12
- // await newRequest<{ reportId: number; url: string }>({
13
- // url: `/inc/reportUrl/${id}`,
14
- // }),
15
- // );
16
-
17
- const resp = await fetch(`/inc/reportUrl/${id}`).then<{
18
- module?: { url: string; id: number };
19
- }>((res) => res.json());
20
-
21
- return resp.module?.url;
22
- }
23
- }
@@ -1,56 +0,0 @@
1
- import { newRequest } from '@/api/request';
2
- import { handleResult } from '@/utils';
3
- import { IIndicatorCardConfig, IListItem } from 'src/types';
4
- import { getBossOrigin } from '@/utils/tools';
5
- export class CostService {
6
- /**
7
- * 获取成本力指数筛选条件数据源
8
- * @returns
9
- */
10
- public static async getDicList(name: string, isInside: boolean) {
11
- const resp = handleResult(
12
- await newRequest<IListItem[]>({
13
- url: `${getBossOrigin(isInside)}/cost/powerIndex/getSelectList`,
14
- method: 'POST',
15
- data: {
16
- type: name,
17
- },
18
- }),
19
- );
20
-
21
- return resp;
22
- }
23
- /**
24
- * 获取成本力指数数据
25
- * @returns
26
- */
27
- public static async getIndexDataList(params: any, isInside: boolean) {
28
- const resp = handleResult(
29
- await newRequest<IListItem[]>({
30
- url: `${getBossOrigin(isInside)}/cost/powerIndex/getIndexDataList`,
31
- method: 'POST',
32
- data: {
33
- ...params,
34
- },
35
- }),
36
- );
37
-
38
- return resp;
39
- }
40
- public static async exportIndexData(params: any, isInside: boolean) {
41
- const resp = handleResult(
42
- await newRequest<IListItem[]>({
43
- url: `${getBossOrigin(isInside)}/basic/excel/exportExcel`,
44
- method: 'POST',
45
- data: {
46
- param: {
47
- ...params,
48
- },
49
- type: 'cost-indexExportTemplate',
50
- },
51
- }),
52
- );
53
-
54
- return resp;
55
- }
56
- }
@@ -1,74 +0,0 @@
1
- import { newRequest } from '@/api/request';
2
- import { ICnQuery, ICnTableData, IDialogMsgInfo } from '@/types';
3
- import { handleResult, objectToFormData } from '@/utils';
4
-
5
- export class DialogService {
6
- /**
7
- * 获取列表
8
- * @param data
9
- * @returns
10
- */
11
- public static async queryList(data: ICnQuery) {
12
- const resp = handleResult(
13
- await newRequest<ICnTableData<IDialogMsgInfo>>({
14
- url: '/dialog/query',
15
- method: 'POST',
16
- data: objectToFormData(data),
17
- }),
18
- );
19
-
20
- return resp;
21
- }
22
-
23
- /**
24
- * 发起对话
25
- * @param content
26
- */
27
- public static async send(content: string | number) {
28
- const resp = handleResult(
29
- await newRequest<number>({
30
- url: '/dialog/send',
31
- method: 'POST',
32
- data: objectToFormData({
33
- content,
34
- }),
35
- }),
36
- );
37
-
38
- return resp;
39
- }
40
-
41
- /**
42
- * 反馈
43
- * @param content
44
- */
45
- public static async feedback(content: string | number) {
46
- const resp = handleResult(
47
- await newRequest<number>({
48
- url: '/dialog/feedback',
49
- method: 'GET',
50
- params: {
51
- content,
52
- },
53
- }),
54
- );
55
-
56
- return resp;
57
- }
58
-
59
- /**
60
- * 更新对话
61
- * @param data
62
- */
63
- public static async update(data: Partial<IDialogMsgInfo>) {
64
- const resp = handleResult(
65
- await newRequest<number>({
66
- url: '/dialog/update',
67
- method: 'GET',
68
- params: data,
69
- }),
70
- );
71
-
72
- return resp;
73
- }
74
- }