win-chart 1.0.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/.eslintrc.json +3 -0
- package/.prettierrc.json +5 -0
- package/README.md +0 -0
- package/localhost-key.pem +28 -0
- package/localhost.pem +25 -0
- package/package.json +65 -0
- package/rsbuild.config.ts +48 -0
- package/src/api/README.md +15 -0
- package/src/api/index.js +5 -0
- package/src/api/layout/index.js +32 -0
- package/src/api/request.ts +87 -0
- package/src/api/url-map/index.js +10 -0
- package/src/api/user/index.js +12 -0
- package/src/components/FilterContext.tsx +6 -0
- package/src/components/GlobalStyle.tsx +25 -0
- package/src/components/HalfScreenBrowser.tsx +95 -0
- package/src/components/ImgBox.tsx +19 -0
- package/src/components/JumpBtn.tsx +38 -0
- package/src/components/MCardWrapper.tsx +33 -0
- package/src/components/NoContent/index.tsx +85 -0
- package/src/components/ResponsiveReactGridLayout.tsx +218 -0
- package/src/components/SliderDecoration.tsx +27 -0
- package/src/components/VisionUserConfigContext.ts +6 -0
- package/src/components/WinMenu/README.md +11 -0
- package/src/components/WinMenu/WinHeader.tsx +5 -0
- package/src/components/WinMenu/components/ExtraBox.tsx +61 -0
- package/src/components/WinMenu/components/FullMenuBox.tsx +80 -0
- package/src/components/WinMenu/components/FullMenuContainer.tsx +50 -0
- package/src/components/WinMenu/components/FullMenuItem.tsx +128 -0
- package/src/components/WinMenu/components/LangSwitch.tsx +84 -0
- package/src/components/WinMenu/components/LogoBox.tsx +29 -0
- package/src/components/WinMenu/components/PinDialog.tsx +72 -0
- package/src/components/WinMenu/components/PinnedMenuBox.tsx +183 -0
- package/src/components/WinMenu/components/UserBox.tsx +83 -0
- package/src/components/WinMenu/hooks/useUserInfo.ts +21 -0
- package/src/components/WinMenu/hooks/useUserMenu.ts +35 -0
- package/src/components/WinMenu/index.tsx +100 -0
- package/src/components/WinMenu/services/WinService.ts +79 -0
- package/src/components/WinMenu/services/request.ts +53 -0
- package/src/components/WinMenu/utils/const.ts +80 -0
- package/src/components/WinMenu/utils/enum.ts +19 -0
- package/src/components/WinMenu/utils/interface.ts +61 -0
- package/src/components/WinMenu/utils/map.ts +39 -0
- package/src/components/WinMenu/utils/tool.ts +142 -0
- package/src/components/WinMenu/utils/type.ts +1 -0
- package/src/components/hover-view.tsx +48 -0
- package/src/components/icon.tsx +44 -0
- package/src/components/indicator-remark.tsx +25 -0
- package/src/components/none-content.tsx +93 -0
- package/src/components/panel-tab.tsx +150 -0
- package/src/components/panel-title-tab.tsx +60 -0
- package/src/components/win-card/components/ChartContent.tsx +47 -0
- package/src/components/win-card/components/Indicator.tsx +42 -0
- package/src/components/win-card/components/IndicatorArea.tsx +63 -0
- package/src/components/win-card/components/IndicatorInfo.tsx +78 -0
- package/src/components/win-card/components/MatterContent.tsx +121 -0
- package/src/components/win-card/components/MatterList.tsx +141 -0
- package/src/components/win-card/components/NoticeContent.tsx +73 -0
- package/src/components/win-card/components/NoticeList.tsx +68 -0
- package/src/components/win-card/components/SelectDecoration.tsx +34 -0
- package/src/components/win-card/components/WinRankContent.tsx +102 -0
- package/src/components/win-card/index.tsx +298 -0
- package/src/components/win-card/utils/interface.ts +12 -0
- package/src/components/win-card/utils/tool.ts +11 -0
- package/src/components/win-card-mobile/components/ChartContent.tsx +47 -0
- package/src/components/win-card-mobile/components/DualLineBar.tsx +61 -0
- package/src/components/win-card-mobile/components/Indicator.tsx +42 -0
- package/src/components/win-card-mobile/components/IndicatorArea.tsx +65 -0
- package/src/components/win-card-mobile/components/IndicatorInfo.tsx +83 -0
- package/src/components/win-card-mobile/components/SelectDecoration.tsx +28 -0
- package/src/components/win-card-mobile/index.tsx +235 -0
- package/src/components/win-card-mobile/utils/interface.ts +12 -0
- package/src/components/win-card-mobile/utils/tool.ts +9 -0
- package/src/components/win-chart/components/chart-wrapper.tsx +5 -0
- package/src/components/win-chart/index.tsx +59 -0
- package/src/components/win-chart/theme/win-dark.json +372 -0
- package/src/components/win-chart/theme/win-light.json +372 -0
- package/src/components/win-chart/utils/const.ts +37 -0
- package/src/components/win-chart/utils/getAreaSpec.ts +150 -0
- package/src/components/win-chart/utils/getBarSpec.ts +60 -0
- package/src/components/win-chart/utils/getChartOptions.ts +59 -0
- package/src/components/win-chart/utils/getColumnSpec.ts +112 -0
- package/src/components/win-chart/utils/getDualSpec.ts +79 -0
- package/src/components/win-chart/utils/getFunnelSpec.ts +70 -0
- package/src/components/win-chart/utils/getLineSpec.ts +53 -0
- package/src/components/win-chart/utils/getPieSpec.ts +124 -0
- package/src/components/win-chart/utils/getRadarSpec.ts +87 -0
- package/src/components/win-chart/utils/tool.ts +163 -0
- package/src/components/win-chart/utils/type.ts +96 -0
- package/src/components/win-icon/index.tsx +97 -0
- package/src/components/win-v/components/EmptyBox.tsx +9 -0
- package/src/components/win-v/components/VDialog.tsx +173 -0
- package/src/components/win-v/components/VDialogBtn.tsx +119 -0
- package/src/components/win-v/components/VDialogMsg.tsx +325 -0
- package/src/components/win-v/components/VInput.tsx +15 -0
- package/src/components/win-v/components/VRemindMsgList.tsx +303 -0
- package/src/components/win-v/components/VRobot.tsx +97 -0
- package/src/components/win-v/hooks/useVDialogCore.ts +102 -0
- package/src/components/win-v/hooks/useVDialogOperate.ts +132 -0
- package/src/components/win-v/hooks/useVDialogState.ts +52 -0
- package/src/components/win-v/hooks/useVRemindMsgShow.ts +15 -0
- package/src/components/win-v/index.tsx +205 -0
- package/src/components/win-wrappers/card-wrapper.tsx +103 -0
- package/src/components/win-wrappers/dot-wrapper.tsx +18 -0
- package/src/components/win-wrappers/iframe-wrapper.tsx +7 -0
- package/src/components/win-wrappers/request-wrapper.tsx +190 -0
- package/src/global.d.ts +53 -0
- package/src/hooks/useCardOptionList.ts +23 -0
- package/src/hooks/useCostFiltersDicList.ts +22 -0
- package/src/hooks/useFbiUrl.ts +22 -0
- package/src/hooks/useHalfScreenState.ts +50 -0
- package/src/hooks/useHasIntersected.ts +36 -0
- package/src/hooks/useIndicatorCardInfo.ts +26 -0
- package/src/hooks/useIndicatorCardQueryList.ts +22 -0
- package/src/hooks/useIndicatorClassifyList.ts +25 -0
- package/src/hooks/useIndicatorDetailsDateList.ts +22 -0
- package/src/hooks/useIndicatorDetailsInfo.ts +49 -0
- package/src/hooks/useIndicatorDetailsTrend.ts +25 -0
- package/src/hooks/useIndicatorDicList.ts +22 -0
- package/src/hooks/useIndicatorLabelList.ts +20 -0
- package/src/hooks/useIndicatorList.ts +24 -0
- package/src/hooks/useIndicatorRangeList.ts +20 -0
- package/src/hooks/useIndicatorTypeList.ts +20 -0
- package/src/hooks/useIndicatorUnitList.ts +21 -0
- package/src/hooks/useListenQuery.ts +29 -0
- package/src/hooks/useMobile.ts +58 -0
- package/src/hooks/useNotice.ts +42 -0
- package/src/hooks/useOrgLevelList.ts +23 -0
- package/src/hooks/usePageSelection.ts +121 -0
- package/src/hooks/usePageState.ts +22 -0
- package/src/hooks/usePendingList.ts +27 -0
- package/src/hooks/usePortalPageInfo.ts +43 -0
- package/src/hooks/useRefreshByLocationChange.ts +16 -0
- package/src/hooks/useReportIndicatorList.ts +21 -0
- package/src/hooks/useReportInfo.ts +45 -0
- package/src/hooks/useReportPersonList.ts +21 -0
- package/src/hooks/useScriptLoader.ts +22 -0
- package/src/hooks/useUnreadMsgList.ts +26 -0
- package/src/hooks/useUserAvatar.ts +23 -0
- package/src/hooks/useVReportInfo.ts +50 -0
- package/src/hooks/useVisionUserConfig.ts +25 -0
- package/src/hooks/useWorkbenchOptions.ts +63 -0
- package/src/index.tsx +20 -0
- package/src/services/CardService.ts +91 -0
- package/src/services/CommonService.ts +23 -0
- package/src/services/CostService.ts +56 -0
- package/src/services/DialogService.ts +74 -0
- package/src/services/IndicatorService.ts +406 -0
- package/src/services/PageService.ts +204 -0
- package/src/services/ReportService.ts +335 -0
- package/src/services/WorkbenchService.ts +411 -0
- package/src/styles/README.md +12 -0
- package/src/styles/index.scss +9 -0
- package/src/styles/mixins/index.scss +25 -0
- package/src/styles/next-cover.scss +4 -0
- package/src/styles/normalize.scss +27 -0
- package/src/styles/utilities/index.scss +5 -0
- package/src/styles/vars/index.scss +17 -0
- package/src/types/enum-workbench.ts +29 -0
- package/src/types/enum.ts +156 -0
- package/src/types/index.ts +19 -0
- package/src/types/indicator.ts +299 -0
- package/src/types/interface.ts +303 -0
- package/src/types/portal.ts +211 -0
- package/src/types/report.ts +28 -0
- package/src/types/type.ts +11 -0
- package/src/types/user.ts +28 -0
- package/src/utils/README.md +4 -0
- package/src/utils/arms.ts +59 -0
- package/src/utils/arr.ts +123 -0
- package/src/utils/const-workbench.ts +9 -0
- package/src/utils/const.ts +18 -0
- package/src/utils/index.ts +18 -0
- package/src/utils/init.ts +5 -0
- package/src/utils/map-workbench.ts +66 -0
- package/src/utils/map.ts +377 -0
- package/src/utils/number.ts +101 -0
- package/src/utils/page.ts +81 -0
- package/src/utils/str.ts +26 -0
- package/src/utils/tools.ts +44 -0
- package/src/utils/tree.ts +145 -0
- package/src/utils/url.ts +40 -0
- package/src/utils/util.ts +99 -0
- package/src/utils/workbench.ts +25 -0
- package/tsconfig.json +33 -0
|
@@ -0,0 +1,411 @@
|
|
|
1
|
+
import { newRequest } from '@/api/request';
|
|
2
|
+
import {
|
|
3
|
+
ICnTableData,
|
|
4
|
+
IHazardInfo,
|
|
5
|
+
IListItem,
|
|
6
|
+
IMatterInfo,
|
|
7
|
+
IMenuInfo,
|
|
8
|
+
IRecommendInfo,
|
|
9
|
+
IRiskInfo,
|
|
10
|
+
ISearchByTypeCondition,
|
|
11
|
+
ISearchCondition,
|
|
12
|
+
ISearchResInfo,
|
|
13
|
+
ISearchResListInfo,
|
|
14
|
+
INoticeInfo,
|
|
15
|
+
IUserAvatarInfo,
|
|
16
|
+
IMatterPendingInfo,
|
|
17
|
+
IRankInfo,
|
|
18
|
+
IVReportInfo,
|
|
19
|
+
IZNoticeInfo,
|
|
20
|
+
IMsgCountInfo,
|
|
21
|
+
IWorkbenchOptions,
|
|
22
|
+
} from '@/types';
|
|
23
|
+
import { handleResult } from '@/utils';
|
|
24
|
+
import { getBossOrigin } from 'src/utils';
|
|
25
|
+
|
|
26
|
+
export class WorkbenchService {
|
|
27
|
+
/**
|
|
28
|
+
* 获取大区列表
|
|
29
|
+
* @returns
|
|
30
|
+
*/
|
|
31
|
+
public static async getRegionList() {
|
|
32
|
+
const resp = handleResult(
|
|
33
|
+
await newRequest<IListItem[]>({
|
|
34
|
+
url: '/workbench/common/getRegionList?accessCode=WIN_WORKBENCH_REGION_MANAGEMENT',
|
|
35
|
+
}),
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
return resp;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* 获取热词数据
|
|
43
|
+
* @returns
|
|
44
|
+
*/
|
|
45
|
+
public static async getHotDataList() {
|
|
46
|
+
const resp = handleResult(
|
|
47
|
+
await newRequest<{
|
|
48
|
+
hotWords: IRecommendInfo[];
|
|
49
|
+
recentWords: IRecommendInfo[];
|
|
50
|
+
}>({
|
|
51
|
+
url: '/workbench/suggest/recentAndHot',
|
|
52
|
+
}),
|
|
53
|
+
);
|
|
54
|
+
|
|
55
|
+
return resp;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* 获取推荐数据
|
|
60
|
+
* @returns
|
|
61
|
+
*/
|
|
62
|
+
public static async getRecommendDataList(data: { keyWord?: string }) {
|
|
63
|
+
const resp = handleResult(
|
|
64
|
+
await newRequest<IRecommendInfo[]>({
|
|
65
|
+
url: `/workbench/suggest?input=${data.keyWord ?? ''}`,
|
|
66
|
+
}),
|
|
67
|
+
);
|
|
68
|
+
|
|
69
|
+
return resp;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* 获取查询数据
|
|
74
|
+
* @returns
|
|
75
|
+
*/
|
|
76
|
+
public static async getSearchDataList(data: {
|
|
77
|
+
keyWord?: string;
|
|
78
|
+
type?: string;
|
|
79
|
+
}) {
|
|
80
|
+
const resp = handleResult(
|
|
81
|
+
await newRequest<ISearchResInfo[]>({
|
|
82
|
+
url: `/workbench/search?pageSize=50&input=${data.keyWord ?? ''}${
|
|
83
|
+
!!data.type ? `&type=${data.type}` : ''
|
|
84
|
+
}`,
|
|
85
|
+
}),
|
|
86
|
+
);
|
|
87
|
+
|
|
88
|
+
return resp;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* 获取查询数据(分页)
|
|
93
|
+
* @returns
|
|
94
|
+
*/
|
|
95
|
+
public static async getSearchDataListByType(data: ISearchByTypeCondition) {
|
|
96
|
+
const resp = handleResult(
|
|
97
|
+
await newRequest<ICnTableData<ISearchResListInfo>>({
|
|
98
|
+
url: `/workbench/searchByType?input=${
|
|
99
|
+
data.keyWord ?? ''
|
|
100
|
+
}${`&type=${data.type}`}${`&page=${data.page}`}${`&pageSize=${data.pageSize}`}`,
|
|
101
|
+
}),
|
|
102
|
+
);
|
|
103
|
+
|
|
104
|
+
return resp;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* 获取事项数据
|
|
109
|
+
* @returns
|
|
110
|
+
*/
|
|
111
|
+
public static async getMatterDataList(data?: {
|
|
112
|
+
workflowType: string;
|
|
113
|
+
currentPage?: number;
|
|
114
|
+
pageSize?: number;
|
|
115
|
+
}) {
|
|
116
|
+
const resp = handleResult(
|
|
117
|
+
await newRequest<ICnTableData<IMatterInfo>>({
|
|
118
|
+
url: '/workbench/common/queryWorkflowList',
|
|
119
|
+
method: 'POST',
|
|
120
|
+
data,
|
|
121
|
+
}),
|
|
122
|
+
);
|
|
123
|
+
|
|
124
|
+
return resp;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* 获取风险数据
|
|
129
|
+
* @returns
|
|
130
|
+
*/
|
|
131
|
+
public static async getRiskData(data: ISearchCondition) {
|
|
132
|
+
const resp = handleResult(
|
|
133
|
+
await newRequest<ICnTableData<IRiskInfo>>({
|
|
134
|
+
url: `/workbench/risk/risk?dataAccVal=${data.dataAccVal}`,
|
|
135
|
+
data,
|
|
136
|
+
}),
|
|
137
|
+
);
|
|
138
|
+
|
|
139
|
+
return resp.tableData ?? [];
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* 获取隐患整改情况数据
|
|
144
|
+
* @returns
|
|
145
|
+
*/
|
|
146
|
+
public static async getHazardData(data: ISearchCondition) {
|
|
147
|
+
const resp = handleResult(
|
|
148
|
+
await newRequest<ICnTableData<IHazardInfo>>({
|
|
149
|
+
url: `/workbench/risk/hiddenDanger?dataAccVal=${data.dataAccVal}`,
|
|
150
|
+
}),
|
|
151
|
+
);
|
|
152
|
+
|
|
153
|
+
return resp.tableData ?? [];
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* 获取快捷菜单
|
|
158
|
+
* @returns
|
|
159
|
+
*/
|
|
160
|
+
public static async getCommonFunctionsList() {
|
|
161
|
+
const resp = handleResult(
|
|
162
|
+
await newRequest<IMenuInfo[]>({
|
|
163
|
+
url: '/workbench/common/getCommonMenu',
|
|
164
|
+
}),
|
|
165
|
+
);
|
|
166
|
+
|
|
167
|
+
return resp;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* 获取快捷菜单
|
|
172
|
+
* @returns
|
|
173
|
+
*/
|
|
174
|
+
public static async getCommonFunctionsListNew() {
|
|
175
|
+
const resp = handleResult(
|
|
176
|
+
await newRequest<IMenuInfo[]>({
|
|
177
|
+
url: '/menu/queryUserMenu',
|
|
178
|
+
method: 'POST',
|
|
179
|
+
data: {
|
|
180
|
+
startMenuCode: 'VISION_MENU',
|
|
181
|
+
productCodes: ['VISION'],
|
|
182
|
+
},
|
|
183
|
+
}),
|
|
184
|
+
);
|
|
185
|
+
|
|
186
|
+
return resp;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* 获取头条公告数据
|
|
191
|
+
* @returns
|
|
192
|
+
*/
|
|
193
|
+
public static async getNoticeDataList(
|
|
194
|
+
data?: {
|
|
195
|
+
currentPage?: number;
|
|
196
|
+
pageSize?: number;
|
|
197
|
+
},
|
|
198
|
+
isInside?: boolean,
|
|
199
|
+
) {
|
|
200
|
+
const resp = handleResult(
|
|
201
|
+
await newRequest<ICnTableData<IZNoticeInfo>>({
|
|
202
|
+
url: `${getBossOrigin(isInside)}/form/common/form/page/DWN`,
|
|
203
|
+
method: 'POST',
|
|
204
|
+
data: {
|
|
205
|
+
...data,
|
|
206
|
+
scope: isInside ? 'INNER' : 'OUTER',
|
|
207
|
+
status: 'PUBLISHED',
|
|
208
|
+
},
|
|
209
|
+
}),
|
|
210
|
+
);
|
|
211
|
+
|
|
212
|
+
return resp;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* 获取工作台角色列表
|
|
217
|
+
* @returns
|
|
218
|
+
*/
|
|
219
|
+
public static async getWorkbenchRoleList() {
|
|
220
|
+
const resp = handleResult(
|
|
221
|
+
await newRequest<{ menuCode: string; menuTitle: string }[]>({
|
|
222
|
+
url: '/menu/queryUserMenu',
|
|
223
|
+
method: 'POST',
|
|
224
|
+
data: {
|
|
225
|
+
startMenuCode: 'dwork_vision_mobile',
|
|
226
|
+
productCodes: ['VISION'],
|
|
227
|
+
},
|
|
228
|
+
}),
|
|
229
|
+
);
|
|
230
|
+
|
|
231
|
+
return resp.map((item) => ({
|
|
232
|
+
label: item.menuTitle,
|
|
233
|
+
value: item.menuCode,
|
|
234
|
+
}));
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* 获取角色工作台选项
|
|
239
|
+
* @returns
|
|
240
|
+
*/
|
|
241
|
+
public static async getWorkbenchOptions(): Promise<IWorkbenchOptions> {
|
|
242
|
+
const resp = handleResult(
|
|
243
|
+
await newRequest<{
|
|
244
|
+
dworkMenuDTOList: { menuCode: string; menuTitle: string }[];
|
|
245
|
+
headDic: Record<string, IListItem[]>;
|
|
246
|
+
countMap: IMsgCountInfo;
|
|
247
|
+
dworkNoticeDTOTable: ICnTableData<INoticeInfo>;
|
|
248
|
+
pendingInfoVOList: IMatterPendingInfo[];
|
|
249
|
+
}>({
|
|
250
|
+
url: '/wireless/common/querymobile',
|
|
251
|
+
method: 'POST',
|
|
252
|
+
data: {
|
|
253
|
+
startMenuCode: 'dwork_vision_mobile',
|
|
254
|
+
productCodes: ['VISION'],
|
|
255
|
+
},
|
|
256
|
+
}),
|
|
257
|
+
);
|
|
258
|
+
|
|
259
|
+
return {
|
|
260
|
+
roleList: resp.dworkMenuDTOList.map((item) => ({
|
|
261
|
+
label: item.menuTitle,
|
|
262
|
+
value: item.menuCode,
|
|
263
|
+
})),
|
|
264
|
+
...resp.headDic,
|
|
265
|
+
pendingList: resp.pendingInfoVOList.map((item) => ({
|
|
266
|
+
...item,
|
|
267
|
+
...(item.desc === '我的V信' && {
|
|
268
|
+
count: resp.countMap.unreadCount?.toString() ?? '0',
|
|
269
|
+
}),
|
|
270
|
+
})),
|
|
271
|
+
noticeList: resp.dworkNoticeDTOTable.tableData ?? [],
|
|
272
|
+
};
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* 查询用户头像
|
|
277
|
+
* @returns
|
|
278
|
+
*/
|
|
279
|
+
public static async queryUserAvatar() {
|
|
280
|
+
const resp = handleResult(
|
|
281
|
+
await newRequest<IUserAvatarInfo>({
|
|
282
|
+
url: '/wireless/common/queryUserAvatar',
|
|
283
|
+
}),
|
|
284
|
+
);
|
|
285
|
+
|
|
286
|
+
return resp;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
/**
|
|
290
|
+
* 查询公告
|
|
291
|
+
* @returns
|
|
292
|
+
*/
|
|
293
|
+
public static async queryNoticeBannerList() {
|
|
294
|
+
const data = new FormData();
|
|
295
|
+
data.append('topStatus', '1');
|
|
296
|
+
data.append('noticeStatus', '2');
|
|
297
|
+
data.append('currentPage', '1');
|
|
298
|
+
data.append('pageSize', '10');
|
|
299
|
+
|
|
300
|
+
const resp = handleResult(
|
|
301
|
+
await newRequest<ICnTableData<INoticeInfo>>({
|
|
302
|
+
url: '/notice/query',
|
|
303
|
+
method: 'POST',
|
|
304
|
+
data,
|
|
305
|
+
}),
|
|
306
|
+
);
|
|
307
|
+
|
|
308
|
+
return resp.tableData;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* 查询公告
|
|
313
|
+
* @returns
|
|
314
|
+
*/
|
|
315
|
+
public static async queryNotice({
|
|
316
|
+
currentPage = 1,
|
|
317
|
+
}: {
|
|
318
|
+
currentPage: number;
|
|
319
|
+
}) {
|
|
320
|
+
const data = new FormData();
|
|
321
|
+
data.append('noticeStatus', '2');
|
|
322
|
+
data.append('currentPage', currentPage.toString());
|
|
323
|
+
data.append('pageSize', '10');
|
|
324
|
+
|
|
325
|
+
const resp = handleResult(
|
|
326
|
+
await newRequest<ICnTableData<INoticeInfo>>({
|
|
327
|
+
url: '/notice/query',
|
|
328
|
+
method: 'POST',
|
|
329
|
+
data,
|
|
330
|
+
}),
|
|
331
|
+
);
|
|
332
|
+
|
|
333
|
+
return resp;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
/**
|
|
337
|
+
* 查询公告详情
|
|
338
|
+
* @param id
|
|
339
|
+
* @returns
|
|
340
|
+
*/
|
|
341
|
+
public static async queryNoticeInfo(id: number | string) {
|
|
342
|
+
const data = new FormData();
|
|
343
|
+
data.append('id', id.toString());
|
|
344
|
+
|
|
345
|
+
const resp = handleResult(
|
|
346
|
+
await newRequest<INoticeInfo>({
|
|
347
|
+
url: '/notice/queryDetail',
|
|
348
|
+
method: 'POST',
|
|
349
|
+
data,
|
|
350
|
+
}),
|
|
351
|
+
);
|
|
352
|
+
|
|
353
|
+
return resp;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* 事项中心
|
|
358
|
+
* @returns
|
|
359
|
+
*/
|
|
360
|
+
public static async queryPendingList() {
|
|
361
|
+
const resp = handleResult(
|
|
362
|
+
await newRequest<IMatterPendingInfo[]>({
|
|
363
|
+
url: '/wireless/common/queryPendingCount',
|
|
364
|
+
}),
|
|
365
|
+
);
|
|
366
|
+
|
|
367
|
+
return resp;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
/**
|
|
371
|
+
* 查询红黑榜单
|
|
372
|
+
* @returns
|
|
373
|
+
*/
|
|
374
|
+
public static async queryWinRankList() {
|
|
375
|
+
const resp = handleResult(
|
|
376
|
+
await newRequest<IRankInfo[]>({
|
|
377
|
+
url: '/workbench/common/queryWinRankList',
|
|
378
|
+
}),
|
|
379
|
+
);
|
|
380
|
+
|
|
381
|
+
return resp;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
/**
|
|
385
|
+
* 查询简报信息
|
|
386
|
+
* @returns
|
|
387
|
+
*/
|
|
388
|
+
public static async queryVReportInfo() {
|
|
389
|
+
const resp = handleResult(
|
|
390
|
+
await newRequest<{ extend?: IVReportInfo }>({
|
|
391
|
+
url: '/message/weekly',
|
|
392
|
+
}),
|
|
393
|
+
);
|
|
394
|
+
|
|
395
|
+
return resp.extend;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
/**
|
|
399
|
+
* 查询简报未读信息数量
|
|
400
|
+
* @returns
|
|
401
|
+
*/
|
|
402
|
+
public static async queryVReportMessageCount() {
|
|
403
|
+
const resp = handleResult(
|
|
404
|
+
await newRequest<IMsgCountInfo>({
|
|
405
|
+
url: '/console/message/countMessage',
|
|
406
|
+
}),
|
|
407
|
+
);
|
|
408
|
+
|
|
409
|
+
return resp;
|
|
410
|
+
}
|
|
411
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# 项目 styles
|
|
2
|
+
|
|
3
|
+
- 此文件夹放置项目通用的样式, 包括
|
|
4
|
+
- `./normalize`, css normalize
|
|
5
|
+
- `./vars`, css 变量
|
|
6
|
+
- `./next-cover`, 覆盖 next 的样式
|
|
7
|
+
- `./mixins`, mixins
|
|
8
|
+
- `./function`, 功能型 css
|
|
9
|
+
|
|
10
|
+
# 页面 styles
|
|
11
|
+
|
|
12
|
+
- 页面维度的样式, 请使用 `*.module.scss` 来防止相互覆盖, 请参考 `src/pages/**/*.scss`
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* 此文件用于放置项目通用的 mixins
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
@mixin clearfix() {
|
|
6
|
+
&::after {
|
|
7
|
+
display: table;
|
|
8
|
+
content: '';
|
|
9
|
+
clear: both;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@mixin ellipsis {
|
|
14
|
+
overflow: hidden;
|
|
15
|
+
white-space: nowrap;
|
|
16
|
+
text-overflow: ellipsis;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@mixin ellipsis-line($lineNum) {
|
|
20
|
+
/* stylelint-disable-next-line value-no-vendor-prefix */
|
|
21
|
+
display: -webkit-box;
|
|
22
|
+
overflow: hidden;
|
|
23
|
+
-webkit-line-clamp: $lineNum;
|
|
24
|
+
-webkit-box-orient: vertical;
|
|
25
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 此文件用于放置项目通用的 css normalize
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
@import 'normalize.css/normalize.css';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* box-sizing
|
|
9
|
+
* https://css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice/
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
html {
|
|
13
|
+
box-sizing: border-box;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
*,
|
|
17
|
+
*::before,
|
|
18
|
+
*::after {
|
|
19
|
+
box-sizing: inherit;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* body
|
|
24
|
+
*/
|
|
25
|
+
body {
|
|
26
|
+
background-color: $color-fill1-2;
|
|
27
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 此文件用于放置项目通用的 css 变量
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
// 如需使用主题 icons, 请改为引用 '~@alife/theme-win/icons.scss'
|
|
6
|
+
@import '@alife/theme-win/variables.css';
|
|
7
|
+
|
|
8
|
+
// 定义使用到的 css 变量, 避免变量不存在时编译报错
|
|
9
|
+
$color-fill1-2: #eef1f7 !default; // 背景色默认变量
|
|
10
|
+
$color-brand1-5: rgba(40, 76, 192, 1) !default;
|
|
11
|
+
$color-primary: $color-brand1-5 !default;
|
|
12
|
+
$color-white: #fff !default;
|
|
13
|
+
|
|
14
|
+
:root {
|
|
15
|
+
--m-color-primary: #3379ff;
|
|
16
|
+
--m-radius: 500px;
|
|
17
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* My Vision 页面类型
|
|
3
|
+
*/
|
|
4
|
+
export enum PageType {
|
|
5
|
+
/**
|
|
6
|
+
* 工作台
|
|
7
|
+
*/
|
|
8
|
+
WORKBENCH = 'workbench',
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* 我的审批
|
|
12
|
+
*/
|
|
13
|
+
MY_APPROVAL = 'approval',
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* 审批类型
|
|
18
|
+
*/
|
|
19
|
+
export enum ApprovalType {
|
|
20
|
+
/**
|
|
21
|
+
* 待我审批
|
|
22
|
+
*/
|
|
23
|
+
PENDING = 'PENDING',
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* 我已审批
|
|
27
|
+
*/
|
|
28
|
+
COMPLETE = 'COMPLETE',
|
|
29
|
+
}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 页面操作类型
|
|
3
|
+
*/
|
|
4
|
+
export enum OperateType {
|
|
5
|
+
/**
|
|
6
|
+
* 默认
|
|
7
|
+
*/
|
|
8
|
+
NONE = 'none',
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* 添加
|
|
12
|
+
*/
|
|
13
|
+
ADD = 'add',
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* 复制
|
|
17
|
+
*/
|
|
18
|
+
COPY = 'copy',
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* 编辑
|
|
22
|
+
*/
|
|
23
|
+
EDIT = 'edit',
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* 查看
|
|
27
|
+
*/
|
|
28
|
+
VIEW = 'view',
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* 删除
|
|
32
|
+
*/
|
|
33
|
+
DELETE = 'delete',
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* 反馈
|
|
37
|
+
*/
|
|
38
|
+
FEEDBACK = 'feedback',
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* 追评
|
|
42
|
+
*/
|
|
43
|
+
REVIEW = 'review',
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* 批量导入
|
|
47
|
+
*/
|
|
48
|
+
BATCH_ADD = 'batch_add',
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* 批量操作
|
|
52
|
+
*/
|
|
53
|
+
BATCH_OPERATE = 'batch_operate',
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* 授权
|
|
57
|
+
*/
|
|
58
|
+
AUTHORIZED = 'authorized',
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export enum WinCardChartType {
|
|
62
|
+
/**
|
|
63
|
+
* 指标卡片
|
|
64
|
+
*/
|
|
65
|
+
INDICATOR = 'INDICATOR',
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* 指标加面积图
|
|
69
|
+
*/
|
|
70
|
+
INDICATOR_AREA = 'INDICATOR_AREA',
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* 指标加面积图
|
|
74
|
+
*/
|
|
75
|
+
AREA_CHART = 'AREA_CHART',
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* 折线图卡片
|
|
79
|
+
*/
|
|
80
|
+
LINE_CHART = 'LINE_CHART',
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* 柱状图
|
|
84
|
+
*/
|
|
85
|
+
COLUMN_CHART = 'COLUMN_CHART',
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* 堆叠柱状图
|
|
89
|
+
*/
|
|
90
|
+
STACK_COLUMN_CHART = 'STACK_COLUMN_CHART',
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* 条形图
|
|
94
|
+
*/
|
|
95
|
+
BAR_CHART = 'BAR_CHART',
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* 双轴图
|
|
99
|
+
*/
|
|
100
|
+
DUAL_LINE_BAR_CHART = 'DUAL_LINE_COLUMN_CHART',
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* 漏斗图
|
|
104
|
+
*/
|
|
105
|
+
FUNNEL_CHART = 'FUNNEL_CHART',
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* 饼图
|
|
109
|
+
*/
|
|
110
|
+
PIE_CHART = 'PIE_CHART',
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* 饼图(以指标项展示)
|
|
114
|
+
*/
|
|
115
|
+
PIE_CHART_RESERVE = 'PIE_CHART_RESERVE',
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* 环图
|
|
119
|
+
*/
|
|
120
|
+
CYCLE_CHART = 'CYCLE_CHART',
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* 雷达图
|
|
124
|
+
*/
|
|
125
|
+
RADAR_CHART = 'RADAR_CHART',
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* 雷达图(以指标项展示)
|
|
129
|
+
*/
|
|
130
|
+
RADAR_CHART_RESERVE = 'RADAR_CHART_RESERVE',
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* 自定义卡片
|
|
134
|
+
*/
|
|
135
|
+
CUSTOM_CARD = 'CUSTOM_CARD',
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* 事项类别
|
|
140
|
+
*/
|
|
141
|
+
export enum MatterType {
|
|
142
|
+
/**
|
|
143
|
+
* 待办
|
|
144
|
+
*/
|
|
145
|
+
PENDING = 'PENDING',
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* 我发出的
|
|
149
|
+
*/
|
|
150
|
+
CREATE = 'CREATE',
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* 已办事项
|
|
154
|
+
*/
|
|
155
|
+
COMPLETE = 'COMPLETE',
|
|
156
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
|
|
3
|
+
// 匿名函数
|
|
4
|
+
export type Fn = (...args: unknown[]) => unknown;
|
|
5
|
+
|
|
6
|
+
export * from './user';
|
|
7
|
+
export * from './portal';
|
|
8
|
+
export * from './indicator';
|
|
9
|
+
export * from './interface';
|
|
10
|
+
export * from './enum';
|
|
11
|
+
export * from './type';
|
|
12
|
+
export * from './report';
|
|
13
|
+
export * from './enum-workbench';
|
|
14
|
+
|
|
15
|
+
export interface IStyleProps {
|
|
16
|
+
style?: CSSProperties;
|
|
17
|
+
className?: string;
|
|
18
|
+
id?: string;
|
|
19
|
+
}
|