@bit-sun/business-component 1.2.4-alpha.1 → 1.2.4
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/.fatherrc.ts +0 -1
- package/.umirc.ts +16 -31
- package/dist/components/Business/SearchSelect/BusinessUtils.d.ts +1 -1
- package/dist/components/Business/SearchSelect/common.d.ts +1 -5
- package/dist/components/Business/SearchSelect/index.d.ts +1 -1
- package/dist/components/Business/SearchSelect/utils.d.ts +1 -2
- package/dist/components/Functional/SearchSelect/index.d.ts +1 -2
- package/dist/index.d.ts +0 -15
- package/dist/index.esm.js +4456 -19407
- package/dist/index.js +4443 -19411
- package/package.json +5 -26
- package/src/components/Business/CommodityEntry/index.md +3 -4
- package/src/components/Business/CommodityEntry/index.tsx +2 -7
- package/src/components/Business/SearchSelect/BusinessUtils.ts +14 -107
- package/src/components/Business/SearchSelect/common.ts +1 -20
- package/src/components/Business/SearchSelect/index.md +30 -60
- package/src/components/Business/SearchSelect/index.tsx +12 -21
- package/src/components/Business/SearchSelect/utils.ts +4 -30
- package/src/components/Functional/DataImport/index.tsx +2 -1
- package/src/components/Functional/DataValidation/index.tsx +1 -1
- package/src/components/Functional/SearchSelect/index.tsx +121 -218
- package/src/index.ts +6 -15
- package/typings.d.ts +0 -3
- package/dist/components/Business/AddSelectBusiness/index.d.ts +0 -1
- package/dist/components/Business/BsLayouts/Components/AllFunc/drawContent.d.ts +0 -4
- package/dist/components/Business/BsLayouts/Components/AllFunc/index.d.ts +0 -4
- package/dist/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.d.ts +0 -4
- package/dist/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/leftTree.d.ts +0 -17
- package/dist/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/rightTree.d.ts +0 -30
- package/dist/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/DrawContent.d.ts +0 -3
- package/dist/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/customMenuHeader.d.ts +0 -2
- package/dist/components/Business/BsLayouts/Components/CustomerMenu/index.d.ts +0 -4
- package/dist/components/Business/BsLayouts/Components/GlobalHeader/index.d.ts +0 -4
- package/dist/components/Business/BsLayouts/Components/RightContent/LoginModal.d.ts +0 -2
- package/dist/components/Business/BsLayouts/Components/RightContent/index.d.ts +0 -8
- package/dist/components/Business/BsLayouts/Components/SearchFunc/index.d.ts +0 -8
- package/dist/components/Business/BsLayouts/index.d.ts +0 -18
- package/dist/components/Business/BsLayouts/service.d.ts +0 -1
- package/dist/components/Business/BsLayouts/utils.d.ts +0 -13
- package/dist/components/Business/BsSulaQueryTable/index.d.ts +0 -2
- package/dist/components/Business/BsSulaQueryTable/setting.d.ts +0 -58
- package/dist/components/Business/BsSulaQueryTable/utils.d.ts +0 -98
- package/dist/components/Business/CommonAlert/index.d.ts +0 -3
- package/dist/components/Business/CommonGuideWrapper/index.d.ts +0 -6
- package/dist/components/Business/DetailPageWrapper/index.d.ts +0 -9
- package/dist/components/Business/DetailPageWrapper/utils.d.ts +0 -8
- package/dist/components/Business/HomePageWrapper/index.d.ts +0 -3
- package/dist/components/Business/StateFlow/index.d.ts +0 -3
- package/dist/components/Business/TreeSearchSelect/index.d.ts +0 -3
- package/dist/components/Business/TreeSearchSelect/utils.d.ts +0 -2
- package/dist/components/Business/columnSettingTable/columnSetting.d.ts +0 -54
- package/dist/components/Business/columnSettingTable/index.d.ts +0 -16
- package/dist/components/Business/columnSettingTable/sulaSettingTable.d.ts +0 -17
- package/dist/components/Business/columnSettingTable/utils.d.ts +0 -8
- package/dist/components/Functional/AddSelect/index.d.ts +0 -3
- package/dist/components/Functional/BillEntry/index.d.ts +0 -4
- package/dist/components/Functional/ExportFunctions/ExportIcon/index.d.ts +0 -12
- package/dist/components/Functional/TreeSearchSelect/index.d.ts +0 -2
- package/dist/utils/enumConfig.d.ts +0 -10
- package/dist/utils/requestUtils.d.ts +0 -1
- package/dist/utils/utils.d.ts +0 -3
- package/lib/assets/arrow_top.png +0 -0
- package/lib/assets/drag.svg +0 -17
- package/lib/assets/exportFail.svg +0 -38
- package/lib/assets/exportProcessing.svg +0 -29
- package/lib/assets/exportSuccess.svg +0 -35
- package/lib/assets/exportlogo.png +0 -0
- package/lib/assets/label_icon_bottom.svg +0 -26
- package/lib/assets/upExport.svg +0 -23
- package/src/assets/32.svg +0 -28
- package/src/assets/addIcon.svg +0 -18
- package/src/assets/allfunc.svg +0 -28
- package/src/assets/arrowRight.svg +0 -25
- package/src/assets/arrow_top.png +0 -0
- package/src/assets/btn-delete.svg +0 -30
- package/src/assets/btn-edit.svg +0 -20
- package/src/assets/btn-more.svg +0 -18
- package/src/assets/btn-submit.svg +0 -20
- package/src/assets/caidan.svg +0 -12
- package/src/assets/close.svg +0 -26
- package/src/assets/closeicon.png +0 -0
- package/src/assets/drag.svg +0 -17
- package/src/assets/exportFail.svg +0 -38
- package/src/assets/exportProcessing.svg +0 -29
- package/src/assets/exportSuccess.svg +0 -35
- package/src/assets/exportlogo.png +0 -0
- package/src/assets/fixed-left-active.svg +0 -12
- package/src/assets/fixed-left.svg +0 -16
- package/src/assets/fixed-right-active.svg +0 -12
- package/src/assets/fixed-right.svg +0 -16
- package/src/assets/guanbi.svg +0 -16
- package/src/assets/icon-quanping.svg +0 -16
- package/src/assets/icon-shezhi.svg +0 -18
- package/src/assets/label_icon_bottom.svg +0 -26
- package/src/assets/list-no-img.svg +0 -22
- package/src/assets/morentouxiang-32.svg +0 -24
- package/src/assets/right.png +0 -0
- package/src/assets/scanning.svg +0 -25
- package/src/assets/upExport.svg +0 -23
- package/src/assets/xinglan-icon-out.png +0 -0
- package/src/components/Business/AddSelectBusiness/index.md +0 -41
- package/src/components/Business/AddSelectBusiness/index.tsx +0 -290
- package/src/components/Business/BsLayouts/Components/AllFunc/drawContent.tsx +0 -112
- package/src/components/Business/BsLayouts/Components/AllFunc/index.less +0 -153
- package/src/components/Business/BsLayouts/Components/AllFunc/index.tsx +0 -70
- package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.less +0 -90
- package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.tsx +0 -38
- package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/leftTree.tsx +0 -243
- package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/rightTree.tsx +0 -385
- package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/DrawContent.tsx +0 -286
- package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/customMenuHeader.tsx +0 -75
- package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/drawContent.less +0 -171
- package/src/components/Business/BsLayouts/Components/CustomerMenu/index.less +0 -65
- package/src/components/Business/BsLayouts/Components/CustomerMenu/index.tsx +0 -154
- package/src/components/Business/BsLayouts/Components/GlobalHeader/index.less +0 -73
- package/src/components/Business/BsLayouts/Components/GlobalHeader/index.tsx +0 -158
- package/src/components/Business/BsLayouts/Components/RightContent/LoginModal.tsx +0 -85
- package/src/components/Business/BsLayouts/Components/RightContent/home.less +0 -218
- package/src/components/Business/BsLayouts/Components/RightContent/index.tsx +0 -156
- package/src/components/Business/BsLayouts/Components/SearchFunc/index.less +0 -161
- package/src/components/Business/BsLayouts/Components/SearchFunc/index.tsx +0 -76
- package/src/components/Business/BsLayouts/index.less +0 -80
- package/src/components/Business/BsLayouts/index.tsx +0 -1465
- package/src/components/Business/BsLayouts/service.ts +0 -11
- package/src/components/Business/BsLayouts/utils.tsx +0 -211
- package/src/components/Business/BsSulaQueryTable/index.less +0 -220
- package/src/components/Business/BsSulaQueryTable/index.tsx +0 -505
- package/src/components/Business/BsSulaQueryTable/setting.tsx +0 -799
- package/src/components/Business/BsSulaQueryTable/utils.less +0 -65
- package/src/components/Business/BsSulaQueryTable/utils.tsx +0 -688
- package/src/components/Business/CommonAlert/index.less +0 -0
- package/src/components/Business/CommonAlert/index.tsx +0 -23
- package/src/components/Business/CommonGuideWrapper/index.less +0 -112
- package/src/components/Business/CommonGuideWrapper/index.md +0 -39
- package/src/components/Business/CommonGuideWrapper/index.tsx +0 -84
- package/src/components/Business/DetailPageWrapper/index.less +0 -80
- package/src/components/Business/DetailPageWrapper/index.tsx +0 -335
- package/src/components/Business/DetailPageWrapper/utils.tsx +0 -101
- package/src/components/Business/HomePageWrapper/index.less +0 -33
- package/src/components/Business/HomePageWrapper/index.md +0 -45
- package/src/components/Business/HomePageWrapper/index.tsx +0 -162
- package/src/components/Business/StateFlow/index.less +0 -131
- package/src/components/Business/StateFlow/index.md +0 -60
- package/src/components/Business/StateFlow/index.tsx +0 -30
- package/src/components/Business/TreeSearchSelect/index.md +0 -126
- package/src/components/Business/TreeSearchSelect/index.tsx +0 -34
- package/src/components/Business/TreeSearchSelect/utils.ts +0 -60
- package/src/components/Business/columnSettingTable/columnSetting.tsx +0 -764
- package/src/components/Business/columnSettingTable/index.less +0 -247
- package/src/components/Business/columnSettingTable/index.md +0 -358
- package/src/components/Business/columnSettingTable/index.tsx +0 -233
- package/src/components/Business/columnSettingTable/sulaSettingTable.tsx +0 -241
- package/src/components/Business/columnSettingTable/utils.tsx +0 -69
- package/src/components/Functional/AddSelect/index.less +0 -367
- package/src/components/Functional/AddSelect/index.md +0 -122
- package/src/components/Functional/AddSelect/index.tsx +0 -962
- package/src/components/Functional/BillEntry/index.less +0 -371
- package/src/components/Functional/BillEntry/index.md +0 -39
- package/src/components/Functional/BillEntry/index.tsx +0 -613
- package/src/components/Functional/ExportFunctions/ExportIcon/index.md +0 -37
- package/src/components/Functional/ExportFunctions/ExportIcon/index.tsx +0 -59
- package/src/components/Functional/TreeSearchSelect/index.md +0 -47
- package/src/components/Functional/TreeSearchSelect/index.tsx +0 -149
- package/src/styles/bsDefault.less +0 -1907
- package/src/utils/enumConfig.ts +0 -10
- package/src/utils/requestUtils.ts +0 -33
- package/src/utils/utils.ts +0 -52
package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/customMenuHeader.tsx
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
import React, {useState} from "react";
|
|
3
|
-
import { Button, Drawer } from "antd";
|
|
4
|
-
import DrawContent from "./DrawContent";
|
|
5
|
-
import caidan from '../../../../../../assets/caidan.svg';
|
|
6
|
-
import guanbi from '../../../../../../assets/guanbi.svg';
|
|
7
|
-
|
|
8
|
-
const CustomerMenuHeader = ({collapsed, handleClose, originRoutes, itemPath}: any) => {
|
|
9
|
-
const [isDrawer, setIsDrawer] = useState(false);
|
|
10
|
-
const onClose = () => {
|
|
11
|
-
setIsDrawer(false)
|
|
12
|
-
}
|
|
13
|
-
return (
|
|
14
|
-
<>
|
|
15
|
-
<div style={{width: '190px' }} className={'header_style'}>
|
|
16
|
-
<div
|
|
17
|
-
style={{
|
|
18
|
-
padding: '0',
|
|
19
|
-
}}
|
|
20
|
-
>
|
|
21
|
-
<div style={{display: 'flex',alignItems: 'center'}}>
|
|
22
|
-
<Button
|
|
23
|
-
// key={Math.random()}
|
|
24
|
-
style={{
|
|
25
|
-
width: '50px',
|
|
26
|
-
height: '50px',
|
|
27
|
-
borderRadius: '0px'
|
|
28
|
-
}}
|
|
29
|
-
type="primary"
|
|
30
|
-
icon={
|
|
31
|
-
!isDrawer ?
|
|
32
|
-
<img style={{marginLeft: '-2px', height: '48px'}} src={caidan} width={48} height={48} /> :
|
|
33
|
-
<img style={{marginLeft: '-2px', height: '48px'}} src={guanbi} width={48} height={48} />
|
|
34
|
-
}
|
|
35
|
-
onClick={(e) => {
|
|
36
|
-
handleClose();
|
|
37
|
-
e.stopPropagation();
|
|
38
|
-
setIsDrawer(!isDrawer)
|
|
39
|
-
}}
|
|
40
|
-
/>
|
|
41
|
-
<div>
|
|
42
|
-
{
|
|
43
|
-
React.createElement('img', {
|
|
44
|
-
src: './xinglan-logo.png',
|
|
45
|
-
style: {
|
|
46
|
-
width: '116px',
|
|
47
|
-
height: '30px',
|
|
48
|
-
marginLeft: '19px',
|
|
49
|
-
|
|
50
|
-
},
|
|
51
|
-
})
|
|
52
|
-
}
|
|
53
|
-
</div>
|
|
54
|
-
</div>
|
|
55
|
-
</div>
|
|
56
|
-
</div>
|
|
57
|
-
<Drawer
|
|
58
|
-
style={{ top: 50, padding: '0' }}
|
|
59
|
-
// title={<span style={{ fontWeight: 'bold', fontSize: 18 }}></span>}
|
|
60
|
-
zIndex={9999}
|
|
61
|
-
destroyOnClose
|
|
62
|
-
headerStyle={{display: 'none'}}
|
|
63
|
-
width={1080}
|
|
64
|
-
className={'global_menu_draw'}
|
|
65
|
-
placement="left"
|
|
66
|
-
onClose={onClose}
|
|
67
|
-
visible={isDrawer}
|
|
68
|
-
>
|
|
69
|
-
<DrawContent itemPath={itemPath} originRoutes={originRoutes} onClose={onClose} />
|
|
70
|
-
</Drawer>
|
|
71
|
-
</>
|
|
72
|
-
)
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
export default CustomerMenuHeader;
|
package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/drawContent.less
DELETED
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
.menu {
|
|
4
|
-
.anticon {
|
|
5
|
-
margin-right: 8px;
|
|
6
|
-
}
|
|
7
|
-
.ant-dropdown-menu-item {
|
|
8
|
-
min-width: 160px;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.right {
|
|
13
|
-
display: flex;
|
|
14
|
-
float: right;
|
|
15
|
-
height: 48px;
|
|
16
|
-
margin-left: auto;
|
|
17
|
-
overflow: hidden;
|
|
18
|
-
.action {
|
|
19
|
-
display: flex;
|
|
20
|
-
align-items: center;
|
|
21
|
-
height: 48px;
|
|
22
|
-
padding: 0 12px;
|
|
23
|
-
cursor: pointer;
|
|
24
|
-
transition: all 0.3s;
|
|
25
|
-
> span {
|
|
26
|
-
vertical-align: middle;
|
|
27
|
-
}
|
|
28
|
-
&:hover {
|
|
29
|
-
background: rgba(0, 0, 0, 0.025);
|
|
30
|
-
}
|
|
31
|
-
.opened {
|
|
32
|
-
background: rgba(0, 0, 0, 0.025);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
.search {
|
|
36
|
-
padding: 0 12px;
|
|
37
|
-
&:hover {
|
|
38
|
-
background: transparent;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
.account {
|
|
42
|
-
.avatar {
|
|
43
|
-
margin-right: 8px;
|
|
44
|
-
color: #1890ff;
|
|
45
|
-
vertical-align: top;
|
|
46
|
-
background: rgba(255, 255, 255, 0.85);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.dark {
|
|
52
|
-
.action {
|
|
53
|
-
&:hover {
|
|
54
|
-
background: #252a3d;
|
|
55
|
-
}
|
|
56
|
-
.opened {
|
|
57
|
-
background: #252a3d;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.global_menu_draw_content {
|
|
63
|
-
display: flex;
|
|
64
|
-
height: 100%;
|
|
65
|
-
.allFunsList {
|
|
66
|
-
margin-bottom: 10px;
|
|
67
|
-
}
|
|
68
|
-
.drawerWarp_left {
|
|
69
|
-
width: 150px;
|
|
70
|
-
height: 100%;
|
|
71
|
-
flex-shrink: 0;
|
|
72
|
-
border-right: 1px solid #f0f0f0;
|
|
73
|
-
|
|
74
|
-
.left_item_title {
|
|
75
|
-
font-family: PingFangSC-Regular;
|
|
76
|
-
font-weight: 400;
|
|
77
|
-
font-size: 12px;
|
|
78
|
-
color: #8c8c8c;
|
|
79
|
-
letter-spacing: 0;
|
|
80
|
-
line-height: 20px;
|
|
81
|
-
overflow: hidden;
|
|
82
|
-
text-overflow: ellipsis;
|
|
83
|
-
white-space: nowrap;
|
|
84
|
-
margin: 20px 0px;
|
|
85
|
-
padding-left: 10px;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.left_item {
|
|
89
|
-
font-family: PingFangSC-Regular;
|
|
90
|
-
font-weight: 400;
|
|
91
|
-
font-size: 14px;
|
|
92
|
-
color: #000000;
|
|
93
|
-
letter-spacing: 0;
|
|
94
|
-
line-height: 20px;
|
|
95
|
-
overflow: hidden;
|
|
96
|
-
text-overflow: ellipsis;
|
|
97
|
-
white-space: nowrap;
|
|
98
|
-
cursor: pointer;
|
|
99
|
-
margin: 20px 0px;
|
|
100
|
-
padding-left: 10px;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.left_item:hover {
|
|
104
|
-
color: #1890ff !important;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
.drawerWarp_right {
|
|
108
|
-
column-count: 4;
|
|
109
|
-
flex-grow: 1;
|
|
110
|
-
padding-left: 10px;
|
|
111
|
-
.ant-list-header {
|
|
112
|
-
padding: 0 0 0 10px !important;
|
|
113
|
-
line-height: 30px;
|
|
114
|
-
border: 0px !important;
|
|
115
|
-
b {
|
|
116
|
-
width: 100%;
|
|
117
|
-
box-sizing: border-box;
|
|
118
|
-
display: inline-block;
|
|
119
|
-
border-bottom: 1px solid #f0f0f0;
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
.ant-list-item {
|
|
123
|
-
padding: 0 0 0 10px !important;
|
|
124
|
-
line-height: 30px !important;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
.ant-drawer-close {
|
|
128
|
-
position: absolute;
|
|
129
|
-
right: 0;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
.search_menu_content {
|
|
133
|
-
flex-grow: 1;
|
|
134
|
-
display: flex;
|
|
135
|
-
flex-wrap: wrap;
|
|
136
|
-
background-color: #ffffff;
|
|
137
|
-
div {
|
|
138
|
-
display: flex;
|
|
139
|
-
align-items: center;
|
|
140
|
-
justify-content: center;
|
|
141
|
-
padding: 8px 20px;
|
|
142
|
-
font-size: 14px;
|
|
143
|
-
font-weight: 400;
|
|
144
|
-
color: #000000;
|
|
145
|
-
background: #f8f9fa;
|
|
146
|
-
border-radius: 100px;
|
|
147
|
-
margin-right: 10px;
|
|
148
|
-
margin-bottom: 10px;
|
|
149
|
-
}
|
|
150
|
-
div:hover {
|
|
151
|
-
cursor: pointer;
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
.allFunsListWarp {
|
|
155
|
-
width: 200px;
|
|
156
|
-
margin-right: 10px;
|
|
157
|
-
border-radius: 4px;
|
|
158
|
-
|
|
159
|
-
break-inside: avoid;
|
|
160
|
-
}
|
|
161
|
-
.choosedStyle {
|
|
162
|
-
.ant-list-header {
|
|
163
|
-
background-color: #005CFF;
|
|
164
|
-
opacity: 0.8;
|
|
165
|
-
b {
|
|
166
|
-
border-bottom: 1px solid #005CFF;
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
.customer_menu_content {
|
|
2
|
-
color: #b1bad4;
|
|
3
|
-
background: #141620;
|
|
4
|
-
display: flex;
|
|
5
|
-
align-items: center;
|
|
6
|
-
justify-content: center;
|
|
7
|
-
font-size: 18px;
|
|
8
|
-
height: 45px;
|
|
9
|
-
border-bottom: 1px solid #3d4047;
|
|
10
|
-
.ant-btn-link {
|
|
11
|
-
color: #b1bad4 !important;
|
|
12
|
-
font-size: 16px;
|
|
13
|
-
height: 36px;
|
|
14
|
-
}
|
|
15
|
-
.ant-drawer-body {
|
|
16
|
-
padding: 10px !important;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.menu_drawer_header_warp {
|
|
21
|
-
.ant-drawer-body {
|
|
22
|
-
background-color: #F8F9FA;
|
|
23
|
-
padding: 10px 0 0 0 !important;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.menu_title_line {
|
|
28
|
-
font-size: 16px;
|
|
29
|
-
font-weight: bold;
|
|
30
|
-
color: #b1bad4;
|
|
31
|
-
text-align: center;
|
|
32
|
-
margin-bottom: 10px;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.menu_item {
|
|
36
|
-
line-height: 30px;
|
|
37
|
-
color: rgba(44, 47, 46);
|
|
38
|
-
overflow: hidden;
|
|
39
|
-
text-overflow: ellipsis;
|
|
40
|
-
white-space: nowrap;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.link_style:hover {
|
|
44
|
-
background-color: #E4E7ED;
|
|
45
|
-
cursor: pointer;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
.header_style {
|
|
51
|
-
height: 50px;
|
|
52
|
-
position: fixed;
|
|
53
|
-
top: 0;
|
|
54
|
-
left: 0;
|
|
55
|
-
padding: 0;
|
|
56
|
-
display: flex;
|
|
57
|
-
align-items: center;
|
|
58
|
-
background-color: #ffffff;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.global_menu_draw {
|
|
62
|
-
.ant-drawer-body {
|
|
63
|
-
padding: 10px !important;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
import React, {
|
|
3
|
-
useState,
|
|
4
|
-
useEffect,
|
|
5
|
-
forwardRef,
|
|
6
|
-
useRef,
|
|
7
|
-
useImperativeHandle
|
|
8
|
-
} from "react";
|
|
9
|
-
import { Button, Drawer, Modal, Menu } from 'antd';
|
|
10
|
-
import addIcon from '../../../../../assets/addIcon.svg';
|
|
11
|
-
import MenuSetting from "./MenuSetting";
|
|
12
|
-
import { history } from "umi";
|
|
13
|
-
import './index.less'
|
|
14
|
-
|
|
15
|
-
const CustomerMenu = forwardRef(({isCollapse, handleClose, actionRef, originRoutes, itemPath}: any, ref) => {
|
|
16
|
-
const menuSettingRef = useRef(null);
|
|
17
|
-
const menuData = JSON.parse(localStorage.getItem(`customerMenu_${itemPath}_front`) || '[]');
|
|
18
|
-
|
|
19
|
-
const [isDrawer, setIsDrawer]: any = useState(false);
|
|
20
|
-
useImperativeHandle(ref, () => ({
|
|
21
|
-
close: () => {
|
|
22
|
-
setIsDrawer(false);
|
|
23
|
-
},
|
|
24
|
-
}));
|
|
25
|
-
|
|
26
|
-
useEffect(() => {
|
|
27
|
-
if (isCollapse) {
|
|
28
|
-
setIsDrawer(false);
|
|
29
|
-
}
|
|
30
|
-
}, [isCollapse]);
|
|
31
|
-
|
|
32
|
-
const onClose = () => {
|
|
33
|
-
setIsDrawer(!isDrawer);
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
const showDrawer = (e) => {
|
|
37
|
-
if (isCollapse) {
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
40
|
-
handleClose();
|
|
41
|
-
e.stopPropagation();
|
|
42
|
-
setIsDrawer(!isDrawer);
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
const handleOk = () => {
|
|
47
|
-
menuSettingRef?.current?.saveMenuData();
|
|
48
|
-
settingModalFn({
|
|
49
|
-
...settingModal,
|
|
50
|
-
visible: false,
|
|
51
|
-
});
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
const handleCancel = () => {
|
|
55
|
-
settingModalFn({
|
|
56
|
-
...settingModal,
|
|
57
|
-
visible: false,
|
|
58
|
-
});
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
const [settingModal, settingModalFn] = useState({
|
|
62
|
-
visible: false,
|
|
63
|
-
onOk: handleOk,
|
|
64
|
-
onCancel: handleCancel,
|
|
65
|
-
})
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
const handleMenuClick = (item: any) => {
|
|
69
|
-
if (item.children || !item.component) return;
|
|
70
|
-
setIsDrawer(!isDrawer);
|
|
71
|
-
history.push({
|
|
72
|
-
pathname: item.path
|
|
73
|
-
})
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
const getMenuDom = (menuData) => {
|
|
77
|
-
return menuData.map(item => (
|
|
78
|
-
<div style={{paddingLeft: '10px'}}>
|
|
79
|
-
<div onClick={()=> {handleMenuClick(item)}} className={`${'menu_item'} ${item.children || !item.component ? '' : 'link_style'}`}
|
|
80
|
-
style={{fontWeight: item.children || !item.component ? 'bolder' : '400', paddingLeft: '4px'}}>
|
|
81
|
-
{item.name}
|
|
82
|
-
</div>
|
|
83
|
-
{
|
|
84
|
-
!!item.children && !!item.children.length && getMenuDom(item.children)
|
|
85
|
-
}
|
|
86
|
-
</div>
|
|
87
|
-
))
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
return (
|
|
91
|
-
<div className={'customer_menu_content'}>
|
|
92
|
-
<div
|
|
93
|
-
style={{cursor: 'pointer'}}
|
|
94
|
-
onClick={(e) => {
|
|
95
|
-
handleClose();
|
|
96
|
-
settingModalFn({
|
|
97
|
-
...settingModal,
|
|
98
|
-
visible: true,
|
|
99
|
-
});
|
|
100
|
-
}}
|
|
101
|
-
>
|
|
102
|
-
<img style={{marginTop: '-3px'}} width={24} src={addIcon} />
|
|
103
|
-
<Button
|
|
104
|
-
type='link'
|
|
105
|
-
style={{paddingLeft: '5px'}}
|
|
106
|
-
>
|
|
107
|
-
自定义菜单
|
|
108
|
-
</Button>
|
|
109
|
-
</div>
|
|
110
|
-
{!isCollapse && (
|
|
111
|
-
<Drawer
|
|
112
|
-
style={{ left: isDrawer ? 140 : 0 }}
|
|
113
|
-
title={
|
|
114
|
-
<span style={{ fontWeight: 'bold', fontSize: 18 }}>自定义菜单</span>
|
|
115
|
-
}
|
|
116
|
-
zIndex={19}
|
|
117
|
-
headerStyle={{display: 'none'}}
|
|
118
|
-
width={200}
|
|
119
|
-
className={'menu_drawer_header_warp'}
|
|
120
|
-
placement="left"
|
|
121
|
-
onClose={onClose}
|
|
122
|
-
visible={isDrawer}
|
|
123
|
-
>
|
|
124
|
-
<div>
|
|
125
|
-
<p className={'menu_title_line'}>自定义菜单</p>
|
|
126
|
-
{
|
|
127
|
-
getMenuDom(menuData)
|
|
128
|
-
}
|
|
129
|
-
</div>
|
|
130
|
-
</Drawer>
|
|
131
|
-
)}
|
|
132
|
-
<Modal
|
|
133
|
-
title={
|
|
134
|
-
<span style={{ fontWeight: '600', fontSize: 18}}>自定义菜单设置</span>
|
|
135
|
-
}
|
|
136
|
-
zIndex={999}
|
|
137
|
-
width={800}
|
|
138
|
-
destroyOnClose
|
|
139
|
-
{
|
|
140
|
-
...settingModal
|
|
141
|
-
}
|
|
142
|
-
>
|
|
143
|
-
<MenuSetting
|
|
144
|
-
originRoutes={originRoutes}
|
|
145
|
-
actionRef={actionRef}
|
|
146
|
-
ref={menuSettingRef}
|
|
147
|
-
itemPath={itemPath}
|
|
148
|
-
/>
|
|
149
|
-
</Modal>
|
|
150
|
-
</div>
|
|
151
|
-
)
|
|
152
|
-
})
|
|
153
|
-
|
|
154
|
-
export default CustomerMenu;
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
.headerContent {
|
|
2
|
-
position: relative;
|
|
3
|
-
display: flex;
|
|
4
|
-
align-items: center;
|
|
5
|
-
height: 100%;
|
|
6
|
-
background: #F3F3F3;
|
|
7
|
-
box-shadow: 0 1px 4px #EBECEC;
|
|
8
|
-
padding-left: 47px;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.navigationBtn {
|
|
12
|
-
display: inline-block;
|
|
13
|
-
height: 32px;
|
|
14
|
-
line-height: 32px;
|
|
15
|
-
border-radius: 5px;
|
|
16
|
-
margin-right: 15px;
|
|
17
|
-
padding: 0 10px;
|
|
18
|
-
background-color: #F4F6F7;
|
|
19
|
-
cursor: pointer;
|
|
20
|
-
color: rgba(0, 0, 0, 0.5);
|
|
21
|
-
}
|
|
22
|
-
.navigationBtn:hover {
|
|
23
|
-
border-color: #297eff;
|
|
24
|
-
border-right-width: 1px;
|
|
25
|
-
z-index: 1;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.headerContent {
|
|
29
|
-
background-color: #ffffff;
|
|
30
|
-
.ant-input-affix-wrapper,.ant-input {
|
|
31
|
-
// background-color: #F4F5F7 !important;
|
|
32
|
-
color: rgba(0, 0, 0, 0.5);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.searchPanel {
|
|
37
|
-
position: absolute;
|
|
38
|
-
top: 36;
|
|
39
|
-
left: 0;
|
|
40
|
-
min-width: 268px;
|
|
41
|
-
height: 220px;
|
|
42
|
-
box-shadow: 0 1px 4px #EBECEC;
|
|
43
|
-
background-color: #FFFFFF;
|
|
44
|
-
overflow-y: auto;
|
|
45
|
-
box-shadow: 0px 2px 4px 0px rgba(185,185,185, 0.5);
|
|
46
|
-
padding: 0 10px;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.searchTitle {
|
|
50
|
-
margin-top: 20px;
|
|
51
|
-
font-size: 14px;
|
|
52
|
-
font-weight: 400;
|
|
53
|
-
text-align: left;
|
|
54
|
-
color: #8c8c8c;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.themeColor {
|
|
58
|
-
color: #005cff;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.itemPath {
|
|
62
|
-
height: 30px;
|
|
63
|
-
line-height: 30px;
|
|
64
|
-
width: 100%;
|
|
65
|
-
cursor: pointer;
|
|
66
|
-
overflow: hidden;
|
|
67
|
-
white-space: nowrap;
|
|
68
|
-
text-overflow: ellipsis;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.itemPath:hover {
|
|
72
|
-
background-color: #E6EEFF;
|
|
73
|
-
}
|
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
import React, { useState } from "react";
|
|
3
|
-
import RightContent from '../RightContent';
|
|
4
|
-
import { Input } from 'antd';
|
|
5
|
-
import { SearchOutlined } from '@ant-design/icons';
|
|
6
|
-
import { debounce, cloneDeep } from 'lodash';
|
|
7
|
-
import { formatMessage, history } from 'umi';
|
|
8
|
-
import ENUM from '@/utils/enumConfig';
|
|
9
|
-
import './index.less';
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
export const judgeIsEmpty = (value: any) => {
|
|
13
|
-
if (value == null || value == undefined || String(value).trim() == '') {
|
|
14
|
-
return true;
|
|
15
|
-
}
|
|
16
|
-
return false;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
const GlobalHeaderCom = (props: any) => {
|
|
20
|
-
const { route: {routes=[]}} = props;
|
|
21
|
-
const [keyWord, setKeyWord] = useState('');
|
|
22
|
-
const [routeList, setroutesData] = useState<any[]>([]);
|
|
23
|
-
|
|
24
|
-
const getFullPathName = (nameId:string) => {
|
|
25
|
-
const nameIdArr = nameId.split('.');
|
|
26
|
-
let nameStr = '';
|
|
27
|
-
for (let i = 0; i < nameIdArr.length; i++) {
|
|
28
|
-
let itemId = nameIdArr.slice(0, i+1).join('.');
|
|
29
|
-
nameStr += `${i === 0 ? '': '-'}${formatMessage({ id: `menu.${itemId}` })}`;
|
|
30
|
-
}
|
|
31
|
-
return nameStr;
|
|
32
|
-
}
|
|
33
|
-
const initRoute = (router: any, name?: any) => {
|
|
34
|
-
const resultList: any = [];
|
|
35
|
-
const newRouter = cloneDeep(router);
|
|
36
|
-
const btnAuth = JSON.parse(localStorage.getItem(ENUM.BROWSER_CACHE.MAIN_AUTH_CODES) || '[]');
|
|
37
|
-
const deep = (router: any) => {
|
|
38
|
-
if (router && Array.isArray(router)) {
|
|
39
|
-
router.forEach((item) => {
|
|
40
|
-
if (item.routes && Array.isArray(item.routes)) {
|
|
41
|
-
item.routes.forEach((d: any) => {
|
|
42
|
-
if (!d.nameEdit) {
|
|
43
|
-
d.name = item.name + '.' + d.name;
|
|
44
|
-
d.nameEdit = true;
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
deep(item.routes);
|
|
48
|
-
} else if (
|
|
49
|
-
!item.hideInMenu &&
|
|
50
|
-
(name
|
|
51
|
-
? formatMessage({ id: `menu.${item.name}` }).indexOf(name) !== -1
|
|
52
|
-
: true)
|
|
53
|
-
&& btnAuth.find((d: any) => d === item.code)
|
|
54
|
-
) {
|
|
55
|
-
resultList.push({
|
|
56
|
-
...item,
|
|
57
|
-
fullPathName: getFullPathName(item.name),
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
} else if (
|
|
62
|
-
(name ? router.name.indexOf(name) !== -1 : true)
|
|
63
|
-
// && btnAuth.find((d: any) => d.code === router.code)
|
|
64
|
-
) {
|
|
65
|
-
resultList.push({
|
|
66
|
-
...router,
|
|
67
|
-
name: formatMessage({ id: `menu.${router.name}` }),
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
deep(newRouter);
|
|
72
|
-
setroutesData([...resultList]);
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
const renderLineStyl = (name: string) => {
|
|
76
|
-
let newName = name.split('-').join(' > ');
|
|
77
|
-
const index = newName.lastIndexOf(keyWord);
|
|
78
|
-
if (index > -1) {
|
|
79
|
-
const beforeStr = newName.substr(0, index);
|
|
80
|
-
const afterStr = newName.substr(index + keyWord.length);
|
|
81
|
-
return (
|
|
82
|
-
<>
|
|
83
|
-
<span>{beforeStr}</span>
|
|
84
|
-
<span style={{color: '#1890ff'}}>{keyWord}</span>
|
|
85
|
-
<span>{afterStr}</span>
|
|
86
|
-
</>
|
|
87
|
-
)
|
|
88
|
-
}
|
|
89
|
-
return newName
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
return (
|
|
93
|
-
<div style={{paddingLeft: props.collapsed ? '135px': '45px'}} className={'headerContent'}>
|
|
94
|
-
<div style={{flex: '1 1 0%', padding: '0 15px 0', marginLeft: '15px', display: 'flex', borderLeft: '1px solid #f0f0f0'}}>
|
|
95
|
-
{/* <div
|
|
96
|
-
className={'navigationBtn'}
|
|
97
|
-
onClick={() => {
|
|
98
|
-
message.warning('当前功能暂不支持。');
|
|
99
|
-
}}
|
|
100
|
-
>
|
|
101
|
-
<ApartmentOutlined />
|
|
102
|
-
|
|
103
|
-
流程导航
|
|
104
|
-
</div> */}
|
|
105
|
-
<div style={{position: 'relative'}}>
|
|
106
|
-
<Input
|
|
107
|
-
style={{width: '268px', height: '32px', borderRadius:'4px'}}
|
|
108
|
-
placeholder="搜索菜单"
|
|
109
|
-
allowClear
|
|
110
|
-
onFocus= {(e) => {
|
|
111
|
-
setKeyWord(e?.target?.value)
|
|
112
|
-
initRoute(routes, e?.target?.value)
|
|
113
|
-
}}
|
|
114
|
-
onBlur={() => {
|
|
115
|
-
setTimeout(() => {
|
|
116
|
-
setKeyWord('')
|
|
117
|
-
}, 600)
|
|
118
|
-
}}
|
|
119
|
-
|
|
120
|
-
prefix={<SearchOutlined />}
|
|
121
|
-
onChange={debounce((e: any) => {
|
|
122
|
-
setKeyWord(e?.target?.value)
|
|
123
|
-
initRoute(routes, e?.target?.value)
|
|
124
|
-
}, 600)}
|
|
125
|
-
/>
|
|
126
|
-
<div style={{display: judgeIsEmpty(keyWord) ? 'none' : 'block'}} className={'searchPanel'}>
|
|
127
|
-
<p className={'searchTitle'}>
|
|
128
|
-
共搜到{' '}
|
|
129
|
-
<span className={'themeColor'}>
|
|
130
|
-
{routeList.length || 0}
|
|
131
|
-
</span>{' '}
|
|
132
|
-
条结果{' '}
|
|
133
|
-
</p>
|
|
134
|
-
<div style={{marginTop: '10px'}}>
|
|
135
|
-
{
|
|
136
|
-
routeList.map(item => (
|
|
137
|
-
<div
|
|
138
|
-
className={'itemPath'}
|
|
139
|
-
onClick={() => {
|
|
140
|
-
history.push({
|
|
141
|
-
pathname: item.path
|
|
142
|
-
})
|
|
143
|
-
// setKeyWord('')
|
|
144
|
-
}}
|
|
145
|
-
title={item.fullPathName}
|
|
146
|
-
>{renderLineStyl(item.fullPathName)}</div>
|
|
147
|
-
))
|
|
148
|
-
}
|
|
149
|
-
</div>
|
|
150
|
-
</div>
|
|
151
|
-
</div>
|
|
152
|
-
</div>
|
|
153
|
-
<RightContent />
|
|
154
|
-
</div>
|
|
155
|
-
)
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
export default GlobalHeaderCom;
|