@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.
Files changed (143) hide show
  1. package/.umirc.ts +3 -2
  2. package/dist/components/Business/AddSelectBusiness/index.d.ts +4 -4
  3. package/dist/components/Business/BsLayouts/Components/AllFunc/drawContent.d.ts +2 -2
  4. package/dist/components/Business/BsLayouts/Components/ChooseStore/index.d.ts +2 -2
  5. package/dist/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.d.ts +1 -1
  6. package/dist/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/leftTree.d.ts +1 -1
  7. package/dist/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/rightTree.d.ts +2 -2
  8. package/dist/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/DrawContent.d.ts +2 -2
  9. package/dist/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/customMenuHeader.d.ts +2 -2
  10. package/dist/components/Business/BsLayouts/Components/CustomerMenu/index.d.ts +1 -1
  11. package/dist/components/Business/BsLayouts/Components/GlobalHeader/index.d.ts +2 -2
  12. package/dist/components/Business/BsLayouts/Components/RightContent/LoginModal.d.ts +2 -2
  13. package/dist/components/Business/BsLayouts/index.d.ts +1 -1
  14. package/dist/components/Business/BsSulaQueryTable/SearchItemSetting.d.ts +5 -5
  15. package/dist/components/Business/BsSulaQueryTable/index.d.ts +2 -2
  16. package/dist/components/Business/BsSulaQueryTable/setting.d.ts +7 -7
  17. package/dist/components/Business/BsSulaQueryTable/utils.d.ts +15 -15
  18. package/dist/components/Business/CommodityEntry/index.d.ts +2 -2
  19. package/dist/components/Business/CommonAlert/index.d.ts +2 -2
  20. package/dist/components/Business/CommonGuideWrapper/index.d.ts +3 -3
  21. package/dist/components/Business/DetailPageWrapper/index.d.ts +6 -6
  22. package/dist/components/Business/HomePageWrapper/index.d.ts +2 -2
  23. package/dist/components/Business/JsonQueryTable/components/FieldsModifyModal.d.ts +2 -2
  24. package/dist/components/Business/JsonQueryTable/components/FieldsSettingsTable.d.ts +2 -2
  25. package/dist/components/Business/JsonQueryTable/components/Formula.d.ts +2 -2
  26. package/dist/components/Business/JsonQueryTable/components/MaintainOptions.d.ts +2 -2
  27. package/dist/components/Business/JsonQueryTable/drawer/index.d.ts +2 -2
  28. package/dist/components/Business/SearchSelect/index.d.ts +1 -1
  29. package/dist/components/Business/StateFlow/index.d.ts +2 -2
  30. package/dist/components/Business/TreeSearchSelect/index.d.ts +1 -1
  31. package/dist/components/Business/columnSettingTable/columnSetting.d.ts +7 -7
  32. package/dist/components/Business/columnSettingTable/index.d.ts +3 -2
  33. package/dist/components/Business/columnSettingTable/sulaSettingTable.d.ts +2 -2
  34. package/dist/components/Business/columnSettingTable/utils.d.ts +2 -2
  35. package/dist/components/Business/moreTreeTable/FixedScrollBar.d.ts +1 -1
  36. package/dist/components/Common/ExtendedCollapse/ExtendedPanel.d.ts +10 -0
  37. package/dist/components/Common/ExtendedCollapse/index.d.ts +7 -0
  38. package/dist/components/Common/ParagraphCopier/index.d.ts +8 -0
  39. package/dist/components/Common/Section/index.d.ts +29 -0
  40. package/dist/components/Functional/AddSelect/index.d.ts +2 -2
  41. package/dist/components/Functional/AuthButton/index.d.ts +2 -2
  42. package/dist/components/Functional/DataImport/index.d.ts +3 -3
  43. package/dist/components/Functional/DataValidation/index.d.ts +3 -3
  44. package/dist/components/Functional/ExportFunctions/ExportIcon/index.d.ts +2 -2
  45. package/dist/components/Functional/QueryMutipleInput/index.d.ts +4 -3
  46. package/dist/components/Functional/SearchSelect/index.d.ts +1 -1
  47. package/dist/components/Functional/TreeSearchSelect/index.d.ts +2 -2
  48. package/dist/components/Solution/RuleComponent/Formula.d.ts +2 -2
  49. package/dist/components/Solution/RuleComponent/InnerSelect.d.ts +2 -2
  50. package/dist/components/Solution/RuleComponent/RenderCompItem.d.ts +2 -2
  51. package/dist/components/Solution/RuleSetter/RuleInstance.d.ts +2 -2
  52. package/dist/components/Solution/RuleSetter/baseRule.d.ts +1 -1
  53. package/dist/components/Solution/RuleSetter/index.d.ts +1 -1
  54. package/dist/index.d.ts +3 -0
  55. package/dist/index.esm.js +1158 -1849
  56. package/dist/index.js +1158 -1850
  57. package/dist/plugin/TableColumnSetting/index.d.ts +6 -5
  58. package/dist/utils/TableUtils.d.ts +19 -19
  59. package/dist/utils/requestUtils.d.ts +0 -1
  60. package/dist/utils/utils.d.ts +0 -3
  61. package/lib/assets/exportFail.svg +9 -9
  62. package/lib/assets/exportProcessing.svg +9 -9
  63. package/lib/assets/exportSuccess.svg +9 -9
  64. package/package.json +15 -16
  65. package/src/assets/caidan.svg +1 -1
  66. package/src/assets/exportFail.svg +9 -9
  67. package/src/assets/exportProcessing.svg +9 -9
  68. package/src/assets/exportSuccess.svg +9 -9
  69. package/src/assets/fixed-left-active.svg +1 -1
  70. package/src/assets/fixed-right-active.svg +1 -1
  71. package/src/components/Business/AddSelectBusiness/index.md +11 -5
  72. package/src/components/Business/AddSelectBusiness/index.tsx +5 -56
  73. package/src/components/Business/BsLayouts/Components/AllFunc/drawContent.tsx +1 -1
  74. package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/DrawContent.tsx +1 -1
  75. package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/drawContent.less +2 -2
  76. package/src/components/Business/BsLayouts/Components/GlobalHeader/index.less +1 -1
  77. package/src/components/Business/BsLayouts/Components/RightContent/home.less +1 -1
  78. package/src/components/Business/BsLayouts/Components/SearchFunc/index.less +3 -3
  79. package/src/components/Business/BsLayouts/index.tsx +4 -9
  80. package/src/components/Business/BsSulaQueryTable/SearchItemSetting.tsx +2 -1
  81. package/src/components/Business/BsSulaQueryTable/index.md +113 -0
  82. package/src/components/Business/BsSulaQueryTable/index.tsx +240 -162
  83. package/src/components/Business/BsSulaQueryTable/setting.tsx +52 -3
  84. package/src/components/Business/BsSulaQueryTable/utils.less +1 -1
  85. package/src/components/Business/BsSulaQueryTable/utils.tsx +8 -8
  86. package/src/components/Business/CommodityEntry/index.tsx +2 -2
  87. package/src/components/Business/CommonAlert/index.tsx +1 -1
  88. package/src/components/Business/CommonGuideWrapper/index.less +50 -15
  89. package/src/components/Business/CommonGuideWrapper/index.md +36 -14
  90. package/src/components/Business/CommonGuideWrapper/index.tsx +73 -59
  91. package/src/components/Business/DetailPageWrapper/index.less +11 -9
  92. package/src/components/Business/DetailPageWrapper/index.tsx +2 -23
  93. package/src/components/Business/DetailPageWrapper/utils.tsx +1 -1
  94. package/src/components/Business/HomePageWrapper/index.less +6 -3
  95. package/src/components/Business/HomePageWrapper/index.md +2 -2
  96. package/src/components/Business/HomePageWrapper/index.tsx +5 -37
  97. package/src/components/Business/JsonQueryTable/components/FieldsSettingsTable.tsx +2 -2
  98. package/src/components/Business/SearchSelect/BusinessUtils.tsx +40 -38
  99. package/src/components/Business/SearchSelect/index.md +0 -58
  100. package/src/components/Business/SearchSelect/utils.ts +2 -2
  101. package/src/components/Business/StateFlow/index.less +3 -3
  102. package/src/components/Business/TreeSearchSelect/index.md +0 -28
  103. package/src/components/Business/TreeSearchSelect/utils.ts +0 -11
  104. package/src/components/Business/columnSettingTable/columnSetting.tsx +65 -13
  105. package/src/components/Business/columnSettingTable/index.md +1 -15
  106. package/src/components/Business/columnSettingTable/index.tsx +14 -4
  107. package/src/components/Business/columnSettingTable/sulaSettingTable.tsx +5 -4
  108. package/src/components/Business/columnSettingTable/utils.tsx +2 -2
  109. package/src/components/Common/ExtendedCollapse/ExtendedPanel.tsx +51 -0
  110. package/src/components/Common/ExtendedCollapse/index.less +33 -0
  111. package/src/components/Common/ExtendedCollapse/index.md +136 -0
  112. package/src/components/Common/ExtendedCollapse/index.tsx +25 -0
  113. package/src/components/Common/ParagraphCopier/index.md +81 -0
  114. package/src/components/Common/ParagraphCopier/index.tsx +56 -0
  115. package/src/components/Common/Section/index.md +120 -0
  116. package/src/components/Common/Section/index.module.less +16 -0
  117. package/src/components/Common/Section/index.tsx +70 -0
  118. package/src/components/Functional/AddSelect/index.tsx +29 -19
  119. package/src/components/Functional/BillEntry/index.tsx +11 -10
  120. package/src/components/Functional/DataImport/index.tsx +2 -1
  121. package/src/components/Functional/DataValidation/index.tsx +3 -3
  122. package/src/components/Functional/QueryMutipleInput/index.tsx +13 -4
  123. package/src/components/Functional/SearchSelect/index.tsx +3 -10
  124. package/src/components/Solution/RuleComponent/InnerSelect.tsx +1 -0
  125. package/src/components/Solution/RuleComponent/RenderCompItem.tsx +30 -46
  126. package/src/components/Solution/RuleComponent/index.js +18 -13
  127. package/src/components/Solution/RuleComponent/ruleFiled.js +41 -123
  128. package/src/index.ts +5 -0
  129. package/src/plugin/TableColumnSetting/index.tsx +75 -9
  130. package/src/styles/bsDefault.less +26 -18
  131. package/src/utils/TableUtils.less +1 -1
  132. package/src/utils/businessUtils.ts +2 -2
  133. package/src/utils/requestUtils.ts +2 -6
  134. package/src/utils/utils.ts +6 -35
  135. package/src/utils/xlsxUtil.tsx +2 -2
  136. package/tsconfig.json +2 -1
  137. package/dist/components/Solution/RuleComponent/CustomPlugin/CustomSelector/CustomSelectorModal.d.ts +0 -3
  138. package/dist/components/Solution/RuleComponent/CustomPlugin/CustomSelector/helps.d.ts +0 -2
  139. package/dist/components/Solution/RuleComponent/CustomPlugin/CustomSelector/index.d.ts +0 -3
  140. package/src/components/Solution/RuleComponent/CustomPlugin/CustomSelector/CustomSelectorModal.tsx +0 -358
  141. package/src/components/Solution/RuleComponent/CustomPlugin/CustomSelector/function.js +0 -255
  142. package/src/components/Solution/RuleComponent/CustomPlugin/CustomSelector/helps.tsx +0 -58
  143. 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.patchUserColumnConfig('');
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"
@@ -52,7 +52,7 @@
52
52
  margin: 0 0 5px !important;
53
53
  }
54
54
  .card_department {
55
- color: #005cff !important;
55
+ color: #00A94E !important;
56
56
  }
57
57
 
58
58
  .user_info_card {
@@ -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.current?.getValidateData();
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.current = ref }}
70
+ onRef={(ref) => { dataValidationRef = ref }}
71
71
  columns={columns}
72
72
  validDataUrl={validDataUrl}
73
73
  isBrandAuth={isBrandAuth}
@@ -8,7 +8,7 @@ export default (props: any) => {
8
8
  <div style={{ width: '100%', background: '#fff', padding: '0 20px' }} className={'common_Alert'}>
9
9
  <Alert
10
10
  style={{
11
- borderColor: '#005CFF',
11
+ borderColor: '#00A94E',
12
12
  background: '#e5eeff',
13
13
  borderRadius: '4px',
14
14
  }}
@@ -66,28 +66,19 @@
66
66
  }
67
67
 
68
68
  .white-card.bitsun-form-card-class {
69
- .ant-card-body {
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
- &>.ant-card-body {
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
- .ant-card-body {
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: #005CFF;
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
- .ant-card-body {
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
- <GuideWrapper>
26
- <Field id='test1' title='基础信息'>
27
- <div style={{height: '400px', textAlign:'center', lineHeight: '400px'}}>模块一</div>
28
- </Field>
29
- <Field id='test2' title='销售信息' isWhiteCard={true}>
30
- <div style={{height: '400px', textAlign:'center', lineHeight: '400px'}}>模块二</div>
31
- </Field>
32
- <Field id='test3' title='其他信息'>
33
- <div style={{height: '400px', textAlign:'center', lineHeight: '400px'}}>模块三</div>
34
- </Field>
35
- </GuideWrapper>
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 "react";
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
- `bitsun-form-card-class
14
- ${fieldGroupVisible ? '' : 'field-group-hidden'}
15
- ${props.isWhiteCard ? 'white-card' : ''}
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="ant-card-head">
21
- <div className="ant-card-head-title">
22
- <span className='title-left-line'></span>
23
- <span style={{ marginRight: '5px' }}>
24
- {props?.title}
25
- </span>
26
- <img
27
- width={24}
28
- style={{
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="ant-card-body">
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((item:any) => item?.props?.id && item?.props?.title);
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
- <div
58
- className='form-guide'
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='form-guide-center'>
64
- {
65
- cardGroups.map((item:any) => {
66
- return (
67
- <span
68
- className='form-guide-item'
69
- onClick={() => {
70
- let currentDom: any = document.getElementById(item.props.id);
71
- currentDom && currentDom.scrollIntoView({ block: 'center', behavior: 'smooth' });
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
- let heightLight = currentDom.getElementsByClassName('ant-card-head-title')
75
- heightLight[0].style.backgroundColor = '#2065c7'
76
- setTimeout(() => {
77
- heightLight[0].style.backgroundColor = ''
78
- }, 800);
79
- }}
80
- >
81
- {item.props.title}
82
- </span>
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='form-guide-bottom'>
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
- height: 54px;
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
- min-height: calc(100vh - 80px);
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: 28px;
36
- width: 28px;
35
+ height: 24px;
36
+ width: 24px;
37
37
  border: 1px solid #BABABA;
38
- margin: 0 12px 0 20px;
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: #005CFF;
51
- border: 1px solid #005CFF;
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: 16px;
66
- margin-top: 2px;
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 style={{ height: '54px' }} ref={wrapperContainerRef}>
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]: Array.isArray(hideRouteArray) && hideRouteArray?.find((itemRoute) => pathToRegexp(itemRoute.path).test(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: 0 20px;
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
- margin-top: 2px;
21
+ padding-right: 10px;
19
22
  }
20
23
  .ant-breadcrumb {
21
24
  display: block !important;