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.
- package/.vscode/settings.json +166 -0
- package/build/index.html +1 -0
- package/build/js/index.js +1 -0
- package/build/report-web.html +39 -0
- package/package.json +3 -1
- package/rsbuild.config.ts +5 -0
- package/tsconfig.json +1 -0
- package/src/api/README.md +0 -15
- package/src/api/index.js +0 -5
- package/src/api/layout/index.js +0 -32
- package/src/api/request.ts +0 -87
- package/src/api/url-map/index.js +0 -10
- package/src/api/user/index.js +0 -12
- package/src/components/FilterContext.tsx +0 -6
- package/src/components/GlobalStyle.tsx +0 -25
- package/src/components/HalfScreenBrowser.tsx +0 -95
- package/src/components/ImgBox.tsx +0 -19
- package/src/components/JumpBtn.tsx +0 -38
- package/src/components/MCardWrapper.tsx +0 -33
- package/src/components/NoContent/index.tsx +0 -85
- package/src/components/ResponsiveReactGridLayout.tsx +0 -218
- package/src/components/SliderDecoration.tsx +0 -27
- package/src/components/VisionUserConfigContext.ts +0 -6
- package/src/components/WinMenu/README.md +0 -11
- package/src/components/WinMenu/WinHeader.tsx +0 -5
- package/src/components/WinMenu/components/ExtraBox.tsx +0 -61
- package/src/components/WinMenu/components/FullMenuBox.tsx +0 -80
- package/src/components/WinMenu/components/FullMenuContainer.tsx +0 -50
- package/src/components/WinMenu/components/FullMenuItem.tsx +0 -128
- package/src/components/WinMenu/components/LangSwitch.tsx +0 -84
- package/src/components/WinMenu/components/LogoBox.tsx +0 -29
- package/src/components/WinMenu/components/PinDialog.tsx +0 -72
- package/src/components/WinMenu/components/PinnedMenuBox.tsx +0 -183
- package/src/components/WinMenu/components/UserBox.tsx +0 -83
- package/src/components/WinMenu/hooks/useUserInfo.ts +0 -21
- package/src/components/WinMenu/hooks/useUserMenu.ts +0 -35
- package/src/components/WinMenu/index.tsx +0 -100
- package/src/components/WinMenu/services/WinService.ts +0 -79
- package/src/components/WinMenu/services/request.ts +0 -53
- package/src/components/WinMenu/utils/const.ts +0 -80
- package/src/components/WinMenu/utils/enum.ts +0 -19
- package/src/components/WinMenu/utils/interface.ts +0 -61
- package/src/components/WinMenu/utils/map.ts +0 -39
- package/src/components/WinMenu/utils/tool.ts +0 -142
- package/src/components/WinMenu/utils/type.ts +0 -1
- package/src/components/hover-view.tsx +0 -48
- package/src/components/icon.tsx +0 -44
- package/src/components/indicator-remark.tsx +0 -25
- package/src/components/none-content.tsx +0 -93
- package/src/components/panel-tab.tsx +0 -150
- package/src/components/panel-title-tab.tsx +0 -60
- package/src/components/win-card/components/ChartContent.tsx +0 -47
- package/src/components/win-card/components/Indicator.tsx +0 -42
- package/src/components/win-card/components/IndicatorArea.tsx +0 -63
- package/src/components/win-card/components/IndicatorInfo.tsx +0 -78
- package/src/components/win-card/components/MatterContent.tsx +0 -121
- package/src/components/win-card/components/MatterList.tsx +0 -141
- package/src/components/win-card/components/NoticeContent.tsx +0 -73
- package/src/components/win-card/components/NoticeList.tsx +0 -68
- package/src/components/win-card/components/SelectDecoration.tsx +0 -34
- package/src/components/win-card/components/WinRankContent.tsx +0 -102
- package/src/components/win-card/index.tsx +0 -298
- package/src/components/win-card/utils/interface.ts +0 -12
- package/src/components/win-card/utils/tool.ts +0 -11
- package/src/components/win-card-mobile/components/ChartContent.tsx +0 -47
- package/src/components/win-card-mobile/components/DualLineBar.tsx +0 -61
- package/src/components/win-card-mobile/components/Indicator.tsx +0 -42
- package/src/components/win-card-mobile/components/IndicatorArea.tsx +0 -65
- package/src/components/win-card-mobile/components/IndicatorInfo.tsx +0 -83
- package/src/components/win-card-mobile/components/SelectDecoration.tsx +0 -28
- package/src/components/win-card-mobile/index.tsx +0 -235
- package/src/components/win-card-mobile/utils/interface.ts +0 -12
- package/src/components/win-card-mobile/utils/tool.ts +0 -9
- package/src/components/win-chart/components/chart-wrapper.tsx +0 -5
- package/src/components/win-chart/index.tsx +0 -59
- package/src/components/win-chart/theme/win-dark.json +0 -372
- package/src/components/win-chart/theme/win-light.json +0 -372
- package/src/components/win-chart/utils/const.ts +0 -37
- package/src/components/win-chart/utils/getAreaSpec.ts +0 -150
- package/src/components/win-chart/utils/getBarSpec.ts +0 -60
- package/src/components/win-chart/utils/getChartOptions.ts +0 -59
- package/src/components/win-chart/utils/getColumnSpec.ts +0 -112
- package/src/components/win-chart/utils/getDualSpec.ts +0 -79
- package/src/components/win-chart/utils/getFunnelSpec.ts +0 -70
- package/src/components/win-chart/utils/getLineSpec.ts +0 -53
- package/src/components/win-chart/utils/getPieSpec.ts +0 -124
- package/src/components/win-chart/utils/getRadarSpec.ts +0 -87
- package/src/components/win-chart/utils/tool.ts +0 -163
- package/src/components/win-chart/utils/type.ts +0 -96
- package/src/components/win-icon/index.tsx +0 -97
- package/src/components/win-v/components/EmptyBox.tsx +0 -9
- package/src/components/win-v/components/VDialog.tsx +0 -173
- package/src/components/win-v/components/VDialogBtn.tsx +0 -119
- package/src/components/win-v/components/VDialogMsg.tsx +0 -325
- package/src/components/win-v/components/VInput.tsx +0 -15
- package/src/components/win-v/components/VRemindMsgList.tsx +0 -303
- package/src/components/win-v/components/VRobot.tsx +0 -97
- package/src/components/win-v/hooks/useVDialogCore.ts +0 -102
- package/src/components/win-v/hooks/useVDialogOperate.ts +0 -132
- package/src/components/win-v/hooks/useVDialogState.ts +0 -52
- package/src/components/win-v/hooks/useVRemindMsgShow.ts +0 -15
- package/src/components/win-v/index.tsx +0 -205
- package/src/components/win-wrappers/card-wrapper.tsx +0 -103
- package/src/components/win-wrappers/dot-wrapper.tsx +0 -18
- package/src/components/win-wrappers/iframe-wrapper.tsx +0 -7
- package/src/components/win-wrappers/request-wrapper.tsx +0 -190
- package/src/global.d.ts +0 -53
- package/src/hooks/useCardOptionList.ts +0 -23
- package/src/hooks/useCostFiltersDicList.ts +0 -22
- package/src/hooks/useFbiUrl.ts +0 -22
- package/src/hooks/useHalfScreenState.ts +0 -50
- package/src/hooks/useHasIntersected.ts +0 -36
- package/src/hooks/useIndicatorCardInfo.ts +0 -26
- package/src/hooks/useIndicatorCardQueryList.ts +0 -22
- package/src/hooks/useIndicatorClassifyList.ts +0 -25
- package/src/hooks/useIndicatorDetailsDateList.ts +0 -22
- package/src/hooks/useIndicatorDetailsInfo.ts +0 -49
- package/src/hooks/useIndicatorDetailsTrend.ts +0 -25
- package/src/hooks/useIndicatorDicList.ts +0 -22
- package/src/hooks/useIndicatorLabelList.ts +0 -20
- package/src/hooks/useIndicatorList.ts +0 -24
- package/src/hooks/useIndicatorRangeList.ts +0 -20
- package/src/hooks/useIndicatorTypeList.ts +0 -20
- package/src/hooks/useIndicatorUnitList.ts +0 -21
- package/src/hooks/useListenQuery.ts +0 -29
- package/src/hooks/useMobile.ts +0 -58
- package/src/hooks/useNotice.ts +0 -42
- package/src/hooks/useOrgLevelList.ts +0 -23
- package/src/hooks/usePageSelection.ts +0 -121
- package/src/hooks/usePageState.ts +0 -22
- package/src/hooks/usePendingList.ts +0 -27
- package/src/hooks/usePortalPageInfo.ts +0 -43
- package/src/hooks/useRefreshByLocationChange.ts +0 -16
- package/src/hooks/useReportIndicatorList.ts +0 -21
- package/src/hooks/useReportInfo.ts +0 -45
- package/src/hooks/useReportPersonList.ts +0 -21
- package/src/hooks/useScriptLoader.ts +0 -22
- package/src/hooks/useUnreadMsgList.ts +0 -26
- package/src/hooks/useUserAvatar.ts +0 -23
- package/src/hooks/useVReportInfo.ts +0 -50
- package/src/hooks/useVisionUserConfig.ts +0 -25
- package/src/hooks/useWorkbenchOptions.ts +0 -63
- package/src/index.tsx +0 -20
- package/src/services/CardService.ts +0 -91
- package/src/services/CommonService.ts +0 -23
- package/src/services/CostService.ts +0 -56
- package/src/services/DialogService.ts +0 -74
- package/src/services/IndicatorService.ts +0 -406
- package/src/services/PageService.ts +0 -204
- package/src/services/ReportService.ts +0 -335
- package/src/services/WorkbenchService.ts +0 -411
- package/src/styles/README.md +0 -12
- package/src/styles/index.scss +0 -9
- package/src/styles/mixins/index.scss +0 -25
- package/src/styles/next-cover.scss +0 -4
- package/src/styles/normalize.scss +0 -27
- package/src/styles/utilities/index.scss +0 -5
- package/src/styles/vars/index.scss +0 -17
- package/src/types/enum-workbench.ts +0 -29
- package/src/types/enum.ts +0 -156
- package/src/types/index.ts +0 -19
- package/src/types/indicator.ts +0 -299
- package/src/types/interface.ts +0 -303
- package/src/types/portal.ts +0 -211
- package/src/types/report.ts +0 -28
- package/src/types/type.ts +0 -11
- package/src/types/user.ts +0 -28
- package/src/utils/README.md +0 -4
- package/src/utils/arms.ts +0 -59
- package/src/utils/arr.ts +0 -123
- package/src/utils/const-workbench.ts +0 -9
- package/src/utils/const.ts +0 -18
- package/src/utils/index.ts +0 -18
- package/src/utils/init.ts +0 -5
- package/src/utils/map-workbench.ts +0 -66
- package/src/utils/map.ts +0 -377
- package/src/utils/number.ts +0 -101
- package/src/utils/page.ts +0 -81
- package/src/utils/str.ts +0 -26
- package/src/utils/tools.ts +0 -44
- package/src/utils/tree.ts +0 -145
- package/src/utils/url.ts +0 -40
- package/src/utils/util.ts +0 -99
- package/src/utils/workbench.ts +0 -25
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { IndicatorService } from 'src/services/IndicatorService';
|
|
2
|
-
import { INDICATOR_DATA_BASE_URL, handleAddQuery } from '@/utils';
|
|
3
|
-
import { IContentProps } from '../utils/interface';
|
|
4
|
-
import { RequestWrapper } from 'src/components/win-wrappers/request-wrapper';
|
|
5
|
-
import { WinChart, WinChartType } from 'src/components/win-chart';
|
|
6
|
-
|
|
7
|
-
interface IProps extends IContentProps {
|
|
8
|
-
winChartType: WinChartType;
|
|
9
|
-
reserveValueWithLabelType?: boolean;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export const ChartContent = ({
|
|
13
|
-
configData,
|
|
14
|
-
orgLevelVal,
|
|
15
|
-
winChartType,
|
|
16
|
-
reserveValueWithLabelType,
|
|
17
|
-
}: IProps) => {
|
|
18
|
-
return (
|
|
19
|
-
<RequestWrapper
|
|
20
|
-
requestData={{
|
|
21
|
-
url: handleAddQuery(INDICATOR_DATA_BASE_URL, {
|
|
22
|
-
id: configData.id,
|
|
23
|
-
dataAccVal: configData.dataAccCode,
|
|
24
|
-
orgLevelVal,
|
|
25
|
-
}),
|
|
26
|
-
}}
|
|
27
|
-
service={IndicatorService.getDataInfoList}
|
|
28
|
-
>
|
|
29
|
-
{(data) => {
|
|
30
|
-
return (
|
|
31
|
-
<WinChart
|
|
32
|
-
sort={configData.commonConfig.sort}
|
|
33
|
-
yStart={configData.commonConfig.yStart}
|
|
34
|
-
color={configData.commonConfig.color}
|
|
35
|
-
reserveValueWithLabelType={reserveValueWithLabelType}
|
|
36
|
-
xAxisLabelLength={configData.commonConfig.xAxisLabelLength}
|
|
37
|
-
xAxisLabelRotate={configData.commonConfig.xAxisLabelRotate}
|
|
38
|
-
data={data.list0}
|
|
39
|
-
extraData={data.list1}
|
|
40
|
-
chartType={winChartType}
|
|
41
|
-
style={{ height: 'calc(100% - 20px)' }}
|
|
42
|
-
/>
|
|
43
|
-
);
|
|
44
|
-
}}
|
|
45
|
-
</RequestWrapper>
|
|
46
|
-
);
|
|
47
|
-
};
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { IndicatorService } from 'src/services/IndicatorService';
|
|
2
|
-
import { handleAddQuery, INDICATOR_DATA_BASE_URL } from '@/utils';
|
|
3
|
-
import { IContentProps } from '../utils/interface';
|
|
4
|
-
import { IndicatorInfo } from 'src/components/win-card/components/IndicatorInfo';
|
|
5
|
-
import { RequestWrapper } from 'src/components/win-wrappers/request-wrapper';
|
|
6
|
-
import { getExtraLabel } from '../utils/tool';
|
|
7
|
-
|
|
8
|
-
export const Indicator = ({ configData, unit, orgLevelVal }: IContentProps) => {
|
|
9
|
-
return (
|
|
10
|
-
<RequestWrapper
|
|
11
|
-
noEmptyBox
|
|
12
|
-
errorBoxHeight={50}
|
|
13
|
-
requestData={{
|
|
14
|
-
url: handleAddQuery(INDICATOR_DATA_BASE_URL, {
|
|
15
|
-
id: configData.id,
|
|
16
|
-
dataAccVal: configData.dataAccCode,
|
|
17
|
-
orgLevelVal,
|
|
18
|
-
}),
|
|
19
|
-
}}
|
|
20
|
-
service={IndicatorService.getDataInfoList}
|
|
21
|
-
style={{
|
|
22
|
-
height: 'auto',
|
|
23
|
-
}}
|
|
24
|
-
>
|
|
25
|
-
{(data) => {
|
|
26
|
-
const curConfig = configData.indicatorConfig[0];
|
|
27
|
-
const subTitle = curConfig.extra?.subTitle;
|
|
28
|
-
|
|
29
|
-
return (
|
|
30
|
-
<IndicatorInfo
|
|
31
|
-
jumpUrl={`/#/indicator-center/details?id=${curConfig.id}`}
|
|
32
|
-
label={configData.name}
|
|
33
|
-
unit={unit}
|
|
34
|
-
value={data.indicator?.value}
|
|
35
|
-
extraLabel={getExtraLabel(subTitle) ?? data.indicator?.date}
|
|
36
|
-
extraValue={data.indicator?.expected}
|
|
37
|
-
/>
|
|
38
|
-
);
|
|
39
|
-
}}
|
|
40
|
-
</RequestWrapper>
|
|
41
|
-
);
|
|
42
|
-
};
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { IndicatorService } from 'src/services/IndicatorService';
|
|
2
|
-
import {
|
|
3
|
-
getListLabel,
|
|
4
|
-
handleAddQuery,
|
|
5
|
-
handleNumberShowStr,
|
|
6
|
-
unitList,
|
|
7
|
-
} from '@/utils';
|
|
8
|
-
import { IContentProps } from '../utils/interface';
|
|
9
|
-
import { IndicatorInfo } from 'src/components/win-card/components/IndicatorInfo';
|
|
10
|
-
import { RequestWrapper } from 'src/components/win-wrappers/request-wrapper';
|
|
11
|
-
import { INDICATOR_DATA_BASE_URL } from '../../../utils/const';
|
|
12
|
-
import { WinChart, WinChartType } from 'src/components/win-chart';
|
|
13
|
-
import { getExtraLabel } from '../utils/tool';
|
|
14
|
-
import { CnBox } from '@cainiaofe/cn-ui';
|
|
15
|
-
|
|
16
|
-
export const IndicatorArea = ({ configData, orgLevelVal }: IContentProps) => {
|
|
17
|
-
return (
|
|
18
|
-
<RequestWrapper
|
|
19
|
-
errorBoxHeight={90}
|
|
20
|
-
requestData={{
|
|
21
|
-
url: handleAddQuery(INDICATOR_DATA_BASE_URL, {
|
|
22
|
-
id: configData.id,
|
|
23
|
-
dataAccVal: configData.dataAccCode,
|
|
24
|
-
orgLevelVal,
|
|
25
|
-
}),
|
|
26
|
-
}}
|
|
27
|
-
service={IndicatorService.getDataInfoList}
|
|
28
|
-
>
|
|
29
|
-
{(data) => {
|
|
30
|
-
const curConfig = configData.indicatorConfig[0];
|
|
31
|
-
const subTitle = curConfig.extra?.subTitle;
|
|
32
|
-
|
|
33
|
-
return (
|
|
34
|
-
<CnBox direction='row' justify='space-between'>
|
|
35
|
-
<div>
|
|
36
|
-
<IndicatorInfo
|
|
37
|
-
jumpUrl={`/#/indicator-center/details?id=${curConfig.id}`}
|
|
38
|
-
label={configData.name}
|
|
39
|
-
unit={getListLabel(
|
|
40
|
-
unitList,
|
|
41
|
-
configData.indicatorConfig[0]?.unit,
|
|
42
|
-
)}
|
|
43
|
-
value={handleNumberShowStr(data.indicator?.value)}
|
|
44
|
-
extraLabel={getExtraLabel(subTitle) ?? data.indicator?.date}
|
|
45
|
-
extraValue={data.indicator?.expected}
|
|
46
|
-
isUnitWrap
|
|
47
|
-
/>
|
|
48
|
-
</div>
|
|
49
|
-
<WinChart
|
|
50
|
-
color={configData.commonConfig.color}
|
|
51
|
-
data={data.list0 ?? []}
|
|
52
|
-
chartType={WinChartType.MINI_AREA}
|
|
53
|
-
style={{
|
|
54
|
-
width: 160,
|
|
55
|
-
height: 84,
|
|
56
|
-
}}
|
|
57
|
-
/>
|
|
58
|
-
</CnBox>
|
|
59
|
-
);
|
|
60
|
-
}}
|
|
61
|
-
</RequestWrapper>
|
|
62
|
-
);
|
|
63
|
-
};
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { IStyleProps } from '@/types';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
3
|
-
import { getHandleOpenLink } from 'src/utils';
|
|
4
|
-
import { css, styled } from 'styled-components';
|
|
5
|
-
import { UnitWrapper } from 'src/components/win-wrappers/card-wrapper';
|
|
6
|
-
|
|
7
|
-
interface IProps extends IStyleProps {
|
|
8
|
-
label: string;
|
|
9
|
-
value: ReactNode;
|
|
10
|
-
unit: string;
|
|
11
|
-
extraLabel?: string;
|
|
12
|
-
extraValue?: ReactNode;
|
|
13
|
-
extraValueColor?: string;
|
|
14
|
-
jumpUrl?: string;
|
|
15
|
-
isUnitWrap?: boolean;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export const IndicatorInfo = ({
|
|
19
|
-
label,
|
|
20
|
-
value,
|
|
21
|
-
unit,
|
|
22
|
-
extraLabel,
|
|
23
|
-
extraValue,
|
|
24
|
-
extraValueColor,
|
|
25
|
-
jumpUrl,
|
|
26
|
-
isUnitWrap,
|
|
27
|
-
...args
|
|
28
|
-
}: Partial<IProps>) => {
|
|
29
|
-
return (
|
|
30
|
-
<div {...args}>
|
|
31
|
-
<LabelWrapper>
|
|
32
|
-
<div
|
|
33
|
-
data-value
|
|
34
|
-
onClick={getHandleOpenLink(jumpUrl)}
|
|
35
|
-
style={{
|
|
36
|
-
...(!!jumpUrl && {
|
|
37
|
-
cursor: 'pointer',
|
|
38
|
-
}),
|
|
39
|
-
}}
|
|
40
|
-
>
|
|
41
|
-
{value}
|
|
42
|
-
{!isUnitWrap && <UnitWrapper>{unit}</UnitWrapper>}
|
|
43
|
-
</div>
|
|
44
|
-
</LabelWrapper>
|
|
45
|
-
{isUnitWrap && <UnitWrapper>{unit}</UnitWrapper>}
|
|
46
|
-
</div>
|
|
47
|
-
);
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
const LabelWrapper = styled.div<{ unit?: string }>`
|
|
51
|
-
line-height: 1;
|
|
52
|
-
margin-top: 12px;
|
|
53
|
-
margin-bottom: 8px;
|
|
54
|
-
|
|
55
|
-
[data-label] {
|
|
56
|
-
width: 106px;
|
|
57
|
-
font-size: 12px;
|
|
58
|
-
margin-bottom: 8px;
|
|
59
|
-
display: flex;
|
|
60
|
-
|
|
61
|
-
${(props) =>
|
|
62
|
-
!!props.unit &&
|
|
63
|
-
css`
|
|
64
|
-
&::after {
|
|
65
|
-
content: '(${props.unit})';
|
|
66
|
-
display: inline-block;
|
|
67
|
-
color: #6d7a90;
|
|
68
|
-
}
|
|
69
|
-
`}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
[data-value] {
|
|
73
|
-
font-size: 30px;
|
|
74
|
-
line-height: 16px;
|
|
75
|
-
font-weight: 700;
|
|
76
|
-
color: #000;
|
|
77
|
-
}
|
|
78
|
-
`;
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
import $i18n from 'panda-i18n';
|
|
2
|
-
import { useEffect, useRef, useState } from 'react';
|
|
3
|
-
import { checkEntityArr } from '@/utils';
|
|
4
|
-
import { MatterList } from './MatterList';
|
|
5
|
-
import { ICnPaging, IMatterInfo, IStyleProps, MatterType } from '@/types';
|
|
6
|
-
import { Box, CnPagination } from '@cainiaofe/cn-ui';
|
|
7
|
-
import { WorkbenchService } from 'src/services/WorkbenchService';
|
|
8
|
-
import { PanelTitleTab } from 'src/components/panel-title-tab';
|
|
9
|
-
import { RequestWrapper } from 'src/components/win-wrappers/request-wrapper';
|
|
10
|
-
|
|
11
|
-
const matterTitleList = [
|
|
12
|
-
{
|
|
13
|
-
label: $i18n.get({ id: 'TodoList', dm: '待办清单' }),
|
|
14
|
-
value: MatterType.PENDING,
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
label: $i18n.get({ id: 'ISentOut', dm: '我发出的' }),
|
|
18
|
-
value: MatterType.CREATE,
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
label: $i18n.get({ id: 'ItemsAlreadyHandled', dm: '已办事项' }),
|
|
22
|
-
value: MatterType.COMPLETE,
|
|
23
|
-
},
|
|
24
|
-
];
|
|
25
|
-
|
|
26
|
-
interface IProps extends IStyleProps {}
|
|
27
|
-
|
|
28
|
-
export const MatterContent = ({ style }: IProps) => {
|
|
29
|
-
const [curTitleTab, setCurTitleTab] = useState(MatterType.PENDING);
|
|
30
|
-
|
|
31
|
-
return (
|
|
32
|
-
<div style={style}>
|
|
33
|
-
<PanelTitleTab
|
|
34
|
-
value={curTitleTab}
|
|
35
|
-
onChange={setCurTitleTab}
|
|
36
|
-
dataList={matterTitleList}
|
|
37
|
-
/>
|
|
38
|
-
|
|
39
|
-
{matterTitleList.map((item) => (
|
|
40
|
-
<MatterTable
|
|
41
|
-
key={item.value}
|
|
42
|
-
show={item.value === curTitleTab}
|
|
43
|
-
workflowType={item.value}
|
|
44
|
-
onChangeWorkflowType={setCurTitleTab}
|
|
45
|
-
/>
|
|
46
|
-
))}
|
|
47
|
-
</div>
|
|
48
|
-
);
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
const MatterTable = ({
|
|
52
|
-
show,
|
|
53
|
-
workflowType,
|
|
54
|
-
onChangeWorkflowType,
|
|
55
|
-
}: {
|
|
56
|
-
show: boolean;
|
|
57
|
-
workflowType: MatterType;
|
|
58
|
-
onChangeWorkflowType: (workflowType: MatterType) => void;
|
|
59
|
-
}) => {
|
|
60
|
-
const [hasInitData, setHasInitData] = useState(false);
|
|
61
|
-
const [paging, setPaging] = useState<Partial<ICnPaging>>({
|
|
62
|
-
currentPage: 1,
|
|
63
|
-
pageSize: 5,
|
|
64
|
-
});
|
|
65
|
-
const dataRef = useRef<IMatterInfo[]>();
|
|
66
|
-
|
|
67
|
-
useEffect(() => {
|
|
68
|
-
if (hasInitData && !checkEntityArr(dataRef.current)) {
|
|
69
|
-
if (workflowType === MatterType.PENDING) {
|
|
70
|
-
onChangeWorkflowType(MatterType.CREATE);
|
|
71
|
-
} else if (workflowType === MatterType.CREATE) {
|
|
72
|
-
onChangeWorkflowType(MatterType.COMPLETE);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}, [hasInitData, onChangeWorkflowType, workflowType]);
|
|
76
|
-
|
|
77
|
-
return (
|
|
78
|
-
<div style={{ display: show ? 'block' : 'none' }}>
|
|
79
|
-
<RequestWrapper
|
|
80
|
-
initData={show}
|
|
81
|
-
errorBoxHeight={300}
|
|
82
|
-
requestData={{
|
|
83
|
-
workflowType,
|
|
84
|
-
currentPage: paging.currentPage,
|
|
85
|
-
pageSize: paging.pageSize,
|
|
86
|
-
}}
|
|
87
|
-
service={WorkbenchService.getMatterDataList}
|
|
88
|
-
>
|
|
89
|
-
{(data) => {
|
|
90
|
-
setHasInitData(true);
|
|
91
|
-
dataRef.current = data.tableData;
|
|
92
|
-
|
|
93
|
-
return (
|
|
94
|
-
<div>
|
|
95
|
-
<MatterList
|
|
96
|
-
data={data.tableData}
|
|
97
|
-
showHandle={workflowType === 'PENDING'}
|
|
98
|
-
/>
|
|
99
|
-
|
|
100
|
-
<Box direction="row" justify="flex-end">
|
|
101
|
-
<CnPagination
|
|
102
|
-
size="small"
|
|
103
|
-
shape="arrow-only"
|
|
104
|
-
total={data.paging.totalCount}
|
|
105
|
-
current={paging.currentPage}
|
|
106
|
-
onChange={(currentPage) =>
|
|
107
|
-
setPaging({
|
|
108
|
-
...paging,
|
|
109
|
-
currentPage,
|
|
110
|
-
})
|
|
111
|
-
}
|
|
112
|
-
pageSize={paging.pageSize}
|
|
113
|
-
/>
|
|
114
|
-
</Box>
|
|
115
|
-
</div>
|
|
116
|
-
);
|
|
117
|
-
}}
|
|
118
|
-
</RequestWrapper>
|
|
119
|
-
</div>
|
|
120
|
-
);
|
|
121
|
-
};
|
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
import $i18n from 'panda-i18n';
|
|
2
|
-
import { styled } from 'styled-components';
|
|
3
|
-
import { getHandleOpenLink, checkEntityArr } from '@/utils';
|
|
4
|
-
import { IMatterInfo } from 'src/types';
|
|
5
|
-
import { NoContent } from 'src/components/none-content';
|
|
6
|
-
import { CnBox } from '@cainiaofe/cn-ui';
|
|
7
|
-
import { IconBox } from '@/components/icon';
|
|
8
|
-
|
|
9
|
-
interface IProps {
|
|
10
|
-
data?: IMatterInfo[];
|
|
11
|
-
showHandle?: boolean;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export const MatterList = ({ data = [], showHandle }: IProps) => {
|
|
15
|
-
return (
|
|
16
|
-
<ListWrapper>
|
|
17
|
-
{checkEntityArr(data) ? (
|
|
18
|
-
data.map((item, index) => (
|
|
19
|
-
<DescriptionWrapper key={index}>
|
|
20
|
-
<CnBox direction="row" spacing={8}>
|
|
21
|
-
<IconBox
|
|
22
|
-
size={24}
|
|
23
|
-
src={
|
|
24
|
-
['TERMINATED', 'COMPLETED'].includes(item.status)
|
|
25
|
-
? DONE
|
|
26
|
-
: PROCESSING
|
|
27
|
-
}
|
|
28
|
-
/>
|
|
29
|
-
|
|
30
|
-
<div>
|
|
31
|
-
<div
|
|
32
|
-
data-title
|
|
33
|
-
onClick={getHandleOpenLink(item.url)}
|
|
34
|
-
style={{
|
|
35
|
-
...(item.title.startsWith('【') && {
|
|
36
|
-
transform: 'translateX(-8px)',
|
|
37
|
-
}),
|
|
38
|
-
}}
|
|
39
|
-
>
|
|
40
|
-
{item.title}
|
|
41
|
-
</div>
|
|
42
|
-
<div data-extra>
|
|
43
|
-
<span>
|
|
44
|
-
{$i18n.get(
|
|
45
|
-
{
|
|
46
|
-
id: 'InitiatoritemApplicantName',
|
|
47
|
-
dm: '发起人:{itemApplicantName}',
|
|
48
|
-
},
|
|
49
|
-
{ itemApplicantName: item.applicantName },
|
|
50
|
-
)}
|
|
51
|
-
</span>
|
|
52
|
-
<span>{item.applyTime}</span>
|
|
53
|
-
{!!item.handlerName && (
|
|
54
|
-
<span>
|
|
55
|
-
{$i18n.get(
|
|
56
|
-
{
|
|
57
|
-
id: 'CurrentApproveritemHandlerName',
|
|
58
|
-
dm: '当前审批人:{itemHandlerName}',
|
|
59
|
-
},
|
|
60
|
-
{ itemHandlerName: item.handlerName },
|
|
61
|
-
)}
|
|
62
|
-
</span>
|
|
63
|
-
)}
|
|
64
|
-
</div>
|
|
65
|
-
</div>
|
|
66
|
-
</CnBox>
|
|
67
|
-
{showHandle && (
|
|
68
|
-
<HandleWrapper onClick={getHandleOpenLink(item.url)}>
|
|
69
|
-
👉去处理
|
|
70
|
-
</HandleWrapper>
|
|
71
|
-
)}
|
|
72
|
-
</DescriptionWrapper>
|
|
73
|
-
))
|
|
74
|
-
) : (
|
|
75
|
-
<NoContent
|
|
76
|
-
message={$i18n.get({ id: 'TERM.NoData', dm: '暂无数据' })}
|
|
77
|
-
style={{ transform: 'translateY(120px)' }}
|
|
78
|
-
/>
|
|
79
|
-
)}
|
|
80
|
-
</ListWrapper>
|
|
81
|
-
);
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
const ListWrapper = styled.div`
|
|
85
|
-
display: grid;
|
|
86
|
-
grid: auto-flow 64px / 1fr;
|
|
87
|
-
gap: 0;
|
|
88
|
-
line-height: 1;
|
|
89
|
-
font-size: 14px;
|
|
90
|
-
overflow: hidden;
|
|
91
|
-
height: 310px;
|
|
92
|
-
margin-bottom: 12px;
|
|
93
|
-
place-items: center stretch;
|
|
94
|
-
`;
|
|
95
|
-
|
|
96
|
-
const DescriptionWrapper = styled.div`
|
|
97
|
-
height: 100%;
|
|
98
|
-
border-top: solid #eee 1px;
|
|
99
|
-
display: grid;
|
|
100
|
-
grid: auto-flow / 1fr 70px;
|
|
101
|
-
place-items: center stretch;
|
|
102
|
-
|
|
103
|
-
[data-title] {
|
|
104
|
-
cursor: pointer;
|
|
105
|
-
font-weight: 500;
|
|
106
|
-
font-size: 14px;
|
|
107
|
-
line-height: 1;
|
|
108
|
-
margin-bottom: 8px;
|
|
109
|
-
white-space: nowrap;
|
|
110
|
-
overflow: hidden;
|
|
111
|
-
color: #272f3d;
|
|
112
|
-
text-overflow: ellipsis;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
[data-extra] {
|
|
116
|
-
font-size: 12px;
|
|
117
|
-
color: #5d677a;
|
|
118
|
-
line-height: 1;
|
|
119
|
-
span {
|
|
120
|
-
margin-right: 12px;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
`;
|
|
124
|
-
|
|
125
|
-
const HandleWrapper = styled.div`
|
|
126
|
-
cursor: pointer;
|
|
127
|
-
color: #272f3d;
|
|
128
|
-
font-size: 12px;
|
|
129
|
-
height: 22px;
|
|
130
|
-
text-align: center;
|
|
131
|
-
line-height: 21px;
|
|
132
|
-
border: solid #ddd 1px;
|
|
133
|
-
/* width: 80px; */
|
|
134
|
-
border-radius: 12px;
|
|
135
|
-
`;
|
|
136
|
-
|
|
137
|
-
const PROCESSING =
|
|
138
|
-
'https://img.alicdn.com/imgextra/i3/O1CN01HvOfeP1XOCe517Amr_!!6000000002913-55-tps-31-29.svg';
|
|
139
|
-
|
|
140
|
-
const DONE =
|
|
141
|
-
'https://img.alicdn.com/imgextra/i3/O1CN01jr6Aiq1EIjDAqHXkZ_!!6000000000329-55-tps-30-28.svg';
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { useState } from 'react';
|
|
2
|
-
import { NoticeList } from './NoticeList';
|
|
3
|
-
import { ICnPaging, IStyleProps } from '@/types';
|
|
4
|
-
import { Box, CnPagination } from '@cainiaofe/cn-ui';
|
|
5
|
-
import { WorkbenchService } from 'src/services/WorkbenchService';
|
|
6
|
-
import { RequestWrapper } from 'src/components/win-wrappers/request-wrapper';
|
|
7
|
-
import { useUserInfo } from 'src/components/WinMenu/hooks/useUserInfo';
|
|
8
|
-
|
|
9
|
-
interface IProps extends IStyleProps {}
|
|
10
|
-
|
|
11
|
-
export const NoticeContent = ({ style }: IProps) => {
|
|
12
|
-
return (
|
|
13
|
-
<div style={style}>
|
|
14
|
-
<NoticeTable />
|
|
15
|
-
</div>
|
|
16
|
-
);
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export const NoticeTable = () => {
|
|
20
|
-
const userInfo = useUserInfo();
|
|
21
|
-
const [paging, setPaging] = useState<Partial<ICnPaging>>({
|
|
22
|
-
currentPage: 1,
|
|
23
|
-
pageSize: 10,
|
|
24
|
-
});
|
|
25
|
-
if (!userInfo.employeeId) {
|
|
26
|
-
return null;
|
|
27
|
-
}
|
|
28
|
-
return (
|
|
29
|
-
<div>
|
|
30
|
-
<RequestWrapper
|
|
31
|
-
requestData={{
|
|
32
|
-
currentPage: paging.currentPage,
|
|
33
|
-
pageSize: paging.pageSize,
|
|
34
|
-
}}
|
|
35
|
-
isInside={userInfo.employeeType === 'inside'}
|
|
36
|
-
service={WorkbenchService.getNoticeDataList}
|
|
37
|
-
>
|
|
38
|
-
{(data) =>
|
|
39
|
-
data && (
|
|
40
|
-
<div>
|
|
41
|
-
<NoticeList
|
|
42
|
-
data={data.tableData}
|
|
43
|
-
isInside={userInfo.employeeType === 'inside'}
|
|
44
|
-
/>
|
|
45
|
-
<Box direction='row' justify='flex-end'>
|
|
46
|
-
<CnPagination
|
|
47
|
-
shape='arrow-only'
|
|
48
|
-
pageSizeSelector='dropdown'
|
|
49
|
-
pageSizeList={[10, 50, 100]}
|
|
50
|
-
total={data.paging.totalCount}
|
|
51
|
-
current={paging.currentPage}
|
|
52
|
-
onChange={(currentPage) =>
|
|
53
|
-
setPaging({
|
|
54
|
-
...paging,
|
|
55
|
-
currentPage,
|
|
56
|
-
})
|
|
57
|
-
}
|
|
58
|
-
pageSize={paging.pageSize}
|
|
59
|
-
onPageSizeChange={(pageSize) =>
|
|
60
|
-
setPaging({
|
|
61
|
-
...paging,
|
|
62
|
-
pageSize,
|
|
63
|
-
})
|
|
64
|
-
}
|
|
65
|
-
/>
|
|
66
|
-
</Box>
|
|
67
|
-
</div>
|
|
68
|
-
)
|
|
69
|
-
}
|
|
70
|
-
</RequestWrapper>
|
|
71
|
-
</div>
|
|
72
|
-
);
|
|
73
|
-
};
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { styled } from 'styled-components';
|
|
2
|
-
import {
|
|
3
|
-
getHandleOpenLink,
|
|
4
|
-
checkEntityArr,
|
|
5
|
-
getBossOrigin,
|
|
6
|
-
formatDate,
|
|
7
|
-
} from '@/utils';
|
|
8
|
-
import { IZNoticeInfo } from 'src/types';
|
|
9
|
-
import { NoContent } from 'src/components/none-content';
|
|
10
|
-
import { CnBox, CnButton } from '@cainiaofe/cn-ui';
|
|
11
|
-
|
|
12
|
-
interface IProps {
|
|
13
|
-
data?: IZNoticeInfo[];
|
|
14
|
-
isInside?: boolean;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export const NoticeList = ({ data = [], isInside }: IProps) => {
|
|
18
|
-
const bossOrigin = getBossOrigin(isInside);
|
|
19
|
-
|
|
20
|
-
return (
|
|
21
|
-
<ListWrapper>
|
|
22
|
-
{checkEntityArr(data) ? (
|
|
23
|
-
data.map((item, index) => (
|
|
24
|
-
<CnBox
|
|
25
|
-
key={index}
|
|
26
|
-
align="center"
|
|
27
|
-
direction="row"
|
|
28
|
-
justify="space-between"
|
|
29
|
-
style={{ padding: '4px 0' }}
|
|
30
|
-
>
|
|
31
|
-
<CnButton
|
|
32
|
-
style={{
|
|
33
|
-
whiteSpace: 'normal',
|
|
34
|
-
lineHeight: '15px',
|
|
35
|
-
height: 'auto',
|
|
36
|
-
textAlign: 'left',
|
|
37
|
-
}}
|
|
38
|
-
text
|
|
39
|
-
type="primary"
|
|
40
|
-
onClick={getHandleOpenLink(
|
|
41
|
-
item.bizId
|
|
42
|
-
? `${bossOrigin}/basic/#/notice/detail?bizId=${item.bizId}`
|
|
43
|
-
: '',
|
|
44
|
-
)}
|
|
45
|
-
>
|
|
46
|
-
{item.title}
|
|
47
|
-
</CnButton>
|
|
48
|
-
<span>{formatDate(item.releaseDate)}</span>
|
|
49
|
-
</CnBox>
|
|
50
|
-
))
|
|
51
|
-
) : (
|
|
52
|
-
<NoContent style={{ transform: 'translateY(120px)' }} />
|
|
53
|
-
)}
|
|
54
|
-
</ListWrapper>
|
|
55
|
-
);
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
const ListWrapper = styled.div`
|
|
59
|
-
display: grid;
|
|
60
|
-
grid: auto-flow 24px / 1fr;
|
|
61
|
-
gap: 12px;
|
|
62
|
-
line-height: 1;
|
|
63
|
-
font-size: 14px;
|
|
64
|
-
overflow: auto;
|
|
65
|
-
height: 330px;
|
|
66
|
-
margin-bottom: 12px;
|
|
67
|
-
place-items: center stretch;
|
|
68
|
-
`;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { Select } from '@cainiaofe/cn-ui';
|
|
2
|
-
import { styled } from 'styled-components';
|
|
3
|
-
|
|
4
|
-
export const SelectDecoration = styled(Select).attrs({
|
|
5
|
-
size: 'small',
|
|
6
|
-
showSearch: true,
|
|
7
|
-
style: {
|
|
8
|
-
width: 130,
|
|
9
|
-
},
|
|
10
|
-
popupStyle: {
|
|
11
|
-
width: 200,
|
|
12
|
-
},
|
|
13
|
-
})`
|
|
14
|
-
transform: translateY(-4px);
|
|
15
|
-
|
|
16
|
-
span {
|
|
17
|
-
background: transparent;
|
|
18
|
-
}
|
|
19
|
-
`;
|
|
20
|
-
|
|
21
|
-
export const IndicatorSelectDecoration = styled(Select).attrs({
|
|
22
|
-
size: 'small',
|
|
23
|
-
showSearch: true,
|
|
24
|
-
style: {
|
|
25
|
-
width: 100,
|
|
26
|
-
},
|
|
27
|
-
popupStyle: {
|
|
28
|
-
width: 200,
|
|
29
|
-
},
|
|
30
|
-
})`
|
|
31
|
-
span {
|
|
32
|
-
background: transparent;
|
|
33
|
-
}
|
|
34
|
-
`;
|