@bit-sun/business-component 1.2.3 → 1.2.4-alpha.1
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 +1 -0
- package/.umirc.ts +31 -16
- package/dist/components/Business/AddSelectBusiness/index.d.ts +1 -0
- package/dist/components/Business/BsLayouts/Components/AllFunc/drawContent.d.ts +4 -0
- package/dist/components/Business/BsLayouts/Components/AllFunc/index.d.ts +4 -0
- package/dist/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.d.ts +4 -0
- package/dist/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/leftTree.d.ts +17 -0
- package/dist/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/rightTree.d.ts +30 -0
- package/dist/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/DrawContent.d.ts +3 -0
- package/dist/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/customMenuHeader.d.ts +2 -0
- package/dist/components/Business/BsLayouts/Components/CustomerMenu/index.d.ts +4 -0
- package/dist/components/Business/BsLayouts/Components/GlobalHeader/index.d.ts +4 -0
- package/dist/components/Business/BsLayouts/Components/RightContent/LoginModal.d.ts +2 -0
- package/dist/components/Business/BsLayouts/Components/RightContent/index.d.ts +8 -0
- package/dist/components/Business/BsLayouts/Components/SearchFunc/index.d.ts +8 -0
- package/dist/components/Business/BsLayouts/index.d.ts +18 -0
- package/dist/components/Business/BsLayouts/service.d.ts +1 -0
- package/dist/components/Business/BsLayouts/utils.d.ts +13 -0
- package/dist/components/Business/BsSulaQueryTable/index.d.ts +2 -0
- package/dist/components/Business/BsSulaQueryTable/setting.d.ts +58 -0
- package/dist/components/Business/BsSulaQueryTable/utils.d.ts +98 -0
- package/dist/components/Business/CommonAlert/index.d.ts +3 -0
- package/dist/components/Business/CommonGuideWrapper/index.d.ts +6 -0
- package/dist/components/Business/DetailPageWrapper/index.d.ts +9 -0
- package/dist/components/Business/DetailPageWrapper/utils.d.ts +8 -0
- package/dist/components/Business/HomePageWrapper/index.d.ts +3 -0
- package/dist/components/Business/SearchSelect/BusinessUtils.d.ts +1 -1
- package/dist/components/Business/SearchSelect/common.d.ts +5 -1
- package/dist/components/Business/SearchSelect/index.d.ts +1 -1
- package/dist/components/Business/SearchSelect/utils.d.ts +2 -1
- package/dist/components/Business/StateFlow/index.d.ts +3 -0
- package/dist/components/Business/TreeSearchSelect/index.d.ts +3 -0
- package/dist/components/Business/TreeSearchSelect/utils.d.ts +2 -0
- package/dist/components/Business/columnSettingTable/columnSetting.d.ts +54 -0
- package/dist/components/Business/columnSettingTable/index.d.ts +16 -0
- package/dist/components/Business/columnSettingTable/sulaSettingTable.d.ts +17 -0
- package/dist/components/Business/columnSettingTable/utils.d.ts +8 -0
- package/dist/components/Functional/AddSelect/index.d.ts +3 -0
- package/dist/components/Functional/BillEntry/index.d.ts +4 -0
- package/dist/components/Functional/ExportFunctions/ExportIcon/index.d.ts +12 -0
- package/dist/components/Functional/SearchSelect/index.d.ts +2 -1
- package/dist/components/Functional/TreeSearchSelect/index.d.ts +2 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.esm.js +19420 -4457
- package/dist/index.js +19451 -4471
- package/dist/utils/CheckOneUser/index.d.ts +1 -1
- package/dist/utils/enumConfig.d.ts +10 -0
- package/dist/utils/requestUtils.d.ts +1 -0
- package/dist/utils/utils.d.ts +3 -0
- package/lib/assets/arrow_top.png +0 -0
- package/lib/assets/drag.svg +17 -0
- package/lib/assets/exportFail.svg +38 -0
- package/lib/assets/exportProcessing.svg +29 -0
- package/lib/assets/exportSuccess.svg +35 -0
- package/lib/assets/exportlogo.png +0 -0
- package/lib/assets/label_icon_bottom.svg +26 -0
- package/lib/assets/upExport.svg +23 -0
- package/package.json +26 -5
- package/src/assets/32.svg +28 -0
- package/src/assets/addIcon.svg +18 -0
- package/src/assets/allfunc.svg +28 -0
- package/src/assets/arrowRight.svg +25 -0
- package/src/assets/arrow_top.png +0 -0
- package/src/assets/btn-delete.svg +30 -0
- package/src/assets/btn-edit.svg +20 -0
- package/src/assets/btn-more.svg +18 -0
- package/src/assets/btn-submit.svg +20 -0
- package/src/assets/caidan.svg +12 -0
- package/src/assets/close.svg +26 -0
- package/src/assets/closeicon.png +0 -0
- package/src/assets/drag.svg +17 -0
- package/src/assets/exportFail.svg +38 -0
- package/src/assets/exportProcessing.svg +29 -0
- package/src/assets/exportSuccess.svg +35 -0
- package/src/assets/exportlogo.png +0 -0
- package/src/assets/fixed-left-active.svg +12 -0
- package/src/assets/fixed-left.svg +16 -0
- package/src/assets/fixed-right-active.svg +12 -0
- package/src/assets/fixed-right.svg +16 -0
- package/src/assets/guanbi.svg +16 -0
- package/src/assets/icon-quanping.svg +16 -0
- package/src/assets/icon-shezhi.svg +18 -0
- package/src/assets/label_icon_bottom.svg +26 -0
- package/src/assets/list-no-img.svg +22 -0
- package/src/assets/morentouxiang-32.svg +24 -0
- package/src/assets/right.png +0 -0
- package/src/assets/scanning.svg +25 -0
- package/src/assets/upExport.svg +23 -0
- package/src/assets/xinglan-icon-out.png +0 -0
- package/src/components/Business/AddSelectBusiness/index.md +41 -0
- package/src/components/Business/AddSelectBusiness/index.tsx +290 -0
- package/src/components/Business/BsLayouts/Components/AllFunc/drawContent.tsx +112 -0
- package/src/components/Business/BsLayouts/Components/AllFunc/index.less +153 -0
- package/src/components/Business/BsLayouts/Components/AllFunc/index.tsx +70 -0
- package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.less +90 -0
- package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.tsx +38 -0
- package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/leftTree.tsx +243 -0
- package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/rightTree.tsx +385 -0
- package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/DrawContent.tsx +286 -0
- package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/customMenuHeader.tsx +75 -0
- package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/drawContent.less +171 -0
- package/src/components/Business/BsLayouts/Components/CustomerMenu/index.less +65 -0
- package/src/components/Business/BsLayouts/Components/CustomerMenu/index.tsx +154 -0
- package/src/components/Business/BsLayouts/Components/GlobalHeader/index.less +73 -0
- package/src/components/Business/BsLayouts/Components/GlobalHeader/index.tsx +158 -0
- package/src/components/Business/BsLayouts/Components/RightContent/LoginModal.tsx +85 -0
- package/src/components/Business/BsLayouts/Components/RightContent/home.less +218 -0
- package/src/components/Business/BsLayouts/Components/RightContent/index.tsx +156 -0
- package/src/components/Business/BsLayouts/Components/SearchFunc/index.less +161 -0
- package/src/components/Business/BsLayouts/Components/SearchFunc/index.tsx +76 -0
- package/src/components/Business/BsLayouts/index.less +80 -0
- package/src/components/Business/BsLayouts/index.tsx +1465 -0
- package/src/components/Business/BsLayouts/service.ts +11 -0
- package/src/components/Business/BsLayouts/utils.tsx +211 -0
- package/src/components/Business/BsSulaQueryTable/index.less +220 -0
- package/src/components/Business/BsSulaQueryTable/index.tsx +505 -0
- package/src/components/Business/BsSulaQueryTable/setting.tsx +799 -0
- package/src/components/Business/BsSulaQueryTable/utils.less +65 -0
- package/src/components/Business/BsSulaQueryTable/utils.tsx +688 -0
- package/src/components/Business/CommodityEntry/index.md +4 -3
- package/src/components/Business/CommodityEntry/index.tsx +7 -2
- package/src/components/Business/CommonAlert/index.less +0 -0
- package/src/components/Business/CommonAlert/index.tsx +23 -0
- package/src/components/Business/CommonGuideWrapper/index.less +112 -0
- package/src/components/Business/CommonGuideWrapper/index.md +39 -0
- package/src/components/Business/CommonGuideWrapper/index.tsx +84 -0
- package/src/components/Business/DetailPageWrapper/index.less +80 -0
- package/src/components/Business/DetailPageWrapper/index.tsx +335 -0
- package/src/components/Business/DetailPageWrapper/utils.tsx +101 -0
- package/src/components/Business/HomePageWrapper/index.less +33 -0
- package/src/components/Business/HomePageWrapper/index.md +45 -0
- package/src/components/Business/HomePageWrapper/index.tsx +162 -0
- package/src/components/Business/SearchSelect/BusinessUtils.ts +107 -14
- package/src/components/Business/SearchSelect/common.ts +20 -1
- package/src/components/Business/SearchSelect/index.md +60 -30
- package/src/components/Business/SearchSelect/index.tsx +21 -12
- package/src/components/Business/SearchSelect/utils.ts +30 -4
- package/src/components/Business/StateFlow/index.less +131 -0
- package/src/components/Business/StateFlow/index.md +60 -0
- package/src/components/Business/StateFlow/index.tsx +30 -0
- package/src/components/Business/TreeSearchSelect/index.md +126 -0
- package/src/components/Business/TreeSearchSelect/index.tsx +34 -0
- package/src/components/Business/TreeSearchSelect/utils.ts +60 -0
- package/src/components/Business/columnSettingTable/columnSetting.tsx +764 -0
- package/src/components/Business/columnSettingTable/index.less +247 -0
- package/src/components/Business/columnSettingTable/index.md +358 -0
- package/src/components/Business/columnSettingTable/index.tsx +233 -0
- package/src/components/Business/columnSettingTable/sulaSettingTable.tsx +241 -0
- package/src/components/Business/columnSettingTable/utils.tsx +69 -0
- package/src/components/Functional/AddSelect/index.less +367 -0
- package/src/components/Functional/AddSelect/index.md +122 -0
- package/src/components/Functional/AddSelect/index.tsx +962 -0
- package/src/components/Functional/BillEntry/index.less +371 -0
- package/src/components/Functional/BillEntry/index.md +39 -0
- package/src/components/Functional/BillEntry/index.tsx +613 -0
- package/src/components/Functional/DataImport/index.tsx +7 -2
- package/src/components/Functional/DataValidation/index.md +1 -0
- package/src/components/Functional/DataValidation/index.tsx +17 -2
- package/src/components/Functional/ExportFunctions/ExportIcon/index.md +37 -0
- package/src/components/Functional/ExportFunctions/ExportIcon/index.tsx +59 -0
- package/src/components/Functional/SearchSelect/index.tsx +218 -121
- package/src/components/Functional/TreeSearchSelect/index.md +47 -0
- package/src/components/Functional/TreeSearchSelect/index.tsx +149 -0
- package/src/index.ts +15 -6
- package/src/styles/bsDefault.less +1907 -0
- package/src/utils/enumConfig.ts +10 -0
- package/src/utils/requestUtils.ts +33 -0
- package/src/utils/utils.ts +52 -0
- package/typings.d.ts +3 -0
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import React, { useEffect, useState, useLayoutEffect, useImperativeHandle } from 'react';
|
|
3
|
+
import { List, Tooltip, Input, Button } from 'antd';
|
|
4
|
+
import { Link, formatMessage, history } from 'umi';
|
|
5
|
+
import classNames from 'classnames';
|
|
6
|
+
import { debounce } from 'lodash';
|
|
7
|
+
import {
|
|
8
|
+
setMenuTreeData,
|
|
9
|
+
searchMenuData,
|
|
10
|
+
} from '../../../utils';
|
|
11
|
+
import { memoizeOneFormatter } from '@/utils/utils';
|
|
12
|
+
import { SearchOutlined, CaretDownOutlined } from '@ant-design/icons';
|
|
13
|
+
import './drawContent.less';
|
|
14
|
+
import right from '../../../../../../assets/right.png';
|
|
15
|
+
import closeicon from '../../../../../../assets/closeicon.png';
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
const DrawContent = ({onClose, originRoutes=[], itemPath}: any) => {
|
|
19
|
+
const [homepageData, sethomepageData]: any[] = useState([]);
|
|
20
|
+
const [routesData, setroutesData]: any[] = useState([]);
|
|
21
|
+
const [authorityMenu, setAuthorityMenu]: any[] = useState([]);
|
|
22
|
+
|
|
23
|
+
const [currentOneLevel, setCurrentOneLevel] = useState<string>('');
|
|
24
|
+
const [SearhData, setSearchMenuData] = useState<any[]>([]);
|
|
25
|
+
const [rightMenuHeight, setHeight] = useState<number>(600);
|
|
26
|
+
const [drawHeight, setDrawHeight] = useState<number>(900);
|
|
27
|
+
|
|
28
|
+
const [moreBtnShow, setMoreBtnShow] = useState(false);
|
|
29
|
+
const [showScroll, setShowScroll] = useState(false);
|
|
30
|
+
|
|
31
|
+
useEffect(() => {
|
|
32
|
+
getMenuContentHeight();
|
|
33
|
+
const homepageDataList: any[] = []; //不含子集的菜单
|
|
34
|
+
const routesDataList: any[] = []; //含子集的菜单
|
|
35
|
+
const authorityMenuList: any[] = []; //当前权限可以看到的所有菜单
|
|
36
|
+
|
|
37
|
+
const showMenu = originRoutes.find(item => item.path === '/')?.routes || [];
|
|
38
|
+
let routesData = JSON.parse(JSON.stringify(memoizeOneFormatter(showMenu, '')));
|
|
39
|
+
setMenuTreeData(routesData);
|
|
40
|
+
|
|
41
|
+
routesData.forEach(item => {
|
|
42
|
+
if (item.children) {
|
|
43
|
+
routesDataList.push(item);
|
|
44
|
+
authorityMenuList.push(item)
|
|
45
|
+
} else {
|
|
46
|
+
homepageDataList.push(item);
|
|
47
|
+
authorityMenuList.push(item)
|
|
48
|
+
}
|
|
49
|
+
})
|
|
50
|
+
sethomepageData(homepageDataList)
|
|
51
|
+
setroutesData(routesDataList)
|
|
52
|
+
setAuthorityMenu(authorityMenuList)
|
|
53
|
+
|
|
54
|
+
window.onresize = () => {
|
|
55
|
+
getMenuContentHeight();
|
|
56
|
+
};
|
|
57
|
+
}, []);
|
|
58
|
+
|
|
59
|
+
useLayoutEffect(() => {
|
|
60
|
+
setTimeout(() => {
|
|
61
|
+
let drawContentHeight=document.getElementById("drawContent").scrollHeight;
|
|
62
|
+
if (drawContentHeight > rightMenuHeight) {
|
|
63
|
+
setMoreBtnShow(true);
|
|
64
|
+
}
|
|
65
|
+
}, 0)
|
|
66
|
+
}, [])
|
|
67
|
+
|
|
68
|
+
const getMenuContentHeight = () => {
|
|
69
|
+
let clientHeight = document.body.clientHeight;
|
|
70
|
+
setHeight(clientHeight - 190);
|
|
71
|
+
setDrawHeight(clientHeight - 70)
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
const renderChildItem = (child) => {
|
|
76
|
+
if (!child.hideInMenu && child.children) {
|
|
77
|
+
return (
|
|
78
|
+
<>
|
|
79
|
+
<List.Item style={{ color: '#000', fontWeight: 'bold' }}>
|
|
80
|
+
{formatMessage({ id: `${child.locale}` })}
|
|
81
|
+
</List.Item>
|
|
82
|
+
{child.children.map((menuItem: any) => {
|
|
83
|
+
return renderChildItem(menuItem)
|
|
84
|
+
})}
|
|
85
|
+
</>
|
|
86
|
+
);
|
|
87
|
+
} else if (!child.hideInMenu && child.path) {
|
|
88
|
+
return (
|
|
89
|
+
<List.Item style={{fontSize: '12px'}} className="allFuncOnMouserover">
|
|
90
|
+
<Link to={child.path} onClick={(e) => {onMenuClick(e, child);}}>
|
|
91
|
+
<Tooltip
|
|
92
|
+
title={formatMessage({ id: `${child.locale}` })}
|
|
93
|
+
>
|
|
94
|
+
{formatMessage({ id: `${child.locale}` }).length > 10
|
|
95
|
+
? `${formatMessage({
|
|
96
|
+
id: `${child.name}`,
|
|
97
|
+
}).slice(0, 10)}...`
|
|
98
|
+
: formatMessage({ id: `${child.locale}` })}
|
|
99
|
+
</Tooltip>
|
|
100
|
+
<img className="allFuncOnMouseroverImg" src={right}></img>
|
|
101
|
+
</Link>
|
|
102
|
+
</List.Item>
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
const onMenuClick = (e, item) => {
|
|
108
|
+
e.stopPropagation();
|
|
109
|
+
e.preventDefault();
|
|
110
|
+
let searchHistory = JSON.parse(localStorage.getItem(`${itemPath}_search_history`) || '[]');
|
|
111
|
+
if (searchHistory.every(hisItem => item.path !== hisItem.padth)) {
|
|
112
|
+
if (searchHistory.length < 10 ) {
|
|
113
|
+
searchHistory.push({
|
|
114
|
+
name: item.name,
|
|
115
|
+
path: item.path
|
|
116
|
+
})
|
|
117
|
+
} else {
|
|
118
|
+
searchHistory.pop();
|
|
119
|
+
searchHistory.unshift({
|
|
120
|
+
name: item.name,
|
|
121
|
+
path: item.path
|
|
122
|
+
})
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
localStorage.setItem(`${itemPath}_search_history`, JSON.stringify(searchHistory))
|
|
126
|
+
history.push({
|
|
127
|
+
pathname: item.path
|
|
128
|
+
})
|
|
129
|
+
onClose();
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
let searchHistoryList = JSON.parse(localStorage.getItem(`${itemPath}_search_history`) || '[]');
|
|
134
|
+
return (
|
|
135
|
+
<div style={{height: `${drawHeight}px`}} className={'global_menu_draw_content'}>
|
|
136
|
+
<div className={'drawerWarp_left'}>
|
|
137
|
+
<div className={'left_item_title'} >一级菜单</div>
|
|
138
|
+
{
|
|
139
|
+
authorityMenu.map(item => (
|
|
140
|
+
<div
|
|
141
|
+
className={'left_item'}
|
|
142
|
+
style={{
|
|
143
|
+
borderLeft: currentOneLevel === item.path ? '2px solid #1890ff' : 'none',
|
|
144
|
+
color: currentOneLevel === item.path ? '#1890ff' : '#000000'
|
|
145
|
+
}}
|
|
146
|
+
onClick={(e) => {
|
|
147
|
+
e.stopPropagation();
|
|
148
|
+
e.preventDefault()
|
|
149
|
+
if (item.component) {
|
|
150
|
+
history.push({
|
|
151
|
+
pathname: item.path
|
|
152
|
+
})
|
|
153
|
+
onClose();
|
|
154
|
+
} else {
|
|
155
|
+
setCurrentOneLevel(item.path);
|
|
156
|
+
let currentDom = document.getElementById(item.path);
|
|
157
|
+
currentDom && currentDom.scrollIntoView();
|
|
158
|
+
}
|
|
159
|
+
}}
|
|
160
|
+
>
|
|
161
|
+
{item.name}
|
|
162
|
+
</div>))
|
|
163
|
+
}
|
|
164
|
+
</div>
|
|
165
|
+
<div style={{flexGrow: 1, position: 'relative'}}>
|
|
166
|
+
<img
|
|
167
|
+
onClick={() => {onClose()}}
|
|
168
|
+
style={{position: 'absolute', right: '15px', top: '17px', cursor: 'pointer'}} width={24} src={closeicon} />
|
|
169
|
+
|
|
170
|
+
<div style={{ padding: '10px', marginBottom: '10px', width: '100%', }}>
|
|
171
|
+
<Input
|
|
172
|
+
style={{ height: '36px', borderRadius: '4px', width: '830px' }}
|
|
173
|
+
placeholder="请输入关键词"
|
|
174
|
+
allowClear
|
|
175
|
+
prefix={<SearchOutlined />}
|
|
176
|
+
onChange={debounce((e: any) => {
|
|
177
|
+
searchMenuData(authorityMenu, e.target.value, setSearchMenuData);
|
|
178
|
+
}, 600)}
|
|
179
|
+
/>
|
|
180
|
+
<div style={{marginTop: '10px'}}>
|
|
181
|
+
<span style={{ color: '#8c8c8c', opacity: '0.6' }}>最近访问: </span>
|
|
182
|
+
{
|
|
183
|
+
searchHistoryList.map(item => {
|
|
184
|
+
return (
|
|
185
|
+
<Link style={{color: '#000000', marginRight: '10px'}} to={item.path} onClick={(e) => {onMenuClick(e, item);}}>
|
|
186
|
+
{item.name}
|
|
187
|
+
</Link>)
|
|
188
|
+
})
|
|
189
|
+
}
|
|
190
|
+
</div>
|
|
191
|
+
</div>
|
|
192
|
+
{
|
|
193
|
+
!!SearhData.length ?
|
|
194
|
+
(<div className={'search_menu_content'}>
|
|
195
|
+
{
|
|
196
|
+
SearhData.map((item: any) => (
|
|
197
|
+
<div onClick={(e) => {
|
|
198
|
+
onMenuClick(e, item);
|
|
199
|
+
}} key={item.path}>{item.name}</div>
|
|
200
|
+
))
|
|
201
|
+
}
|
|
202
|
+
</div>) : (
|
|
203
|
+
<div>
|
|
204
|
+
<div
|
|
205
|
+
style={{
|
|
206
|
+
height: `${rightMenuHeight}px`,
|
|
207
|
+
overflowY: 'scroll',
|
|
208
|
+
position: 'relative',
|
|
209
|
+
width: '100%'
|
|
210
|
+
}}
|
|
211
|
+
>
|
|
212
|
+
<div id='drawContent' className={'drawerWarp_right'}>
|
|
213
|
+
{homepageData && homepageData.filter((d) => !d.hideInMenu).length > 0 && (
|
|
214
|
+
<List
|
|
215
|
+
className={classNames('allFunsList', 'allFunsListWarp')}
|
|
216
|
+
dataSource={homepageData}
|
|
217
|
+
renderItem={(child: any) => {
|
|
218
|
+
if (!child.hideInMenu && child.path) {
|
|
219
|
+
return (
|
|
220
|
+
<div className={classNames('allFunsListWarp')}>
|
|
221
|
+
<List.Item
|
|
222
|
+
className={classNames('allFuncOnMouserover')}
|
|
223
|
+
style={{ padding: '12px 24px' }}
|
|
224
|
+
>
|
|
225
|
+
<Link to={child.path} onClick={(e) => {onMenuClick(e, child);}}>
|
|
226
|
+
{formatMessage({ id: `${child.name}` })}
|
|
227
|
+
<img className="allFuncOnMouseroverImg" src={right}></img>
|
|
228
|
+
</Link>
|
|
229
|
+
</List.Item>
|
|
230
|
+
</div>
|
|
231
|
+
);
|
|
232
|
+
}
|
|
233
|
+
}}
|
|
234
|
+
/>
|
|
235
|
+
)}
|
|
236
|
+
{routesData.map((item, index) => {
|
|
237
|
+
return (
|
|
238
|
+
<List
|
|
239
|
+
// className={classNames('allFunsList', 'allFunsListWarp', )}
|
|
240
|
+
className={`allFunsList allFunsListWarp ${currentOneLevel === item.path ? 'choosedStyle' : ''}`}
|
|
241
|
+
id={item.path}
|
|
242
|
+
style={{
|
|
243
|
+
color: currentOneLevel === item.path ? '#fff' : '#005CFF',
|
|
244
|
+
}}
|
|
245
|
+
header={<b>{formatMessage({ id: `${item.name}` })}</b>}
|
|
246
|
+
bordered
|
|
247
|
+
dataSource={item.children}
|
|
248
|
+
renderItem={(child: any) => {
|
|
249
|
+
return renderChildItem(child)
|
|
250
|
+
}}
|
|
251
|
+
/>
|
|
252
|
+
);
|
|
253
|
+
})}
|
|
254
|
+
</div>
|
|
255
|
+
<div style={{
|
|
256
|
+
display: moreBtnShow ? 'block' : 'none',
|
|
257
|
+
// position: 'absolute',
|
|
258
|
+
textAlign: 'center',
|
|
259
|
+
bottom: 0,
|
|
260
|
+
background: '#ffffff',
|
|
261
|
+
width: '100%',
|
|
262
|
+
height: '30px'
|
|
263
|
+
}}>
|
|
264
|
+
<span
|
|
265
|
+
onClick={() => {
|
|
266
|
+
setShowScroll(true);
|
|
267
|
+
setMoreBtnShow(false);
|
|
268
|
+
}}
|
|
269
|
+
style={{color: '#8c8c8c'}}
|
|
270
|
+
>
|
|
271
|
+
<CaretDownOutlined />
|
|
272
|
+
下滑加载更多
|
|
273
|
+
</span>
|
|
274
|
+
</div>
|
|
275
|
+
</div>
|
|
276
|
+
</div>
|
|
277
|
+
)
|
|
278
|
+
|
|
279
|
+
}
|
|
280
|
+
</div>
|
|
281
|
+
</div>
|
|
282
|
+
)
|
|
283
|
+
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
export default DrawContent;
|
package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/customMenuHeader.tsx
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
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;
|
|
@@ -0,0 +1,171 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
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
|
+
}
|