@bit-sun/business-component 4.0.0-alpha.3 → 4.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/.editorconfig +16 -0
- package/.fatherrc.ts +5 -0
- package/.gitlab-ci.yml +179 -0
- package/.prettierignore +7 -0
- package/.prettierrc +11 -0
- package/.umirc.ts +74 -0
- package/dist/components/Business/BsSulaQueryTable/setting.d.ts +1 -1
- package/dist/components/Business/BsSulaQueryTable/utils.d.ts +1 -1
- package/dist/components/Business/columnSettingTable/columnSetting.d.ts +1 -1
- package/dist/components/Business/columnSettingTable/index.d.ts +1 -0
- package/dist/components/Common/ParagraphCopier/index.d.ts +8 -0
- package/dist/components/Solution/RuleComponent/CustomPlugin/CustomSelector/CustomSelectorModal.d.ts +3 -0
- package/dist/components/Solution/RuleComponent/CustomPlugin/CustomSelector/helps.d.ts +2 -0
- package/dist/components/Solution/RuleComponent/CustomPlugin/CustomSelector/index.d.ts +3 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.js +1901 -639
- package/dist/index.js +1903 -636
- package/dist/utils/requestUtils.d.ts +1 -0
- package/dist/utils/utils.d.ts +3 -0
- package/docs/index.md +21 -0
- package/package.json +9 -14
- 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/arrow_top.svg +18 -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/common/ENUM.ts +41 -0
- package/src/components/Business/AddSelectBusiness/index.md +398 -0
- package/src/components/Business/AddSelectBusiness/index.tsx +1116 -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/ChooseStore/index.less +0 -0
- package/src/components/Business/BsLayouts/Components/ChooseStore/index.tsx +193 -0
- package/src/components/Business/BsLayouts/Components/ChooseStore/services.ts +10 -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 +163 -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/i18n.ts +9 -0
- package/src/components/Business/BsLayouts/Components/RightContent/index.tsx +172 -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 +1602 -0
- package/src/components/Business/BsLayouts/service.ts +11 -0
- package/src/components/Business/BsLayouts/utils.tsx +205 -0
- package/src/components/Business/BsSulaQueryTable/SearchItemSetting.tsx +566 -0
- package/src/components/Business/BsSulaQueryTable/bssulaquerytable.less +5 -0
- package/src/components/Business/BsSulaQueryTable/index.less +228 -0
- package/src/components/Business/BsSulaQueryTable/index.tsx +817 -0
- package/src/components/Business/BsSulaQueryTable/setting.tsx +937 -0
- package/src/components/Business/BsSulaQueryTable/utils.less +65 -0
- package/src/components/Business/BsSulaQueryTable/utils.tsx +709 -0
- package/src/components/Business/CommodityEntry/index.md +84 -0
- package/src/components/Business/CommodityEntry/index.tsx +82 -0
- 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 +156 -0
- package/src/components/Business/CommonGuideWrapper/index.md +61 -0
- package/src/components/Business/CommonGuideWrapper/index.tsx +108 -0
- package/src/components/Business/DetailPageWrapper/index.less +89 -0
- package/src/components/Business/DetailPageWrapper/index.tsx +306 -0
- package/src/components/Business/DetailPageWrapper/utils.tsx +166 -0
- package/src/components/Business/HomePageWrapper/index.less +36 -0
- package/src/components/Business/HomePageWrapper/index.md +45 -0
- package/src/components/Business/HomePageWrapper/index.tsx +130 -0
- package/src/components/Business/JsonQueryTable/components/FieldsModifyModal.tsx +823 -0
- package/src/components/Business/JsonQueryTable/components/FieldsSettingsTable.tsx +206 -0
- package/src/components/Business/JsonQueryTable/components/Formula.tsx +205 -0
- package/src/components/Business/JsonQueryTable/components/MaintainOptions.tsx +127 -0
- package/src/components/Business/JsonQueryTable/configButton/index.js +20 -0
- package/src/components/Business/JsonQueryTable/configTree/component/compactArrayView.js +25 -0
- package/src/components/Business/JsonQueryTable/configTree/component/compactObjectView.js +30 -0
- package/src/components/Business/JsonQueryTable/configTree/index.js +82 -0
- package/src/components/Business/JsonQueryTable/configTree/index.less +44 -0
- package/src/components/Business/JsonQueryTable/configTree/parser/highlight.js +57 -0
- package/src/components/Business/JsonQueryTable/configTree/parser/index.js +124 -0
- package/src/components/Business/JsonQueryTable/configTree/render/iconRender.js +29 -0
- package/src/components/Business/JsonQueryTable/configTree/render/nameRender.js +22 -0
- package/src/components/Business/JsonQueryTable/configTree/treeNode.js +116 -0
- package/src/components/Business/JsonQueryTable/drawer/index.tsx +12 -0
- package/src/components/Business/JsonQueryTable/function.ts +62 -0
- package/src/components/Business/JsonQueryTable/index.less +17 -0
- package/src/components/Business/JsonQueryTable/index.md +328 -0
- package/src/components/Business/JsonQueryTable/index.tsx +534 -0
- package/src/components/Business/JsonQueryTable/jsonEditor/index.js +346 -0
- package/src/components/Business/JsonQueryTable/jsonEditor/index.less +22 -0
- package/src/components/Business/JsonQueryTable/jsonEditor/lint/basicType.js +147 -0
- package/src/components/Business/JsonQueryTable/jsonEditor/lint/index.js +389 -0
- package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/actions.js +118 -0
- package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/dependency.js +22 -0
- package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/index.js +21 -0
- package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/request.js +65 -0
- package/src/components/Business/JsonQueryTable/static.ts +450 -0
- package/src/components/Business/SearchSelect/BusinessUtils.tsx +2207 -0
- package/src/components/Business/SearchSelect/common.ts +134 -0
- package/src/components/Business/SearchSelect/index.md +1570 -0
- package/src/components/Business/SearchSelect/index.tsx +55 -0
- package/src/components/Business/SearchSelect/utils.ts +125 -0
- 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 +239 -0
- package/src/components/Business/TreeSearchSelect/index.tsx +33 -0
- package/src/components/Business/TreeSearchSelect/utils.ts +115 -0
- package/src/components/Business/columnSettingTable/columnSetting.tsx +869 -0
- package/src/components/Business/columnSettingTable/index.less +253 -0
- package/src/components/Business/columnSettingTable/index.md +373 -0
- package/src/components/Business/columnSettingTable/index.tsx +235 -0
- package/src/components/Business/columnSettingTable/sulaSettingTable.tsx +232 -0
- package/src/components/Business/columnSettingTable/utils.tsx +88 -0
- package/src/components/Business/moreTreeTable/FixedScrollBar.tsx +87 -0
- package/src/components/Business/moreTreeTable/hooks/useSticky.ts +21 -0
- package/src/components/Business/moreTreeTable/index.less +100 -0
- package/src/components/Business/moreTreeTable/index.md +448 -0
- package/src/components/Business/moreTreeTable/index.tsx +387 -0
- package/src/components/Business/moreTreeTable/utils.ts +127 -0
- package/src/components/Common/ExtendedCollapse/ExtendedPanel.tsx +51 -0
- package/src/components/Common/ExtendedCollapse/index.less +33 -0
- package/src/components/Common/ExtendedCollapse/index.md +136 -0
- package/src/components/Common/ExtendedCollapse/index.tsx +25 -0
- package/src/components/Common/ParagraphCopier/index.md +81 -0
- package/src/components/Common/ParagraphCopier/index.tsx +56 -0
- package/src/components/Common/Section/index.md +120 -0
- package/src/components/Common/Section/index.module.less +16 -0
- package/src/components/Common/Section/index.tsx +70 -0
- package/src/components/Functional/AccessWrapper/index.tsx +34 -0
- package/src/components/Functional/AddSelect/helps.ts +81 -0
- package/src/components/Functional/AddSelect/index.less +367 -0
- package/src/components/Functional/AddSelect/index.md +155 -0
- package/src/components/Functional/AddSelect/index.tsx +1072 -0
- package/src/components/Functional/AuthButton/index.tsx +15 -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 +771 -0
- package/src/components/Functional/BsAntdSula/BsCascader/index.md +62 -0
- package/src/components/Functional/BsAntdSula/BsCascader/index.tsx +178 -0
- package/src/components/Functional/BsAntdSula/index.ts +2 -0
- package/src/components/Functional/DataImport/index.less +63 -0
- package/src/components/Functional/DataImport/index.md +44 -0
- package/src/components/Functional/DataImport/index.tsx +782 -0
- package/src/components/Functional/DataValidation/index.less +63 -0
- package/src/components/Functional/DataValidation/index.md +52 -0
- package/src/components/Functional/DataValidation/index.tsx +788 -0
- package/src/components/Functional/EllipsisTooltip/index.d.ts +5 -0
- package/src/components/Functional/EllipsisTooltip/index.js +36 -0
- package/src/components/Functional/EllipsisTooltip/index.md +30 -0
- package/src/components/Functional/ExportFunctions/ExportIcon/index.md +37 -0
- package/src/components/Functional/ExportFunctions/ExportIcon/index.tsx +65 -0
- package/src/components/Functional/QueryMutipleInput/index.less +37 -0
- package/src/components/Functional/QueryMutipleInput/index.md +33 -0
- package/src/components/Functional/QueryMutipleInput/index.tsx +129 -0
- package/src/components/Functional/SearchSelect/index.less +121 -0
- package/src/components/Functional/SearchSelect/index.md +141 -0
- package/src/components/Functional/SearchSelect/index.tsx +1041 -0
- package/src/components/Functional/SearchSelect/utils.ts +3 -0
- package/src/components/Functional/TreeSearchSelect/index.md +47 -0
- package/src/components/Functional/TreeSearchSelect/index.tsx +224 -0
- package/src/components/Solution/RuleComponent/CustomPlugin/CustomSelector/CustomSelectorModal.tsx +358 -0
- package/src/components/Solution/RuleComponent/CustomPlugin/CustomSelector/function.js +255 -0
- package/src/components/Solution/RuleComponent/CustomPlugin/CustomSelector/helps.tsx +58 -0
- package/src/components/Solution/RuleComponent/CustomPlugin/CustomSelector/index.tsx +129 -0
- package/src/components/Solution/RuleComponent/Formula.tsx +335 -0
- package/src/components/Solution/RuleComponent/InnerSelect.tsx +62 -0
- package/src/components/Solution/RuleComponent/RenderCompItem.tsx +743 -0
- package/src/components/Solution/RuleComponent/index.d.ts +29 -0
- package/src/components/Solution/RuleComponent/index.js +1614 -0
- package/src/components/Solution/RuleComponent/index.less +247 -0
- package/src/components/Solution/RuleComponent/renderSpecificAction.js +99 -0
- package/src/components/Solution/RuleComponent/ruleFiled.js +2587 -0
- package/src/components/Solution/RuleComponent/services.ts +13 -0
- package/src/components/Solution/RuleComponent/util.js +143 -0
- package/src/components/Solution/RuleSetter/RuleInstance.tsx +6 -0
- package/src/components/Solution/RuleSetter/baseRule.tsx +394 -0
- package/src/components/Solution/RuleSetter/function.ts +437 -0
- package/src/components/Solution/RuleSetter/index.less +221 -0
- package/src/components/Solution/RuleSetter/index.tsx +208 -0
- package/src/components/Solution/RuleSetter/service.js +276 -0
- package/src/index.ts +46 -0
- package/src/plugin/TableColumnSetting/index.less +247 -0
- package/src/plugin/TableColumnSetting/index.md +50 -0
- package/src/plugin/TableColumnSetting/index.tsx +725 -0
- package/src/plugin/TableColumnSetting/utils.ts +19 -0
- package/src/styles/bsDefault.less +32 -12
- package/src/utils/CheckOneUser/index.md +39 -0
- package/src/utils/CheckOneUser/index.ts +52 -0
- package/src/utils/CustomLoginInfo.ts +55 -0
- package/src/utils/LocalstorageUtils.ts +134 -0
- package/src/utils/TableUtils.less +52 -0
- package/src/utils/TableUtils.tsx +691 -0
- package/src/utils/auth.ts +39 -0
- package/src/utils/businessUtils.ts +434 -0
- package/src/utils/checkUtils.ts +39 -0
- package/src/utils/constant.ts +38 -0
- package/src/utils/enumConfig.ts +17 -0
- package/src/utils/getFormMode.js +12 -0
- package/src/utils/index.ts +19 -0
- package/src/utils/request.ts +53 -0
- package/src/utils/requestUtils.ts +197 -0
- package/src/utils/serialize.js +7 -0
- package/src/utils/utils.ts +267 -0
- package/src/utils/xlsxUtil.tsx +146 -0
- package/tsconfig.json +29 -0
- package/typings.d.ts +5 -0
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
import { Dropdown, message, Modal, Button } from 'antd';
|
|
4
|
+
import i18n from './i18n';
|
|
5
|
+
import React, { useState } from 'react';
|
|
6
|
+
import { history, useModel, setLocale } from 'umi';
|
|
7
|
+
import './home.less';
|
|
8
|
+
import Morentouxiang from '../../../../../assets/morentouxiang-32.svg';
|
|
9
|
+
import Morentouxiang32 from '../../../../../assets/32.svg';
|
|
10
|
+
import Out from '../../../../../assets/xinglan-icon-out.png';
|
|
11
|
+
import { outLogin } from '../../service';
|
|
12
|
+
import { ExclamationCircleOutlined } from '@ant-design/icons';
|
|
13
|
+
import { setLoginOutPath } from '../../utils';
|
|
14
|
+
import LoginModal from './LoginModal';
|
|
15
|
+
import { getSessionId, getUserName, handleUserPhone } from '@/utils/LocalstorageUtils';
|
|
16
|
+
|
|
17
|
+
export type SiderTheme = 'light' | 'dark';
|
|
18
|
+
export type GlobalHeaderRightProps = {
|
|
19
|
+
menu?: boolean;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const GlobalHeaderRight: React.FC<GlobalHeaderRightProps> = ({ menu }) => {
|
|
23
|
+
const { initialState } = useModel('@@initialState');
|
|
24
|
+
|
|
25
|
+
if (!initialState || !initialState.settings) {
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const [loginModalParams, setLoginModalParams]: any = useState({
|
|
30
|
+
visible: false,
|
|
31
|
+
width: '680px',
|
|
32
|
+
title: '修改密码',
|
|
33
|
+
onCancel: () => {
|
|
34
|
+
setLoginModalParams({ ...loginModalParams, visible: false });
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
const { navTheme, layout } = initialState.settings;
|
|
38
|
+
let className = 'rcom_right';
|
|
39
|
+
|
|
40
|
+
if ((navTheme === 'dark' && layout === 'top') || layout === 'mix') {
|
|
41
|
+
className = `${'rcom_right'} ${'rcom_dark'}`;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
const divStyle = (): React.CSSProperties => ({
|
|
45
|
+
gap: '20px',
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
const loginOutConfirm = () => {
|
|
49
|
+
Modal.confirm({
|
|
50
|
+
title: '退出确认',
|
|
51
|
+
icon: <ExclamationCircleOutlined />,
|
|
52
|
+
content: '确定要退出系统吗?',
|
|
53
|
+
okText: '确认',
|
|
54
|
+
cancelText: '取消',
|
|
55
|
+
onOk() {
|
|
56
|
+
loginOut();
|
|
57
|
+
},
|
|
58
|
+
});
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
const loginOut = async () => {
|
|
62
|
+
const sessionId = await getSessionId();
|
|
63
|
+
await outLogin({ sessionId: sessionId });
|
|
64
|
+
// @ts-ignore
|
|
65
|
+
if (BUILD_TYPE) {
|
|
66
|
+
message.success('退出登录成功');
|
|
67
|
+
history.replace({
|
|
68
|
+
pathname: '/user/login',
|
|
69
|
+
});
|
|
70
|
+
} else {
|
|
71
|
+
setLoginOutPath()
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
const menus = (
|
|
76
|
+
<div className={'userDownWarp'}>
|
|
77
|
+
<div className={'userDownTop'}>
|
|
78
|
+
<div className={'userDownTopT'}>
|
|
79
|
+
<img style={{ width: 68, height: 68 }} src={Morentouxiang32} />
|
|
80
|
+
</div>
|
|
81
|
+
<div className={'userDownTopC'}>{getUserName()}</div>
|
|
82
|
+
<div className={'userDownTopB'}>{handleUserPhone()}</div>
|
|
83
|
+
</div>
|
|
84
|
+
<div className={'userDownB'}>
|
|
85
|
+
{/* <div
|
|
86
|
+
className={'userDownBList'}
|
|
87
|
+
onClick={(e: any) => {
|
|
88
|
+
setLoginModalParams({
|
|
89
|
+
...loginModalParams,
|
|
90
|
+
visible: true,
|
|
91
|
+
loginOut,
|
|
92
|
+
});
|
|
93
|
+
e.preventDefault();
|
|
94
|
+
}}
|
|
95
|
+
>
|
|
96
|
+
<div className={'rcom_label'}>
|
|
97
|
+
<img src={Sett}></img>
|
|
98
|
+
</div>
|
|
99
|
+
<div className={'rcom_name'}>修改密码</div>
|
|
100
|
+
</div> */}
|
|
101
|
+
<div
|
|
102
|
+
className={'userDownOut'}
|
|
103
|
+
onClick={(e: any) => {
|
|
104
|
+
loginOutConfirm();
|
|
105
|
+
e.preventDefault();
|
|
106
|
+
}}
|
|
107
|
+
>
|
|
108
|
+
<div className={'rcom_label'}>
|
|
109
|
+
<img src={Out}></img>
|
|
110
|
+
</div>
|
|
111
|
+
<div className={'rcom_name'}>退出登录</div>
|
|
112
|
+
</div>
|
|
113
|
+
</div>
|
|
114
|
+
</div>
|
|
115
|
+
);
|
|
116
|
+
|
|
117
|
+
const changeLanguage = (lang: string) => {
|
|
118
|
+
localStorage.setItem('umi_locale', lang || "zh-CN");
|
|
119
|
+
setLocale(lang || "zh-CN");
|
|
120
|
+
window.location.reload();
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
const language = localStorage.getItem('umi_locale') || 'zh-CN';
|
|
124
|
+
|
|
125
|
+
return (
|
|
126
|
+
<div className={className} style={divStyle()}>
|
|
127
|
+
<div className={'rcom_imgWap'}>
|
|
128
|
+
<Button
|
|
129
|
+
style={{
|
|
130
|
+
marginRight: '20px'
|
|
131
|
+
}}
|
|
132
|
+
onClick={() => {
|
|
133
|
+
changeLanguage(language === 'zh-CN' ? 'en-US' : 'zh-CN')
|
|
134
|
+
}}>{i18n[language]?.lang || "English"}
|
|
135
|
+
</Button>
|
|
136
|
+
{/* <Tooltip placement="bottom" title={'全局控制台'}>
|
|
137
|
+
<img
|
|
138
|
+
className={'rcom_img'}
|
|
139
|
+
onClick={() => {
|
|
140
|
+
window.location.href = '/';
|
|
141
|
+
}}
|
|
142
|
+
src={Kongzhi}
|
|
143
|
+
></img>
|
|
144
|
+
</Tooltip>
|
|
145
|
+
<div className={'rcom_headLine'}></div> */}
|
|
146
|
+
{/* <img className={'rcom_img'} src={Bangzhu}></img> */}
|
|
147
|
+
{/* <img className={'rcom_img'} src={Xiaoxi}></img> */}
|
|
148
|
+
{/* <div className={'rcom_headLine'}></div> */}
|
|
149
|
+
<Dropdown overlay={menus} trigger={['click']}>
|
|
150
|
+
<div className={'rcom_userWarp'}>
|
|
151
|
+
<div className={'rcom_l'}>
|
|
152
|
+
<img src={Morentouxiang} />
|
|
153
|
+
</div>
|
|
154
|
+
<div className={'rcom_c'}>
|
|
155
|
+
<div className={'rcom_ct'}>{getUserName()}</div>
|
|
156
|
+
<div className={'rcom_cb'}>{handleUserPhone()}</div>
|
|
157
|
+
</div>
|
|
158
|
+
<div className={'rcom_r'}>
|
|
159
|
+
<img style={{marginRight: '0px'}} src='./xialajiantou-new.svg' />
|
|
160
|
+
</div>
|
|
161
|
+
</div>
|
|
162
|
+
</Dropdown>
|
|
163
|
+
</div>
|
|
164
|
+
|
|
165
|
+
{/* 修改秘密 */}
|
|
166
|
+
{loginModalParams.visible && (
|
|
167
|
+
<LoginModal {...loginModalParams}></LoginModal>
|
|
168
|
+
)}
|
|
169
|
+
</div>
|
|
170
|
+
);
|
|
171
|
+
};
|
|
172
|
+
export default GlobalHeaderRight;
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
// @import '~antd/es/style/themes/default.less';
|
|
2
|
+
// @import '~antd/dist/antd.less';
|
|
3
|
+
|
|
4
|
+
@pro-header-hover-bg: rgba(0, 0, 0, 0.025);
|
|
5
|
+
|
|
6
|
+
.menu {
|
|
7
|
+
.anticon {
|
|
8
|
+
margin-right: 8px;
|
|
9
|
+
}
|
|
10
|
+
.ant-dropdown-menu-item {
|
|
11
|
+
min-width: 160px;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.right {
|
|
16
|
+
display: flex;
|
|
17
|
+
float: right;
|
|
18
|
+
height: 48px;
|
|
19
|
+
margin-left: auto;
|
|
20
|
+
overflow: hidden;
|
|
21
|
+
.action {
|
|
22
|
+
display: flex;
|
|
23
|
+
align-items: center;
|
|
24
|
+
height: 48px;
|
|
25
|
+
padding: 0 12px;
|
|
26
|
+
cursor: pointer;
|
|
27
|
+
transition: all 0.3s;
|
|
28
|
+
> span {
|
|
29
|
+
vertical-align: middle;
|
|
30
|
+
}
|
|
31
|
+
&:hover {
|
|
32
|
+
background: @pro-header-hover-bg;
|
|
33
|
+
}
|
|
34
|
+
.opened {
|
|
35
|
+
background: @pro-header-hover-bg;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
.search {
|
|
39
|
+
padding: 0 12px;
|
|
40
|
+
&:hover {
|
|
41
|
+
background: transparent;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
.account {
|
|
45
|
+
.avatar {
|
|
46
|
+
margin-right: 8px;
|
|
47
|
+
color: #005cff;
|
|
48
|
+
vertical-align: top;
|
|
49
|
+
background: rgba(255, 255, 255, 0.85);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.dark {
|
|
55
|
+
.action {
|
|
56
|
+
&:hover {
|
|
57
|
+
background: #252a3d;
|
|
58
|
+
}
|
|
59
|
+
.opened {
|
|
60
|
+
background: #252a3d;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.allFunsList {
|
|
66
|
+
margin-bottom: 10px;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.isClons {
|
|
70
|
+
position: relative;
|
|
71
|
+
left: -8px;
|
|
72
|
+
width: 30px;
|
|
73
|
+
height: 36px;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.notClons {
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.drawerWarp {
|
|
80
|
+
column-count: 3;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.allFunsListWarp {
|
|
84
|
+
width: 200px;
|
|
85
|
+
margin-right: 10px;
|
|
86
|
+
border-radius: 4px;
|
|
87
|
+
|
|
88
|
+
break-inside: avoid;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.drawerWarp_p {
|
|
92
|
+
color: #8c8c8c;
|
|
93
|
+
font-weight: 400;
|
|
94
|
+
font-size: 14px;
|
|
95
|
+
font-family: PingFangSC, PingFangSC-Regular;
|
|
96
|
+
line-height: 20px;
|
|
97
|
+
text-align: left;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.searchTop {
|
|
101
|
+
display: flex;
|
|
102
|
+
align-items: center;
|
|
103
|
+
}
|
|
104
|
+
.searchTopInp {
|
|
105
|
+
width: 528px;
|
|
106
|
+
height: 40px;
|
|
107
|
+
background: #f8f9fa;
|
|
108
|
+
border: 1px solid #d9d9d9;
|
|
109
|
+
border-radius: 4px;
|
|
110
|
+
|
|
111
|
+
.ant-input {
|
|
112
|
+
background: #f8f9fa;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
.searchTopBtn {
|
|
116
|
+
position: relative;
|
|
117
|
+
left: -1px;
|
|
118
|
+
width: 92px;
|
|
119
|
+
height: 40px;
|
|
120
|
+
background: #005cff;
|
|
121
|
+
border-radius: 0px 4px 4px 0px;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
.contentWarp {
|
|
126
|
+
margin-top: 54px;
|
|
127
|
+
font-size: 14px;
|
|
128
|
+
font-weight: 400;
|
|
129
|
+
text-align: left;
|
|
130
|
+
color: #8c8c8c;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.themeColor {
|
|
134
|
+
color: #005CFF;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.serachView{
|
|
138
|
+
margin-top: 36px;
|
|
139
|
+
margin-bottom: 32px;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.content {
|
|
143
|
+
display: flex;
|
|
144
|
+
flex-wrap: wrap;
|
|
145
|
+
div {
|
|
146
|
+
display: flex;
|
|
147
|
+
align-items: center;
|
|
148
|
+
justify-content: center;
|
|
149
|
+
padding: 8px 20px;
|
|
150
|
+
font-size: 14px;
|
|
151
|
+
font-weight: 400;
|
|
152
|
+
color: #000000;
|
|
153
|
+
background: #f8f9fa;
|
|
154
|
+
border-radius: 100px;
|
|
155
|
+
margin-right: 10px;
|
|
156
|
+
margin-bottom: 10px;
|
|
157
|
+
}
|
|
158
|
+
div:hover {
|
|
159
|
+
cursor: pointer;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import { Button, Drawer, Input, } from 'antd';
|
|
3
|
+
import React, { useRef, useState } from 'react';
|
|
4
|
+
import './index.less';
|
|
5
|
+
export type SiderTheme = 'light' | 'dark';
|
|
6
|
+
export type GlobalHeaderRightProps = {
|
|
7
|
+
menu?: boolean;
|
|
8
|
+
};
|
|
9
|
+
import { history } from 'umi';
|
|
10
|
+
import {
|
|
11
|
+
searchMenuData,
|
|
12
|
+
} from '../../utils';
|
|
13
|
+
|
|
14
|
+
const AllFunc: React.FC<GlobalHeaderRightProps> = (props: any) => {
|
|
15
|
+
|
|
16
|
+
const [keyWard, setKeyWord]: any = useState('');
|
|
17
|
+
const [routesData, setroutesData]: any = useState([]);
|
|
18
|
+
const menuData = JSON.parse(localStorage.getItem(`customerMenu_${props.itemPath}_front`) || '[]');
|
|
19
|
+
|
|
20
|
+
const onClose = () => {
|
|
21
|
+
props.onClose();
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const inputRef: any = useRef("")
|
|
25
|
+
|
|
26
|
+
return (
|
|
27
|
+
<>
|
|
28
|
+
<Drawer
|
|
29
|
+
{...props}
|
|
30
|
+
destroyOnClose
|
|
31
|
+
zIndex={19}
|
|
32
|
+
style={{ left: props.visible ? 140 : 0, color: '#000' }}
|
|
33
|
+
title={<span style={{ fontWeight: 'bold', fontSize: 18 }}>{props.title}</span>}
|
|
34
|
+
placement="left"
|
|
35
|
+
onClose={onClose}
|
|
36
|
+
>
|
|
37
|
+
<div>
|
|
38
|
+
<div className={'searchTop'}>
|
|
39
|
+
<Input placeholder='请搜索'
|
|
40
|
+
onKeyDown={(e: any) => {
|
|
41
|
+
if (e.keyCode === 13) {
|
|
42
|
+
searchMenuData(menuData, inputRef.current.input.value, setroutesData)
|
|
43
|
+
setKeyWord(inputRef.current.input.value)
|
|
44
|
+
}
|
|
45
|
+
}}
|
|
46
|
+
allowClear
|
|
47
|
+
ref={inputRef}
|
|
48
|
+
className={'searchTopInp'}></Input>
|
|
49
|
+
<Button style={{height: '40px'}} onClick={() => {
|
|
50
|
+
searchMenuData(menuData, inputRef.current.input.value, setroutesData);
|
|
51
|
+
setKeyWord(inputRef.current.input.value)
|
|
52
|
+
|
|
53
|
+
}} type="primary" className={'searchTopBtn'}>
|
|
54
|
+
搜索
|
|
55
|
+
</Button>
|
|
56
|
+
</div>
|
|
57
|
+
<div className={'contentWarp'}>
|
|
58
|
+
<div> 搜索“ {keyWard}”,共收到 <span className={'themeColor'}>{routesData.length || 0}</span> 条结果 </div>
|
|
59
|
+
<div className={'serachView'}>您是否要搜索...</div>
|
|
60
|
+
</div>
|
|
61
|
+
<div className={'content'}>
|
|
62
|
+
{
|
|
63
|
+
routesData.map((item: any) => (
|
|
64
|
+
<div onClick={() => {
|
|
65
|
+
history.push(item.path)
|
|
66
|
+
onClose()
|
|
67
|
+
}} key={item.path}>{item.name}</div>
|
|
68
|
+
))
|
|
69
|
+
}
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
</Drawer>
|
|
73
|
+
</>
|
|
74
|
+
);
|
|
75
|
+
};
|
|
76
|
+
export default AllFunc;
|
|
@@ -0,0 +1,80 @@
|
|
|
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: 40px;
|
|
9
|
+
border-bottom: 1px solid #3d4047;
|
|
10
|
+
.ant-btn-link {
|
|
11
|
+
color: #b1bad4 !important;
|
|
12
|
+
font-size: 16px;
|
|
13
|
+
height: 36px;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.menu_item {
|
|
18
|
+
line-height: 30px;
|
|
19
|
+
height: 30px;
|
|
20
|
+
color: rgba(44, 47, 46);
|
|
21
|
+
overflow: hidden;
|
|
22
|
+
text-overflow: ellipsis;
|
|
23
|
+
white-space: nowrap;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.link_style:hover {
|
|
27
|
+
background-color: #e4e7ed;
|
|
28
|
+
cursor: pointer;
|
|
29
|
+
color: #005cff;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.sub_menu_content {
|
|
33
|
+
box-shadow: 2px 0px 4px 0px rgba(185,185,185, 0.5);
|
|
34
|
+
position: fixed;
|
|
35
|
+
top: 50px;
|
|
36
|
+
left: 140px;
|
|
37
|
+
width: 200px;
|
|
38
|
+
height: 100%;
|
|
39
|
+
background-color: #fff;
|
|
40
|
+
padding-top: 10px;
|
|
41
|
+
z-index: 9999;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.tab_left_operate {
|
|
45
|
+
display: flex;
|
|
46
|
+
height: 28px;
|
|
47
|
+
align-items: center;
|
|
48
|
+
&>div {
|
|
49
|
+
width: 28px;
|
|
50
|
+
font-size: 12px;
|
|
51
|
+
color: #2C2F2ECC;
|
|
52
|
+
height: 100%;
|
|
53
|
+
display: flex;
|
|
54
|
+
align-items: center;
|
|
55
|
+
justify-content: center;
|
|
56
|
+
border-right: 1px solid #E4E4E4;
|
|
57
|
+
background-color: #fff;
|
|
58
|
+
cursor: pointer;
|
|
59
|
+
}
|
|
60
|
+
&>div:last-child {
|
|
61
|
+
box-shadow: 2px -2px 4px 0px rgba(185,185,185, 0.9);
|
|
62
|
+
z-index: 99;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.tab_right_operate {
|
|
67
|
+
height: 28px;
|
|
68
|
+
width: 28px;
|
|
69
|
+
font-size: 12px;
|
|
70
|
+
color: #2C2F2ECC;
|
|
71
|
+
display: flex;
|
|
72
|
+
align-items: center;
|
|
73
|
+
justify-content: center;
|
|
74
|
+
border-right: 1px solid #E4E4E4;
|
|
75
|
+
background-color: #fff;
|
|
76
|
+
box-shadow: -2px -2px 4px 0px rgba(185,185,185, 0.9);
|
|
77
|
+
z-index: 99;
|
|
78
|
+
cursor: pointer;
|
|
79
|
+
position: relative;
|
|
80
|
+
}
|