@bit-sun/business-component 2.0.32 → 2.0.33

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 (100) hide show
  1. package/.editorconfig +16 -16
  2. package/.fatherrc.ts +4 -4
  3. package/.gitlab-ci.yml +174 -174
  4. package/.prettierignore +7 -7
  5. package/.prettierrc +11 -11
  6. package/.umirc.ts +74 -74
  7. package/README.md +27 -27
  8. package/dist/index.esm.js +5763 -7663
  9. package/dist/index.js +5760 -7660
  10. package/docs/index.md +21 -21
  11. package/lib/assets/drag.svg +17 -17
  12. package/lib/assets/exportFail.svg +37 -37
  13. package/lib/assets/exportProcessing.svg +28 -28
  14. package/lib/assets/exportSuccess.svg +34 -34
  15. package/lib/assets/label_icon_bottom.svg +25 -25
  16. package/lib/assets/upExport.svg +22 -22
  17. package/package.json +66 -69
  18. package/src/assets/btn-delete.svg +29 -29
  19. package/src/assets/btn-edit.svg +19 -19
  20. package/src/assets/btn-more.svg +17 -17
  21. package/src/assets/btn-submit.svg +19 -19
  22. package/src/assets/close.svg +26 -26
  23. package/src/assets/drag.svg +17 -17
  24. package/src/assets/exportFail.svg +37 -37
  25. package/src/assets/exportProcessing.svg +28 -28
  26. package/src/assets/exportSuccess.svg +34 -34
  27. package/src/assets/fixed-left-active.svg +11 -11
  28. package/src/assets/fixed-left.svg +15 -15
  29. package/src/assets/fixed-right-active.svg +11 -11
  30. package/src/assets/fixed-right.svg +15 -15
  31. package/src/assets/icon-quanping.svg +15 -15
  32. package/src/assets/icon-shezhi.svg +17 -17
  33. package/src/assets/label_icon_bottom.svg +25 -25
  34. package/src/assets/scanning.svg +24 -24
  35. package/src/assets/upExport.svg +22 -22
  36. package/src/components/Business/AddSelectBusiness/index.md +41 -41
  37. package/src/components/Business/AddSelectBusiness/index.tsx +290 -290
  38. package/src/components/Business/BsSulaQueryTable/index.less +219 -219
  39. package/src/components/Business/BsSulaQueryTable/index.tsx +534 -534
  40. package/src/components/Business/BsSulaQueryTable/setting.tsx +817 -817
  41. package/src/components/Business/BsSulaQueryTable/utils.less +65 -65
  42. package/src/components/Business/BsSulaQueryTable/utils.tsx +690 -690
  43. package/src/components/Business/CommodityEntry/index.md +70 -70
  44. package/src/components/Business/CommodityEntry/index.tsx +80 -80
  45. package/src/components/Business/CommonAlert/index.tsx +23 -23
  46. package/src/components/Business/CommonGuideWrapper/index.less +111 -111
  47. package/src/components/Business/CommonGuideWrapper/index.md +39 -39
  48. package/src/components/Business/CommonGuideWrapper/index.tsx +83 -83
  49. package/src/components/Business/DetailPageWrapper/index.less +79 -79
  50. package/src/components/Business/DetailPageWrapper/index.tsx +324 -324
  51. package/src/components/Business/DetailPageWrapper/utils.tsx +110 -110
  52. package/src/components/Business/HomePageWrapper/index.less +33 -33
  53. package/src/components/Business/HomePageWrapper/index.md +45 -45
  54. package/src/components/Business/HomePageWrapper/index.tsx +150 -150
  55. package/src/components/Business/SearchSelect/BusinessUtils.ts +1448 -1448
  56. package/src/components/Business/SearchSelect/common.ts +53 -53
  57. package/src/components/Business/SearchSelect/index.md +1137 -1137
  58. package/src/components/Business/SearchSelect/index.tsx +51 -51
  59. package/src/components/Business/SearchSelect/utils.ts +99 -99
  60. package/src/components/Business/StateFlow/index.less +130 -130
  61. package/src/components/Business/StateFlow/index.md +60 -60
  62. package/src/components/Business/StateFlow/index.tsx +29 -29
  63. package/src/components/Business/TreeSearchSelect/index.md +126 -126
  64. package/src/components/Business/TreeSearchSelect/index.tsx +34 -34
  65. package/src/components/Business/TreeSearchSelect/utils.ts +60 -60
  66. package/src/components/Business/columnSettingTable/columnSetting.tsx +762 -762
  67. package/src/components/Business/columnSettingTable/index.less +247 -247
  68. package/src/components/Business/columnSettingTable/index.md +357 -357
  69. package/src/components/Business/columnSettingTable/index.tsx +225 -225
  70. package/src/components/Business/columnSettingTable/sulaSettingTable.tsx +233 -233
  71. package/src/components/Business/columnSettingTable/utils.tsx +68 -68
  72. package/src/components/Functional/AddSelect/index.less +367 -367
  73. package/src/components/Functional/AddSelect/index.md +122 -122
  74. package/src/components/Functional/AddSelect/index.tsx +962 -962
  75. package/src/components/Functional/BillEntry/index.less +371 -371
  76. package/src/components/Functional/BillEntry/index.md +37 -37
  77. package/src/components/Functional/BillEntry/index.tsx +547 -547
  78. package/src/components/Functional/DataImport/index.less +63 -63
  79. package/src/components/Functional/DataImport/index.md +44 -44
  80. package/src/components/Functional/DataImport/index.tsx +689 -689
  81. package/src/components/Functional/DataValidation/index.less +63 -63
  82. package/src/components/Functional/DataValidation/index.md +38 -38
  83. package/src/components/Functional/DataValidation/index.tsx +681 -681
  84. package/src/components/Functional/ExportFunctions/ExportIcon/index.md +37 -37
  85. package/src/components/Functional/ExportFunctions/ExportIcon/index.tsx +59 -59
  86. package/src/components/Functional/QueryMutipleInput/index.less +37 -37
  87. package/src/components/Functional/QueryMutipleInput/index.md +33 -33
  88. package/src/components/Functional/QueryMutipleInput/index.tsx +128 -128
  89. package/src/components/Functional/SearchSelect/index.less +115 -115
  90. package/src/components/Functional/SearchSelect/index.md +141 -141
  91. package/src/components/Functional/SearchSelect/index.tsx +812 -812
  92. package/src/components/Functional/TreeSearchSelect/index.md +47 -47
  93. package/src/components/Functional/TreeSearchSelect/index.tsx +149 -149
  94. package/src/index.ts +30 -30
  95. package/src/utils/CheckOneUser/index.md +39 -39
  96. package/src/utils/CheckOneUser/index.ts +51 -51
  97. package/src/utils/requestUtils.ts +32 -32
  98. package/src/utils/utils.ts +22 -22
  99. package/tsconfig.json +29 -29
  100. package/typings.d.ts +4 -4
@@ -1,325 +1,325 @@
1
- // @ts-nocheck
2
- import {
3
- ArrowLeftOutlined,
4
- } from '@ant-design/icons';
5
- import { Anchor, Tooltip, Button, Menu, Dropdown, Breadcrumb } from 'antd';
6
- import React, { useEffect, useState, useMemo } from 'react';
7
- import { history } from 'umi';
8
- import { memoizeOneFormatter, getBreadcrumbNameMap, doDetailPageAction, judgeIsEmpty } from './utils';
9
- import pathToRegexp from 'path-to-regexp';
10
- import './index.less';
11
- import quanping from '../../../assets/icon-quanping.svg';
12
- import scanning from '../../../assets/scanning.svg';
13
- import editIcon from '../../../assets/btn-edit.svg';
14
- import submitIcon from '../../../assets/btn-submit.svg';
15
- import deleteIcon from '../../../assets/btn-delete.svg';
16
- import moreIcon from '../../../assets/btn-more.svg';
17
- import { useLocation, formatMessage } from 'umi';
18
- import CommonAlert from '../CommonAlert';
19
-
20
- interface actionItem {
21
- type?: string;
22
- name: string;
23
- icon?: string;
24
- visible?: boolean | string;
25
- disabled?: boolean;
26
- code?: string; //权限过滤todo
27
- action: object;
28
- }
29
-
30
- export const iconMap = {
31
- edit: <img src={editIcon} />,
32
- delete: <img src={deleteIcon} />,
33
- submit: <img src={submitIcon} />,
34
- more: <img src={moreIcon} />,
35
- };
36
-
37
- export default (props: any) => {
38
- const { pathname } = useLocation();
39
- const [id]: any = useState(pathname + 'id');
40
- const { children, ...restProps } = props;
41
-
42
- return (
43
- <div id={id} className={'detail_page_wrapper'}>
44
- <DetailWrapper
45
- pathname={pathname}
46
- {
47
- ...restProps
48
- }
49
- />
50
- {children}
51
- </div>
52
- );
53
- };
54
-
55
- const DetailWrapper = React.memo(
56
- ({
57
- pathname,
58
- actionList,
59
- routes=[],
60
- itemPath,
61
- alertProps,
62
- donotNeedShowScreenIcon=false,
63
- }: any) => {
64
- const [isFullScreen, setIsFnllScreen]: any = useState(false);
65
-
66
- const basePath = window.top == window ? '' : `/${itemPath}`;
67
-
68
- const menuRoutes =
69
- window.top == window
70
- ? routes.find((item) => item.path === '/')?.routes || []
71
- : JSON.parse(localStorage.getItem('limitedMenuData') || '[]');
72
-
73
- const breadcrumbNameMap = getBreadcrumbNameMap(
74
- memoizeOneFormatter(menuRoutes, ''),
75
- );
76
- const matchParamsPath = (pathname: string, breadcrumbNameMap: object) => {
77
- const pathKey: any = Object.keys(breadcrumbNameMap).find((key) =>
78
- pathToRegexp(key).test(pathname),
79
- );
80
- return breadcrumbNameMap[pathKey];
81
- };
82
-
83
- const getPageTitle = (pathname: string) => {
84
- const currRouterData = matchParamsPath(
85
- `${basePath}${pathname}`,
86
- breadcrumbNameMap,
87
- );
88
-
89
- if (!currRouterData) {
90
- return '';
91
- }
92
- const pageName = formatMessage({
93
- id: currRouterData.locale || currRouterData.name,
94
- defaultMessage: currRouterData.name,
95
- });
96
-
97
- return `${pageName}`;
98
- };
99
-
100
- const pageTitle = useMemo(() => getPageTitle(pathname), [pathname]);
101
-
102
- const breadcrumbArr = `${basePath}${pathname}`
103
- .split('/')
104
- .slice(1)
105
- .map((_item, index, arr) =>
106
- matchParamsPath(
107
- `/${arr.slice(0, index + 1).join('/')}`,
108
- breadcrumbNameMap,
109
- ),
110
- )
111
- .filter((item) => item);
112
-
113
- useEffect(() => {}, []);
114
-
115
- const ShowFullScreen = () => {
116
- if (window.top != window) {
117
- window.parent.postMessage(
118
- {
119
- type: 'screenChange',
120
- id: itemPath,
121
- },
122
- '*',
123
- );
124
- setIsFnllScreen(!isFullScreen);
125
- } else {
126
- const isFullScreen: any =
127
- document.fullScreen ||
128
- document.webkitIsFullScreen ||
129
- document.mozFullScreen;
130
- let contentEle: any = document.querySelector(`body`);
131
- // addTabsNavStyle(isFullScreen);
132
- if (contentEle && !isFullScreen) {
133
- let fullScreenEle =
134
- contentEle.requestFullscreen ||
135
- contentEle.mozRequestFullScreen ||
136
- contentEle.webkitRequestFullScreen ||
137
- contentEle.msRequestFullscreen;
138
- if (fullScreenEle) {
139
- fullScreenEle.call(contentEle);
140
- setIsFnllScreen(true);
141
- return;
142
- }
143
- }
144
- if (document && isFullScreen) {
145
- let exitFullScreen =
146
- document.exitFullscreen ||
147
- document.mozCancelFullScreen ||
148
- document.webkitCancelFullScreen ||
149
- document.msExitFullscreen;
150
- if (exitFullScreen) {
151
- exitFullScreen.call(document);
152
- setIsFnllScreen(false);
153
- return;
154
- }
155
- }
156
- }
157
- };
158
-
159
- const renderPageActionList = (actionLists: Array<actionItem>) => {
160
- const authButton = localStorage.getItem('menuAuth_mainProject')
161
- ? JSON.parse(localStorage.getItem('menuAuth_mainProject') as string)
162
- : [];
163
- let visibleActions = actionLists.filter(
164
- (action) =>
165
- ((action.visible && action.visible !== 'false') || judgeIsEmpty(action.visible)) &&
166
- (judgeIsEmpty(action.code) || authButton.filter(item => item === action.code)),
167
- );
168
-
169
- const renderButton = (item: actionItem, type?: any) => {
170
- return (
171
- <Button
172
- type={type || 'primary'}
173
- icon={item.icon ? iconMap[item.icon] : ''}
174
- danger={item.name === '删除' ? true : false}
175
- disabled={item.disabled}
176
- onClick={() => {
177
- if (typeof item.action === 'function') {
178
- item.action();
179
- } else {
180
- doDetailPageAction(item.action);
181
- }
182
- }}
183
- >
184
- {item.name}
185
- </Button>
186
- );
187
- };
188
-
189
- if (visibleActions.length <= 3) {
190
- return visibleActions.map((item) => {
191
- return renderButton(item);
192
- });
193
- }
194
-
195
- let moreOperate = visibleActions.splice(3);
196
- const menu = (
197
- <Menu>
198
- {moreOperate.map((item: any, index: number) => (
199
- <Menu.Item className="more-btn-action" key={index}>
200
- {renderButton(item, 'link')}
201
- </Menu.Item>
202
- ))}
203
- </Menu>
204
- );
205
- //按钮操作3个显示更多
206
- return (
207
- <div className="detail_btn_wrapper">
208
- {visibleActions.map((item: any, index: number) => {
209
- return renderButton(item);
210
- })}
211
- <Dropdown style={{ padding: '0px' }} overlay={menu}>
212
- <Button type="primary">
213
- <span style={{ margin: '0px' }}>更多</span>
214
- <img src={moreIcon} />
215
- </Button>
216
- </Dropdown>
217
- </div>
218
- );
219
- };
220
-
221
- console.log('detailActions', actionList);
222
- return (
223
- <Anchor
224
- key={`${pathname}_anchor`}
225
- offsetTop={window.top == window ? 78 : 0}
226
- >
227
- <div>
228
- <div className={'detail_page_head'}>
229
- <div
230
- className={'back_home_img_content'}
231
- onClick={() => {
232
- history.goBack();
233
- }}
234
- >
235
- <ArrowLeftOutlined />
236
- </div>
237
- <div className={'detail_page_title_box'}>
238
- <div className={'detail_page_title'}>{pageTitle}</div>
239
- <Breadcrumb>
240
- {breadcrumbArr.map((item) => (
241
- <Breadcrumb.Item
242
- key={item.path}
243
- onClick={() => {
244
- if (
245
- item.path &&
246
- !item.children &&
247
- !pathToRegexp(item.path).test(`${basePath}${pathname}`)
248
- ) {
249
- history.push({
250
- pathname: item.path.replace(basePath, ''),
251
- });
252
- }
253
- }}
254
- >
255
- <span
256
- style={{
257
- color:
258
- item.path &&
259
- pathToRegexp(item.path).test(`${basePath}${pathname}`)
260
- ? '#000000d9'
261
- : '',
262
- }}
263
- className="bread_name"
264
- >
265
- {item.name}
266
- </span>
267
- </Breadcrumb.Item>
268
- ))}
269
- </Breadcrumb>
270
- </div>
271
- <div
272
- className={'detail_page_btns'}
273
- style={{ marginRight: '20px', display: 'flex', gap: '8px' }}
274
- >
275
- {renderPageActionList(actionList)}
276
- {
277
- !donotNeedShowScreenIcon ? ( <a>
278
- {isFullScreen ? (
279
- <Tooltip title="取消全屏">
280
- <img
281
- onClick={() => {
282
- ShowFullScreen();
283
- }}
284
- width={32}
285
- src={scanning}
286
- />
287
- </Tooltip>
288
- ) : (
289
- <Tooltip title="全屏">
290
- <img
291
- onClick={() => {
292
- ShowFullScreen();
293
- }}
294
- width={32}
295
- src={quanping}
296
- />
297
- </Tooltip>
298
- )}
299
- </a>) : null
300
- }
301
- </div>
302
- </div>
303
- {
304
- alertProps && (
305
- <CommonAlert
306
- {
307
- ...alertProps
308
- }
309
- />
310
- )
311
- }
312
- </div>
313
- </Anchor>
314
- );
315
- },
316
- (prevProps, nextProps) => {
317
- if (
318
- JSON.stringify(prevProps.actionList) !=
319
- JSON.stringify(nextProps.actionList)
320
- ) {
321
- return false;
322
- }
323
- return true;
324
- },
1
+ // @ts-nocheck
2
+ import {
3
+ ArrowLeftOutlined,
4
+ } from '@ant-design/icons';
5
+ import { Anchor, Tooltip, Button, Menu, Dropdown, Breadcrumb } from 'antd';
6
+ import React, { useEffect, useState, useMemo } from 'react';
7
+ import { history } from 'umi';
8
+ import { memoizeOneFormatter, getBreadcrumbNameMap, doDetailPageAction, judgeIsEmpty } from './utils';
9
+ import pathToRegexp from 'path-to-regexp';
10
+ import './index.less';
11
+ import quanping from '../../../assets/icon-quanping.svg';
12
+ import scanning from '../../../assets/scanning.svg';
13
+ import editIcon from '../../../assets/btn-edit.svg';
14
+ import submitIcon from '../../../assets/btn-submit.svg';
15
+ import deleteIcon from '../../../assets/btn-delete.svg';
16
+ import moreIcon from '../../../assets/btn-more.svg';
17
+ import { useLocation, formatMessage } from 'umi';
18
+ import CommonAlert from '../CommonAlert';
19
+
20
+ interface actionItem {
21
+ type?: string;
22
+ name: string;
23
+ icon?: string;
24
+ visible?: boolean | string;
25
+ disabled?: boolean;
26
+ code?: string; //权限过滤todo
27
+ action: object;
28
+ }
29
+
30
+ export const iconMap = {
31
+ edit: <img src={editIcon} />,
32
+ delete: <img src={deleteIcon} />,
33
+ submit: <img src={submitIcon} />,
34
+ more: <img src={moreIcon} />,
35
+ };
36
+
37
+ export default (props: any) => {
38
+ const { pathname } = useLocation();
39
+ const [id]: any = useState(pathname + 'id');
40
+ const { children, ...restProps } = props;
41
+
42
+ return (
43
+ <div id={id} className={'detail_page_wrapper'}>
44
+ <DetailWrapper
45
+ pathname={pathname}
46
+ {
47
+ ...restProps
48
+ }
49
+ />
50
+ {children}
51
+ </div>
52
+ );
53
+ };
54
+
55
+ const DetailWrapper = React.memo(
56
+ ({
57
+ pathname,
58
+ actionList,
59
+ routes=[],
60
+ itemPath,
61
+ alertProps,
62
+ donotNeedShowScreenIcon=false,
63
+ }: any) => {
64
+ const [isFullScreen, setIsFnllScreen]: any = useState(false);
65
+
66
+ const basePath = window.top == window ? '' : `/${itemPath}`;
67
+
68
+ const menuRoutes =
69
+ window.top == window
70
+ ? routes.find((item) => item.path === '/')?.routes || []
71
+ : JSON.parse(localStorage.getItem('limitedMenuData') || '[]');
72
+
73
+ const breadcrumbNameMap = getBreadcrumbNameMap(
74
+ memoizeOneFormatter(menuRoutes, ''),
75
+ );
76
+ const matchParamsPath = (pathname: string, breadcrumbNameMap: object) => {
77
+ const pathKey: any = Object.keys(breadcrumbNameMap).find((key) =>
78
+ pathToRegexp(key).test(pathname),
79
+ );
80
+ return breadcrumbNameMap[pathKey];
81
+ };
82
+
83
+ const getPageTitle = (pathname: string) => {
84
+ const currRouterData = matchParamsPath(
85
+ `${basePath}${pathname}`,
86
+ breadcrumbNameMap,
87
+ );
88
+
89
+ if (!currRouterData) {
90
+ return '';
91
+ }
92
+ const pageName = formatMessage({
93
+ id: currRouterData.locale || currRouterData.name,
94
+ defaultMessage: currRouterData.name,
95
+ });
96
+
97
+ return `${pageName}`;
98
+ };
99
+
100
+ const pageTitle = useMemo(() => getPageTitle(pathname), [pathname]);
101
+
102
+ const breadcrumbArr = `${basePath}${pathname}`
103
+ .split('/')
104
+ .slice(1)
105
+ .map((_item, index, arr) =>
106
+ matchParamsPath(
107
+ `/${arr.slice(0, index + 1).join('/')}`,
108
+ breadcrumbNameMap,
109
+ ),
110
+ )
111
+ .filter((item) => item);
112
+
113
+ useEffect(() => {}, []);
114
+
115
+ const ShowFullScreen = () => {
116
+ if (window.top != window) {
117
+ window.parent.postMessage(
118
+ {
119
+ type: 'screenChange',
120
+ id: itemPath,
121
+ },
122
+ '*',
123
+ );
124
+ setIsFnllScreen(!isFullScreen);
125
+ } else {
126
+ const isFullScreen: any =
127
+ document.fullScreen ||
128
+ document.webkitIsFullScreen ||
129
+ document.mozFullScreen;
130
+ let contentEle: any = document.querySelector(`body`);
131
+ // addTabsNavStyle(isFullScreen);
132
+ if (contentEle && !isFullScreen) {
133
+ let fullScreenEle =
134
+ contentEle.requestFullscreen ||
135
+ contentEle.mozRequestFullScreen ||
136
+ contentEle.webkitRequestFullScreen ||
137
+ contentEle.msRequestFullscreen;
138
+ if (fullScreenEle) {
139
+ fullScreenEle.call(contentEle);
140
+ setIsFnllScreen(true);
141
+ return;
142
+ }
143
+ }
144
+ if (document && isFullScreen) {
145
+ let exitFullScreen =
146
+ document.exitFullscreen ||
147
+ document.mozCancelFullScreen ||
148
+ document.webkitCancelFullScreen ||
149
+ document.msExitFullscreen;
150
+ if (exitFullScreen) {
151
+ exitFullScreen.call(document);
152
+ setIsFnllScreen(false);
153
+ return;
154
+ }
155
+ }
156
+ }
157
+ };
158
+
159
+ const renderPageActionList = (actionLists: Array<actionItem>) => {
160
+ const authButton = localStorage.getItem('menuAuth_mainProject')
161
+ ? JSON.parse(localStorage.getItem('menuAuth_mainProject') as string)
162
+ : [];
163
+ let visibleActions = actionLists.filter(
164
+ (action) =>
165
+ ((action.visible && action.visible !== 'false') || judgeIsEmpty(action.visible)) &&
166
+ (judgeIsEmpty(action.code) || authButton.filter(item => item === action.code)),
167
+ );
168
+
169
+ const renderButton = (item: actionItem, type?: any) => {
170
+ return (
171
+ <Button
172
+ type={type || 'primary'}
173
+ icon={item.icon ? iconMap[item.icon] : ''}
174
+ danger={item.name === '删除' ? true : false}
175
+ disabled={item.disabled}
176
+ onClick={() => {
177
+ if (typeof item.action === 'function') {
178
+ item.action();
179
+ } else {
180
+ doDetailPageAction(item.action);
181
+ }
182
+ }}
183
+ >
184
+ {item.name}
185
+ </Button>
186
+ );
187
+ };
188
+
189
+ if (visibleActions.length <= 3) {
190
+ return visibleActions.map((item) => {
191
+ return renderButton(item);
192
+ });
193
+ }
194
+
195
+ let moreOperate = visibleActions.splice(3);
196
+ const menu = (
197
+ <Menu>
198
+ {moreOperate.map((item: any, index: number) => (
199
+ <Menu.Item className="more-btn-action" key={index}>
200
+ {renderButton(item, 'link')}
201
+ </Menu.Item>
202
+ ))}
203
+ </Menu>
204
+ );
205
+ //按钮操作3个显示更多
206
+ return (
207
+ <div className="detail_btn_wrapper">
208
+ {visibleActions.map((item: any, index: number) => {
209
+ return renderButton(item);
210
+ })}
211
+ <Dropdown style={{ padding: '0px' }} overlay={menu}>
212
+ <Button type="primary">
213
+ <span style={{ margin: '0px' }}>更多</span>
214
+ <img src={moreIcon} />
215
+ </Button>
216
+ </Dropdown>
217
+ </div>
218
+ );
219
+ };
220
+
221
+ console.log('detailActions', actionList);
222
+ return (
223
+ <Anchor
224
+ key={`${pathname}_anchor`}
225
+ offsetTop={window.top == window ? 78 : 0}
226
+ >
227
+ <div>
228
+ <div className={'detail_page_head'}>
229
+ <div
230
+ className={'back_home_img_content'}
231
+ onClick={() => {
232
+ history.goBack();
233
+ }}
234
+ >
235
+ <ArrowLeftOutlined />
236
+ </div>
237
+ <div className={'detail_page_title_box'}>
238
+ <div className={'detail_page_title'}>{pageTitle}</div>
239
+ <Breadcrumb>
240
+ {breadcrumbArr.map((item) => (
241
+ <Breadcrumb.Item
242
+ key={item.path}
243
+ onClick={() => {
244
+ if (
245
+ item.path &&
246
+ !item.children &&
247
+ !pathToRegexp(item.path).test(`${basePath}${pathname}`)
248
+ ) {
249
+ history.push({
250
+ pathname: item.path.replace(basePath, ''),
251
+ });
252
+ }
253
+ }}
254
+ >
255
+ <span
256
+ style={{
257
+ color:
258
+ item.path &&
259
+ pathToRegexp(item.path).test(`${basePath}${pathname}`)
260
+ ? '#000000d9'
261
+ : '',
262
+ }}
263
+ className="bread_name"
264
+ >
265
+ {item.name}
266
+ </span>
267
+ </Breadcrumb.Item>
268
+ ))}
269
+ </Breadcrumb>
270
+ </div>
271
+ <div
272
+ className={'detail_page_btns'}
273
+ style={{ marginRight: '20px', display: 'flex', gap: '8px' }}
274
+ >
275
+ {renderPageActionList(actionList)}
276
+ {
277
+ !donotNeedShowScreenIcon ? ( <a>
278
+ {isFullScreen ? (
279
+ <Tooltip title="取消全屏">
280
+ <img
281
+ onClick={() => {
282
+ ShowFullScreen();
283
+ }}
284
+ width={32}
285
+ src={scanning}
286
+ />
287
+ </Tooltip>
288
+ ) : (
289
+ <Tooltip title="全屏">
290
+ <img
291
+ onClick={() => {
292
+ ShowFullScreen();
293
+ }}
294
+ width={32}
295
+ src={quanping}
296
+ />
297
+ </Tooltip>
298
+ )}
299
+ </a>) : null
300
+ }
301
+ </div>
302
+ </div>
303
+ {
304
+ alertProps && (
305
+ <CommonAlert
306
+ {
307
+ ...alertProps
308
+ }
309
+ />
310
+ )
311
+ }
312
+ </div>
313
+ </Anchor>
314
+ );
315
+ },
316
+ (prevProps, nextProps) => {
317
+ if (
318
+ JSON.stringify(prevProps.actionList) !=
319
+ JSON.stringify(nextProps.actionList)
320
+ ) {
321
+ return false;
322
+ }
323
+ return true;
324
+ },
325
325
  );