@bit-sun/business-component 3.2.4 → 3.6.1-alpha.0
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/.umirc.ts +3 -2
- package/dist/components/Business/AddSelectBusiness/index.d.ts +4 -4
- package/dist/components/Business/BsLayouts/Components/AllFunc/drawContent.d.ts +2 -2
- package/dist/components/Business/BsLayouts/Components/ChooseStore/index.d.ts +2 -2
- package/dist/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.d.ts +1 -1
- package/dist/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/leftTree.d.ts +1 -1
- package/dist/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/rightTree.d.ts +2 -2
- package/dist/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/DrawContent.d.ts +2 -2
- package/dist/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/customMenuHeader.d.ts +2 -2
- package/dist/components/Business/BsLayouts/Components/CustomerMenu/index.d.ts +1 -1
- package/dist/components/Business/BsLayouts/Components/GlobalHeader/index.d.ts +2 -2
- package/dist/components/Business/BsLayouts/Components/RightContent/LoginModal.d.ts +2 -2
- package/dist/components/Business/BsLayouts/index.d.ts +1 -1
- package/dist/components/Business/BsSulaQueryTable/SearchItemSetting.d.ts +5 -5
- package/dist/components/Business/BsSulaQueryTable/index.d.ts +2 -2
- package/dist/components/Business/BsSulaQueryTable/setting.d.ts +7 -7
- package/dist/components/Business/BsSulaQueryTable/utils.d.ts +15 -15
- package/dist/components/Business/CommodityEntry/index.d.ts +2 -2
- package/dist/components/Business/CommonAlert/index.d.ts +2 -2
- package/dist/components/Business/CommonGuideWrapper/index.d.ts +3 -3
- package/dist/components/Business/DetailPageWrapper/index.d.ts +6 -6
- package/dist/components/Business/HomePageWrapper/index.d.ts +2 -2
- package/dist/components/Business/JsonQueryTable/components/FieldsModifyModal.d.ts +2 -2
- package/dist/components/Business/JsonQueryTable/components/FieldsSettingsTable.d.ts +2 -2
- package/dist/components/Business/JsonQueryTable/components/Formula.d.ts +2 -2
- package/dist/components/Business/JsonQueryTable/components/MaintainOptions.d.ts +2 -2
- package/dist/components/Business/JsonQueryTable/drawer/index.d.ts +2 -2
- package/dist/components/Business/SearchSelect/index.d.ts +1 -1
- package/dist/components/Business/StateFlow/index.d.ts +2 -2
- package/dist/components/Business/TreeSearchSelect/index.d.ts +1 -1
- package/dist/components/Business/columnSettingTable/columnSetting.d.ts +7 -7
- package/dist/components/Business/columnSettingTable/index.d.ts +3 -2
- package/dist/components/Business/columnSettingTable/sulaSettingTable.d.ts +2 -2
- package/dist/components/Business/columnSettingTable/utils.d.ts +2 -2
- package/dist/components/Business/moreTreeTable/FixedScrollBar.d.ts +1 -1
- package/dist/components/Common/ExtendedCollapse/ExtendedPanel.d.ts +10 -0
- package/dist/components/Common/ExtendedCollapse/index.d.ts +7 -0
- package/dist/components/Common/ParagraphCopier/index.d.ts +8 -0
- package/dist/components/Common/Section/index.d.ts +29 -0
- package/dist/components/Functional/AddSelect/index.d.ts +2 -2
- package/dist/components/Functional/AuthButton/index.d.ts +2 -2
- package/dist/components/Functional/DataImport/index.d.ts +3 -3
- package/dist/components/Functional/DataValidation/index.d.ts +3 -3
- package/dist/components/Functional/ExportFunctions/ExportIcon/index.d.ts +2 -2
- package/dist/components/Functional/QueryMutipleInput/index.d.ts +4 -3
- package/dist/components/Functional/SearchSelect/index.d.ts +1 -1
- package/dist/components/Functional/TreeSearchSelect/index.d.ts +2 -2
- package/dist/components/Solution/RuleComponent/Formula.d.ts +2 -2
- package/dist/components/Solution/RuleComponent/InnerSelect.d.ts +2 -2
- package/dist/components/Solution/RuleComponent/RenderCompItem.d.ts +2 -2
- package/dist/components/Solution/RuleSetter/RuleInstance.d.ts +2 -2
- package/dist/components/Solution/RuleSetter/baseRule.d.ts +1 -1
- package/dist/components/Solution/RuleSetter/index.d.ts +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.esm.js +1158 -1849
- package/dist/index.js +1158 -1850
- package/dist/plugin/TableColumnSetting/index.d.ts +6 -5
- package/dist/utils/TableUtils.d.ts +19 -19
- package/dist/utils/requestUtils.d.ts +0 -1
- package/dist/utils/utils.d.ts +0 -3
- package/lib/assets/exportFail.svg +9 -9
- package/lib/assets/exportProcessing.svg +9 -9
- package/lib/assets/exportSuccess.svg +9 -9
- package/package.json +15 -16
- package/src/assets/caidan.svg +1 -1
- package/src/assets/exportFail.svg +9 -9
- package/src/assets/exportProcessing.svg +9 -9
- package/src/assets/exportSuccess.svg +9 -9
- package/src/assets/fixed-left-active.svg +1 -1
- package/src/assets/fixed-right-active.svg +1 -1
- package/src/components/Business/AddSelectBusiness/index.md +11 -5
- package/src/components/Business/AddSelectBusiness/index.tsx +5 -56
- package/src/components/Business/BsLayouts/Components/AllFunc/drawContent.tsx +1 -1
- package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/DrawContent.tsx +1 -1
- package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/drawContent.less +2 -2
- package/src/components/Business/BsLayouts/Components/GlobalHeader/index.less +1 -1
- package/src/components/Business/BsLayouts/Components/RightContent/home.less +1 -1
- package/src/components/Business/BsLayouts/Components/SearchFunc/index.less +3 -3
- package/src/components/Business/BsLayouts/index.tsx +4 -9
- package/src/components/Business/BsSulaQueryTable/SearchItemSetting.tsx +2 -1
- package/src/components/Business/BsSulaQueryTable/index.md +113 -0
- package/src/components/Business/BsSulaQueryTable/index.tsx +240 -162
- package/src/components/Business/BsSulaQueryTable/setting.tsx +52 -3
- package/src/components/Business/BsSulaQueryTable/utils.less +1 -1
- package/src/components/Business/BsSulaQueryTable/utils.tsx +8 -8
- package/src/components/Business/CommodityEntry/index.tsx +2 -2
- package/src/components/Business/CommonAlert/index.tsx +1 -1
- package/src/components/Business/CommonGuideWrapper/index.less +50 -15
- package/src/components/Business/CommonGuideWrapper/index.md +36 -14
- package/src/components/Business/CommonGuideWrapper/index.tsx +73 -59
- package/src/components/Business/DetailPageWrapper/index.less +11 -9
- package/src/components/Business/DetailPageWrapper/index.tsx +2 -23
- package/src/components/Business/DetailPageWrapper/utils.tsx +1 -1
- package/src/components/Business/HomePageWrapper/index.less +6 -3
- package/src/components/Business/HomePageWrapper/index.md +2 -2
- package/src/components/Business/HomePageWrapper/index.tsx +5 -37
- package/src/components/Business/JsonQueryTable/components/FieldsSettingsTable.tsx +2 -2
- package/src/components/Business/SearchSelect/BusinessUtils.tsx +40 -38
- package/src/components/Business/SearchSelect/index.md +0 -58
- package/src/components/Business/SearchSelect/utils.ts +2 -2
- package/src/components/Business/StateFlow/index.less +3 -3
- package/src/components/Business/TreeSearchSelect/index.md +0 -28
- package/src/components/Business/TreeSearchSelect/utils.ts +0 -11
- package/src/components/Business/columnSettingTable/columnSetting.tsx +65 -13
- package/src/components/Business/columnSettingTable/index.md +1 -15
- package/src/components/Business/columnSettingTable/index.tsx +14 -4
- package/src/components/Business/columnSettingTable/sulaSettingTable.tsx +5 -4
- package/src/components/Business/columnSettingTable/utils.tsx +2 -2
- 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/AddSelect/index.tsx +29 -19
- package/src/components/Functional/BillEntry/index.tsx +11 -10
- package/src/components/Functional/DataImport/index.tsx +2 -1
- package/src/components/Functional/DataValidation/index.tsx +3 -3
- package/src/components/Functional/QueryMutipleInput/index.tsx +13 -4
- package/src/components/Functional/SearchSelect/index.tsx +3 -10
- package/src/components/Solution/RuleComponent/InnerSelect.tsx +1 -0
- package/src/components/Solution/RuleComponent/RenderCompItem.tsx +30 -46
- package/src/components/Solution/RuleComponent/index.js +18 -13
- package/src/components/Solution/RuleComponent/ruleFiled.js +41 -123
- package/src/index.ts +5 -0
- package/src/plugin/TableColumnSetting/index.tsx +75 -9
- package/src/styles/bsDefault.less +26 -18
- package/src/utils/TableUtils.less +1 -1
- package/src/utils/businessUtils.ts +2 -2
- package/src/utils/requestUtils.ts +2 -6
- package/src/utils/utils.ts +6 -35
- package/src/utils/xlsxUtil.tsx +2 -2
- package/tsconfig.json +2 -1
- package/dist/components/Solution/RuleComponent/CustomPlugin/CustomSelector/CustomSelectorModal.d.ts +0 -3
- package/dist/components/Solution/RuleComponent/CustomPlugin/CustomSelector/helps.d.ts +0 -2
- package/dist/components/Solution/RuleComponent/CustomPlugin/CustomSelector/index.d.ts +0 -3
- package/src/components/Solution/RuleComponent/CustomPlugin/CustomSelector/CustomSelectorModal.tsx +0 -358
- package/src/components/Solution/RuleComponent/CustomPlugin/CustomSelector/function.js +0 -255
- package/src/components/Solution/RuleComponent/CustomPlugin/CustomSelector/helps.tsx +0 -58
- package/src/components/Solution/RuleComponent/CustomPlugin/CustomSelector/index.tsx +0 -129
|
@@ -472,6 +472,7 @@ class SortableTable extends React.Component {
|
|
|
472
472
|
showModal = () => {
|
|
473
473
|
this.setState({
|
|
474
474
|
visible: true,
|
|
475
|
+
onSearchSort: false
|
|
475
476
|
});
|
|
476
477
|
this.setInitValue();
|
|
477
478
|
};
|
|
@@ -630,7 +631,52 @@ class SortableTable extends React.Component {
|
|
|
630
631
|
};
|
|
631
632
|
|
|
632
633
|
handleResetSetting = () => {
|
|
633
|
-
this.
|
|
634
|
+
const { setShowColumns, datasource = [], setInitialTableInfo, appRequestConfig }: any = this.props;
|
|
635
|
+
let that = this;
|
|
636
|
+
let { bsTableCode } = this.state;
|
|
637
|
+
|
|
638
|
+
return new Promise((resolve: any, reject: any) => {
|
|
639
|
+
request({
|
|
640
|
+
url: handleRequestUrl('/user','/appConfig/saveUserOrder', appRequestConfig),
|
|
641
|
+
method: 'POST',
|
|
642
|
+
data: {
|
|
643
|
+
code: that.state.bsTableCode,
|
|
644
|
+
detail: '',
|
|
645
|
+
},
|
|
646
|
+
}).then((res:any) => {
|
|
647
|
+
if (judgeIsRequestSuccess(res?.data)) {
|
|
648
|
+
let config =
|
|
649
|
+
localStorage.getItem(ENUM.BROWSER_CACHE.COLUMN_CONDITION) || '[]';
|
|
650
|
+
let configArray = JSON.parse(config);
|
|
651
|
+
let currentSetting = configArray.filter(
|
|
652
|
+
(item) => item.code === bsTableCode,
|
|
653
|
+
);
|
|
654
|
+
if (currentSetting.length) {
|
|
655
|
+
currentSetting[0].detail = JSON.stringify([]);
|
|
656
|
+
} else {
|
|
657
|
+
configArray.push({
|
|
658
|
+
code: bsTableCode,
|
|
659
|
+
detail: JSON.stringify([]),
|
|
660
|
+
});
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
localStorage.setItem(
|
|
664
|
+
ENUM.BROWSER_CACHE.COLUMN_CONDITION,
|
|
665
|
+
JSON.stringify(configArray),
|
|
666
|
+
);
|
|
667
|
+
|
|
668
|
+
message.success('重置表头列成功!');
|
|
669
|
+
|
|
670
|
+
setInitialTableInfo(true);
|
|
671
|
+
this.setState({
|
|
672
|
+
visible: false,
|
|
673
|
+
});
|
|
674
|
+
} else {
|
|
675
|
+
message.error('重置表头列自定义失败,请稍后尝试');
|
|
676
|
+
reject('');
|
|
677
|
+
}
|
|
678
|
+
});
|
|
679
|
+
})
|
|
634
680
|
};
|
|
635
681
|
|
|
636
682
|
onSearch = (e: any) => {
|
|
@@ -854,11 +900,14 @@ class SortableTable extends React.Component {
|
|
|
854
900
|
pagination={false}
|
|
855
901
|
showHeader={false}
|
|
856
902
|
dataSource={
|
|
857
|
-
onSearchSort
|
|
903
|
+
(onSearchSort
|
|
858
904
|
? sortDataSource.filter(
|
|
859
905
|
(item) => renderToString(item?.title)?.indexOf(onSearchSort) > -1,
|
|
860
906
|
)
|
|
861
|
-
: sortDataSource
|
|
907
|
+
: sortDataSource).map(item => ({
|
|
908
|
+
...item,
|
|
909
|
+
key: item.key || item.dataIndex
|
|
910
|
+
}))
|
|
862
911
|
}
|
|
863
912
|
columns={this.columns}
|
|
864
913
|
rowKey="key"
|
|
@@ -119,10 +119,10 @@ export const updateGuanDate = (requestParams: any, dateKeyParams: any = {}) => {
|
|
|
119
119
|
};
|
|
120
120
|
|
|
121
121
|
export const renderZeroInSummary = (value: any) =>
|
|
122
|
-
value != '0' ? value / 1000 : '-
|
|
122
|
+
value != '0' ? value / 1000 : '-';
|
|
123
123
|
|
|
124
124
|
export const calculateValidPeriod = (start: any, end: any) => {
|
|
125
|
-
return `${moment(end).diff(start, 'days')} 天` || '-
|
|
125
|
+
return `${moment(end).diff(start, 'days')} 天` || '-';
|
|
126
126
|
};
|
|
127
127
|
|
|
128
128
|
// 带有toptile 清提示 并且会换行的
|
|
@@ -144,7 +144,7 @@ export const handleTextLineFeed = (
|
|
|
144
144
|
width: number = 130,
|
|
145
145
|
) => {
|
|
146
146
|
return (
|
|
147
|
-
<Tooltip title={text || '-
|
|
147
|
+
<Tooltip title={text || '-'}>
|
|
148
148
|
<span
|
|
149
149
|
style={{
|
|
150
150
|
width: width ? width + 'px' : '130px',
|
|
@@ -154,7 +154,7 @@ export const handleTextLineFeed = (
|
|
|
154
154
|
top: '5px',
|
|
155
155
|
}}
|
|
156
156
|
>
|
|
157
|
-
{text || '-
|
|
157
|
+
{text || '-'}
|
|
158
158
|
</span>
|
|
159
159
|
</Tooltip>
|
|
160
160
|
);
|
|
@@ -166,7 +166,7 @@ export const handleTextOverflow = (
|
|
|
166
166
|
width: number = 130,
|
|
167
167
|
) => {
|
|
168
168
|
return (
|
|
169
|
-
<Tooltip title={text || '-
|
|
169
|
+
<Tooltip title={text || '-'}>
|
|
170
170
|
<span
|
|
171
171
|
style={{
|
|
172
172
|
width: width ? width + 'px' : '130px',
|
|
@@ -178,7 +178,7 @@ export const handleTextOverflow = (
|
|
|
178
178
|
top: '5px',
|
|
179
179
|
}}
|
|
180
180
|
>
|
|
181
|
-
{text || '-
|
|
181
|
+
{text || '-'}
|
|
182
182
|
</span>
|
|
183
183
|
</Tooltip>
|
|
184
184
|
);
|
|
@@ -325,12 +325,12 @@ export const userInfoCard = (props: any) => {
|
|
|
325
325
|
|
|
326
326
|
export function handleCommonTimeRenderHours(text: any, format?: any) {
|
|
327
327
|
const formatType = format || 'YYYY-MM-DD';
|
|
328
|
-
return (text && moment(text).format(formatType)) || '-
|
|
328
|
+
return (text && moment(text).format(formatType)) || '-';
|
|
329
329
|
}
|
|
330
330
|
|
|
331
331
|
export function handleCommonTimeRender(text: any, format?: any) {
|
|
332
332
|
const formatType = format || 'YYYY-MM-DD HH:mm:ss';
|
|
333
|
-
return (text && moment(text).format(formatType)) || '-
|
|
333
|
+
return (text && moment(text).format(formatType)) || '-';
|
|
334
334
|
}
|
|
335
335
|
|
|
336
336
|
interface ColumnsEditInterfave {
|
|
@@ -34,7 +34,7 @@ const CommodityEntry = (props: any) => {
|
|
|
34
34
|
|
|
35
35
|
const handleOk = () => {
|
|
36
36
|
// 方法获取当前组件内部的数据,然后进行自身的业务操作
|
|
37
|
-
const resultData = dataValidationRef.
|
|
37
|
+
const resultData = dataValidationRef.getValidateData();
|
|
38
38
|
|
|
39
39
|
if (!resultData.successData.length) {
|
|
40
40
|
message.error("无校验通过数据,请校验数据");
|
|
@@ -67,7 +67,7 @@ const CommodityEntry = (props: any) => {
|
|
|
67
67
|
<Modal {...modalProps} onOk={handleOk} onCancel={handleCancel} destroyOnClose={true} zIndex={15} {...otherModalProps} >
|
|
68
68
|
<DataValidation
|
|
69
69
|
{...props}
|
|
70
|
-
onRef={(ref) => { dataValidationRef
|
|
70
|
+
onRef={(ref) => { dataValidationRef = ref }}
|
|
71
71
|
columns={columns}
|
|
72
72
|
validDataUrl={validDataUrl}
|
|
73
73
|
isBrandAuth={isBrandAuth}
|
|
@@ -66,28 +66,19 @@
|
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
.white-card.bitsun-form-card-class {
|
|
69
|
-
.
|
|
69
|
+
.guidewrapper-body-wrapper {
|
|
70
70
|
background-color: #FFFFFF;
|
|
71
71
|
padding: 0px;
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
.bitsun-form-card-class {
|
|
76
|
-
&>.
|
|
76
|
+
&>.guidewrapper-body-wrapper {
|
|
77
77
|
margin-bottom: 10px;
|
|
78
78
|
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.bitsun-form-card-class {
|
|
82
|
-
.ant-card-head {
|
|
83
|
-
border: 0px;
|
|
84
|
-
padding: 0px;
|
|
85
|
-
height: 48px;
|
|
86
|
-
}
|
|
87
79
|
|
|
88
|
-
.
|
|
80
|
+
.guidewrapper-body-wrapper {
|
|
89
81
|
padding: 12px 0 0;
|
|
90
|
-
margin-top: -4px;
|
|
91
82
|
background-color: #F3F3F3;
|
|
92
83
|
}
|
|
93
84
|
|
|
@@ -97,7 +88,6 @@
|
|
|
97
88
|
font-size: 16px;
|
|
98
89
|
color: #000000;
|
|
99
90
|
font-weight: 600;
|
|
100
|
-
font-family: PingFangSC;
|
|
101
91
|
background-color: #FFFFFF;
|
|
102
92
|
padding: 8px 0;
|
|
103
93
|
margin: 0px;
|
|
@@ -106,7 +96,7 @@
|
|
|
106
96
|
display: inline-block;
|
|
107
97
|
width: 4px;
|
|
108
98
|
height: 100%;
|
|
109
|
-
background-color: #
|
|
99
|
+
background-color: #00A94E;
|
|
110
100
|
height: 20px;
|
|
111
101
|
margin-right: 16px;
|
|
112
102
|
}
|
|
@@ -114,8 +104,53 @@
|
|
|
114
104
|
}
|
|
115
105
|
|
|
116
106
|
.field-group-hidden {
|
|
117
|
-
.
|
|
107
|
+
.guidewrapper-body-wrapper {
|
|
118
108
|
display: none !important;
|
|
119
109
|
}
|
|
120
110
|
}
|
|
111
|
+
|
|
112
|
+
.bs-guidewrap-icon-wrap {
|
|
113
|
+
cursor: pointer;
|
|
114
|
+
color: #B6B6B6;
|
|
115
|
+
.bs-guidewrap-icon {
|
|
116
|
+
transition: transform 0.3s;
|
|
117
|
+
}
|
|
118
|
+
.bs-guidewrap-icon-toogle {
|
|
119
|
+
transform: rotate(180deg);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.guidewrapper-head-wrap {
|
|
125
|
+
padding-left: 16px;
|
|
126
|
+
height: 36px;
|
|
127
|
+
display: flex;
|
|
128
|
+
align-items: center;
|
|
129
|
+
justify-content: space-between;
|
|
130
|
+
background: #fff;
|
|
131
|
+
.guidewrapper-head-left {
|
|
132
|
+
display: flex;
|
|
133
|
+
align-items: center;
|
|
134
|
+
&::before {
|
|
135
|
+
content: '';
|
|
136
|
+
display: block;
|
|
137
|
+
width: 3px;
|
|
138
|
+
background: #02AA4C;
|
|
139
|
+
height: 20px;
|
|
140
|
+
}
|
|
141
|
+
.guidewrapper-head-title {
|
|
142
|
+
font-weight: 500;
|
|
143
|
+
font-size: 14px;
|
|
144
|
+
color: #000000;
|
|
145
|
+
padding: 0 6px;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
121
148
|
}
|
|
149
|
+
|
|
150
|
+
.guidewrapper-head-border {
|
|
151
|
+
border-bottom: 1px solid #F0F0F0;;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.guidewrapper-title-extra-wrap {
|
|
155
|
+
padding-left: 5px;
|
|
156
|
+
}
|
|
@@ -5,35 +5,57 @@ nav:
|
|
|
5
5
|
group:
|
|
6
6
|
title: 业务组件
|
|
7
7
|
order: 1
|
|
8
|
-
title: 模块导航容器组件
|
|
8
|
+
title: GuideWrapper 模块导航容器组件
|
|
9
9
|
order: 1
|
|
10
10
|
---
|
|
11
11
|
|
|
12
12
|
# GuideWrapper
|
|
13
13
|
|
|
14
|
-
|
|
15
14
|
## 容器模块导航
|
|
16
15
|
|
|
17
16
|
```tsx
|
|
18
17
|
import React, { useState } from 'react';
|
|
18
|
+
import { Space, Tag } from 'antd';
|
|
19
19
|
import { GuideWrapper } from '../../../index.ts';
|
|
20
20
|
|
|
21
21
|
export default () => {
|
|
22
22
|
const { Field } = GuideWrapper;
|
|
23
|
+
const titleExtra = (
|
|
24
|
+
<Space style={{ marginLeft: '5px' }}>
|
|
25
|
+
<Tag color="magenta">magenta</Tag>
|
|
26
|
+
<Tag color="red">red</Tag>
|
|
27
|
+
</Space>
|
|
28
|
+
);
|
|
23
29
|
|
|
24
30
|
return (
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
<
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
31
|
+
<GuideWrapper>
|
|
32
|
+
<Field
|
|
33
|
+
id="test1"
|
|
34
|
+
title="基础信息"
|
|
35
|
+
titleExtra={titleExtra}
|
|
36
|
+
extra={<a href="#">More</a>}
|
|
37
|
+
>
|
|
38
|
+
<div
|
|
39
|
+
style={{ height: '400px', textAlign: 'center', lineHeight: '400px' }}
|
|
40
|
+
>
|
|
41
|
+
模块一
|
|
42
|
+
</div>
|
|
43
|
+
</Field>
|
|
44
|
+
<Field id="test2" title="销售信息" isWhiteCard={true} bordered>
|
|
45
|
+
<div
|
|
46
|
+
style={{ height: '400px', textAlign: 'center', lineHeight: '400px' }}
|
|
47
|
+
>
|
|
48
|
+
模块二
|
|
49
|
+
</div>
|
|
50
|
+
</Field>
|
|
51
|
+
<Field id="test3" title="其他信息">
|
|
52
|
+
<div
|
|
53
|
+
style={{ height: '400px', textAlign: 'center', lineHeight: '400px' }}
|
|
54
|
+
>
|
|
55
|
+
模块三
|
|
56
|
+
</div>
|
|
57
|
+
</Field>
|
|
58
|
+
</GuideWrapper>
|
|
37
59
|
);
|
|
38
60
|
};
|
|
39
61
|
```
|
|
@@ -1,48 +1,55 @@
|
|
|
1
|
-
import React, { Component } from
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
import { DownCircleFilled } from '@ant-design/icons';
|
|
2
4
|
import dragImg from '../../../assets/drag.svg';
|
|
3
5
|
import label_icon_bottom from '../../../assets/label_icon_bottom.svg';
|
|
4
|
-
import arrow_top from '../../../assets/arrow_top.png';
|
|
5
6
|
import './index.less';
|
|
6
|
-
import classNames from "classnames";
|
|
7
7
|
|
|
8
|
-
const Field = ({ children, ...props }: any) => {
|
|
8
|
+
const Field = ({ children, titleExtra, title, extra, bordered, ...props }: any) => {
|
|
9
9
|
const [fieldGroupVisible, setVisible] = React.useState(true);
|
|
10
10
|
return (
|
|
11
11
|
<div
|
|
12
|
-
className={
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
12
|
+
className={classNames({
|
|
13
|
+
'bitsun-form-card-class': true,
|
|
14
|
+
'field-group-hidden': !fieldGroupVisible,
|
|
15
|
+
'white-card': props.isWhiteCard,
|
|
16
|
+
})}
|
|
18
17
|
id={props.id}
|
|
19
18
|
>
|
|
20
|
-
<div className=
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
transform: fieldGroupVisible ? 'inherit' : 'rotate(180deg)',
|
|
30
|
-
cursor: 'pointer'
|
|
31
|
-
}}
|
|
32
|
-
src={arrow_top}
|
|
19
|
+
<div className={
|
|
20
|
+
classNames({
|
|
21
|
+
'guidewrapper-head-wrap': true,
|
|
22
|
+
'guidewrapper-head-border': bordered,
|
|
23
|
+
})
|
|
24
|
+
}>
|
|
25
|
+
<div className="guidewrapper-head-left">
|
|
26
|
+
<div className="guidewrapper-head-title">{ title }</div>
|
|
27
|
+
<div
|
|
33
28
|
onClick={(e) => {
|
|
34
29
|
e.stopPropagation();
|
|
35
30
|
setVisible(!fieldGroupVisible);
|
|
36
31
|
}}
|
|
37
|
-
|
|
32
|
+
className="bs-guidewrap-icon-wrap"
|
|
33
|
+
>
|
|
34
|
+
<DownCircleFilled
|
|
35
|
+
className={classNames({
|
|
36
|
+
'bs-guidewrap-icon-toogle': fieldGroupVisible,
|
|
37
|
+
'bs-guidewrap-icon': true,
|
|
38
|
+
})}
|
|
39
|
+
/>
|
|
40
|
+
</div>
|
|
41
|
+
<div className='guidewrapper-title-extra-wrap'>
|
|
42
|
+
{titleExtra}
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
<div className="guidewrapper-head-right">
|
|
46
|
+
{extra}
|
|
38
47
|
</div>
|
|
39
48
|
</div>
|
|
40
|
-
<div className="
|
|
41
|
-
{children}
|
|
42
|
-
</div>
|
|
49
|
+
<div className="guidewrapper-body-wrapper">{children}</div>
|
|
43
50
|
</div>
|
|
44
|
-
)
|
|
45
|
-
}
|
|
51
|
+
);
|
|
52
|
+
};
|
|
46
53
|
|
|
47
54
|
export default class GuideWrapper extends Component {
|
|
48
55
|
static Field = Field;
|
|
@@ -50,45 +57,52 @@ export default class GuideWrapper extends Component {
|
|
|
50
57
|
const { children = [], ...props }: any = this.props;
|
|
51
58
|
// 兼容容器下只有一个dom元素非数组的情况
|
|
52
59
|
const domList = Array.isArray(children) ? children : [children];
|
|
53
|
-
let cardGroups = domList.filter(
|
|
60
|
+
let cardGroups = domList.filter(
|
|
61
|
+
(item: any) => item?.props?.id && item?.props?.title,
|
|
62
|
+
);
|
|
54
63
|
return (
|
|
55
64
|
<div {...props} className={classNames('guide-wrapper', props?.className)}>
|
|
56
65
|
{children}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
<div className='form-guide-top'>
|
|
66
|
+
{/* TODO:移除右侧固定栏,暂时注释,下个版本移除 */}
|
|
67
|
+
{/* <div className="form-guide">
|
|
68
|
+
<div className="form-guide-top">
|
|
61
69
|
<img width={24} src={dragImg} />
|
|
62
70
|
</div>
|
|
63
|
-
<div className=
|
|
64
|
-
{
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
71
|
+
<div className="form-guide-center">
|
|
72
|
+
{cardGroups.map((item: any) => {
|
|
73
|
+
return (
|
|
74
|
+
<span
|
|
75
|
+
className="form-guide-item"
|
|
76
|
+
onClick={() => {
|
|
77
|
+
let currentDom: any = document.getElementById(
|
|
78
|
+
item.props.id,
|
|
79
|
+
);
|
|
80
|
+
currentDom &&
|
|
81
|
+
currentDom.scrollIntoView({
|
|
82
|
+
block: 'center',
|
|
83
|
+
behavior: 'smooth',
|
|
84
|
+
});
|
|
72
85
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
+
// 高亮
|
|
87
|
+
let heightLight = currentDom.getElementsByClassName(
|
|
88
|
+
'ant-card-head-title',
|
|
89
|
+
);
|
|
90
|
+
heightLight[0].style.backgroundColor = '#2065c7';
|
|
91
|
+
setTimeout(() => {
|
|
92
|
+
heightLight[0].style.backgroundColor = '';
|
|
93
|
+
}, 800);
|
|
94
|
+
}}
|
|
95
|
+
>
|
|
96
|
+
{item.props.title}
|
|
97
|
+
</span>
|
|
98
|
+
);
|
|
99
|
+
})}
|
|
86
100
|
</div>
|
|
87
|
-
<div className=
|
|
101
|
+
<div className="form-guide-bottom">
|
|
88
102
|
<img width={24} src={label_icon_bottom} />
|
|
89
103
|
</div>
|
|
90
|
-
</div>
|
|
104
|
+
</div> */}
|
|
91
105
|
</div>
|
|
92
|
-
)
|
|
106
|
+
);
|
|
93
107
|
}
|
|
94
108
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
.detail_page_head {
|
|
2
|
-
|
|
2
|
+
padding: 8px 0;
|
|
3
3
|
z-index: 5;
|
|
4
4
|
display: flex;
|
|
5
5
|
align-items: center;
|
|
@@ -26,16 +26,16 @@
|
|
|
26
26
|
}
|
|
27
27
|
.detail_page_wrapper {
|
|
28
28
|
// padding-top: 51px;
|
|
29
|
-
|
|
29
|
+
height: calc(100vh - 80px);
|
|
30
30
|
background-color: #FFF;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
.back_home_img_content {
|
|
34
34
|
display: inline-block;
|
|
35
|
-
height:
|
|
36
|
-
width:
|
|
35
|
+
height: 24px;
|
|
36
|
+
width: 24px;
|
|
37
37
|
border: 1px solid #BABABA;
|
|
38
|
-
margin: 0
|
|
38
|
+
margin: 0 8px 0 16px;
|
|
39
39
|
border-radius: 14px;
|
|
40
40
|
display: flex;
|
|
41
41
|
align-items: center;
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
.back_home_img_content:hover {
|
|
50
|
-
background-color: #
|
|
51
|
-
border: 1px solid #
|
|
50
|
+
background-color: #00A94E;
|
|
51
|
+
border: 1px solid #00A94E;
|
|
52
52
|
.anticon-arrow-left {
|
|
53
53
|
color: #FFFFFF;
|
|
54
54
|
}
|
|
@@ -56,14 +56,16 @@
|
|
|
56
56
|
|
|
57
57
|
.detail_page_title_box {
|
|
58
58
|
flex-grow: 1;
|
|
59
|
+
display: flex;
|
|
60
|
+
align-items: center;
|
|
59
61
|
}
|
|
60
62
|
|
|
61
63
|
.detail_page_title {
|
|
62
64
|
height: 20px;
|
|
63
65
|
font-family: PingFangSC;
|
|
64
66
|
font-weight: 600;
|
|
65
|
-
font-size:
|
|
66
|
-
|
|
67
|
+
font-size: 14px;
|
|
68
|
+
padding-right: 10px;
|
|
67
69
|
color: #000000;
|
|
68
70
|
letter-spacing: 0;
|
|
69
71
|
line-height: 20px;
|
|
@@ -221,7 +221,7 @@ const DetailWrapper = React.memo(
|
|
|
221
221
|
};
|
|
222
222
|
|
|
223
223
|
return (
|
|
224
|
-
<div
|
|
224
|
+
<div ref={wrapperContainerRef}>
|
|
225
225
|
<div
|
|
226
226
|
className={'detail_page_head'}
|
|
227
227
|
style={{
|
|
@@ -233,7 +233,6 @@ const DetailWrapper = React.memo(
|
|
|
233
233
|
className={'back_home_img_content'}
|
|
234
234
|
onClick={() => {
|
|
235
235
|
go2BackAndClose(backHistoryPath);
|
|
236
|
-
// history.goBack();
|
|
237
236
|
}}
|
|
238
237
|
>
|
|
239
238
|
<ArrowLeftOutlined />
|
|
@@ -244,28 +243,8 @@ const DetailWrapper = React.memo(
|
|
|
244
243
|
{breadcrumbArr.map((item) => (
|
|
245
244
|
<Breadcrumb.Item
|
|
246
245
|
key={item}
|
|
247
|
-
onClick={() => {
|
|
248
|
-
// if (
|
|
249
|
-
// item.path &&
|
|
250
|
-
// !item.children &&
|
|
251
|
-
// !pathToRegexp(item.path).test(`${basePath}${pathname}`)
|
|
252
|
-
// ) {
|
|
253
|
-
// history.push({
|
|
254
|
-
// pathname: item.path.replace(basePath, ''),
|
|
255
|
-
// });
|
|
256
|
-
// }
|
|
257
|
-
}}
|
|
258
246
|
>
|
|
259
|
-
<span
|
|
260
|
-
style={{
|
|
261
|
-
// color:
|
|
262
|
-
// item.path &&
|
|
263
|
-
// pathToRegexp(item.path).test(`${basePath}${pathname}`)
|
|
264
|
-
// ? '#000000d9'
|
|
265
|
-
// : '',
|
|
266
|
-
}}
|
|
267
|
-
className="bread_name"
|
|
268
|
-
>
|
|
247
|
+
<span className="bread_name" >
|
|
269
248
|
{item}
|
|
270
249
|
</span>
|
|
271
250
|
</Breadcrumb.Item>
|
|
@@ -147,7 +147,7 @@ export function matchRoute(path, routeObj, hideRouteObj) {
|
|
|
147
147
|
export const getDetailMatchRoute = (path, routeObj, hideRouteArray, { pathToRegexp }) => {
|
|
148
148
|
const newPath = path.split('?')[0]
|
|
149
149
|
const hideRouteObj = {
|
|
150
|
-
[newPath]:
|
|
150
|
+
[newPath]: hideRouteArray.find((itemRoute) => pathToRegexp(itemRoute.path).test(newPath))
|
|
151
151
|
}
|
|
152
152
|
const matchedRoute = matchRoute(newPath, routeObj, hideRouteObj);
|
|
153
153
|
if (matchedRoute) {
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
.home_page_head {
|
|
2
|
-
height: 54px;
|
|
3
2
|
display: flex;
|
|
4
3
|
justify-content: space-between;
|
|
5
4
|
align-items: center;
|
|
6
5
|
background-color: #FFFFFF;
|
|
7
6
|
border-bottom: 1px solid #f0f0f0;
|
|
8
|
-
padding:
|
|
7
|
+
padding: 10px 20px;
|
|
8
|
+
.home_page_title_wrapper {
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
}
|
|
9
12
|
.home_page_title {
|
|
10
13
|
height: 20px;
|
|
11
14
|
font-family: PingFangSC-Medium;
|
|
@@ -15,7 +18,7 @@
|
|
|
15
18
|
letter-spacing: 0;
|
|
16
19
|
line-height: 20px;
|
|
17
20
|
flex-grow: 1;
|
|
18
|
-
|
|
21
|
+
padding-right: 10px;
|
|
19
22
|
}
|
|
20
23
|
.ant-breadcrumb {
|
|
21
24
|
display: block !important;
|