@bit-sun/business-component 4.0.11 → 4.0.12-alpha.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/.umirc.ts +10 -6
- package/dist/components/Business/BsSulaQueryTable/SearchItemSetting.d.ts +2 -4
- package/dist/components/Business/BsSulaQueryTable/utils.d.ts +1 -0
- package/dist/components/Business/SearchSelect/BusinessUtils.d.ts +2 -1
- package/dist/components/Functional/SearchSelect/utils.d.ts +11 -0
- package/dist/index.esm.js +1834 -967
- package/dist/index.js +1833 -966
- package/package.json +2 -2
- package/src/assets/copyImg.svg +16 -0
- package/src/assets/zhankaitiaojian-icon.svg +18 -0
- package/src/components/Business/BsLayouts/index.tsx +17 -0
- package/src/components/Business/BsSulaQueryTable/SearchItemSetting.tsx +45 -17
- package/src/components/Business/BsSulaQueryTable/index.less +21 -38
- package/src/components/Business/BsSulaQueryTable/index.tsx +26 -16
- package/src/components/Business/BsSulaQueryTable/setting.tsx +5 -5
- package/src/components/Business/BsSulaQueryTable/utils.tsx +36 -15
- package/src/components/Business/DetailPageWrapper/index.less +11 -3
- package/src/components/Business/DetailPageWrapper/index.tsx +27 -2
- package/src/components/Business/HomePageWrapper/index.less +9 -0
- package/src/components/Business/HomePageWrapper/index.tsx +1 -1
- package/src/components/Business/SearchSelect/BusinessUtils.tsx +834 -179
- package/src/components/Business/SearchSelect/index.md +181 -0
- package/src/components/Business/SearchSelect/index.tsx +2 -1
- package/src/components/Business/SearchSelect/utils.ts +4 -1
- package/src/components/Business/StateFlow/index.less +140 -124
- package/src/components/Business/StateFlow/index.tsx +3 -3
- package/src/components/Business/columnSettingTable/columnSetting.tsx +6 -6
- package/src/components/Business/columnSettingTable/index.less +33 -71
- package/src/components/Business/columnSettingTable/index.tsx +3 -4
- package/src/components/Business/columnSettingTable/sulaSettingTable.tsx +3 -5
- package/src/components/Common/ParagraphCopier/index.tsx +2 -6
- package/src/components/Functional/QueryMutipleInput/index.less +51 -19
- package/src/components/Functional/QueryMutipleInput/index.tsx +28 -22
- package/src/components/Functional/SearchSelect/index.less +236 -73
- package/src/components/Functional/SearchSelect/index.tsx +385 -259
- package/src/components/Functional/SearchSelect/utils.ts +35 -0
- package/src/components/Functional/TreeSearchSelect/index.tsx +1 -1
- package/src/components/Solution/RuleComponent/index.js +4 -3
- package/src/components/Solution/RuleSetter/function.ts +2 -1
- package/src/plugin/TableColumnSetting/index.less +38 -70
- package/src/plugin/TableColumnSetting/index.tsx +5 -5
- package/src/styles/bsDefault.less +132 -136
- package/src/utils/TableUtils.tsx +1 -1
- package/src/utils/utils.ts +5 -2
|
@@ -1,3 +1,38 @@
|
|
|
1
|
+
export const columnsPerRow = 4; // 每行的列数
|
|
2
|
+
export const ColSpan = 6; // 查询条件 每行col = 24 /columnsPerRow
|
|
1
3
|
export const handleSourceName = (sName: any) => {
|
|
2
4
|
return sName
|
|
3
5
|
}
|
|
6
|
+
|
|
7
|
+
export const getFormRowInfo = (list: any) => {
|
|
8
|
+
const totalRows = Math.ceil(list.length / columnsPerRow); // 计算总行数
|
|
9
|
+
const lastRowColumns = (list.length+1) % columnsPerRow; // 计算最后一行的实际列数
|
|
10
|
+
const emptySlots = lastRowColumns === 0 ? 0 : columnsPerRow - lastRowColumns; // 计算最后一行的空位数
|
|
11
|
+
const emptyArray = new Array(emptySlots).fill(null); // 生成长度为 emptySlots 的数组
|
|
12
|
+
return { totalRows, emptyArray }
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const defaultVisibleFieldsCount = 7;
|
|
16
|
+
export const getVisibleFieldsCount = (modalTableProps: any) => {
|
|
17
|
+
const { visibleFieldsCount = defaultVisibleFieldsCount, tableSearchForm } = modalTableProps || {};
|
|
18
|
+
let count = visibleFieldsCount;
|
|
19
|
+
if (count === true) {
|
|
20
|
+
return tableSearchForm?.length;
|
|
21
|
+
}
|
|
22
|
+
return count!;
|
|
23
|
+
}
|
|
24
|
+
export const hasMoreQueryFields = (modalTableProps: any) => {
|
|
25
|
+
const { tableSearchForm } = modalTableProps || {}
|
|
26
|
+
const visibleFieldsCount = getVisibleFieldsCount(modalTableProps);
|
|
27
|
+
return visibleFieldsCount < tableSearchForm?.length;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export const getRealStr = (oldSelect: any,newSelect: any, record: any) => {
|
|
31
|
+
return oldSelect?.length ? oldSelect.some((o: any) => o.value == record?.value) ? oldSelect.filter((s: any) => s.value != record?.value) : [...oldSelect,...newSelect] : newSelect;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export const getTableHeigth = (list: any) => {
|
|
35
|
+
const totalRows = Math.ceil((list?.length+1) / 4);
|
|
36
|
+
if(totalRows == 1) return 502; // modal弹窗760 调整为700 适应小屏
|
|
37
|
+
return 488 - totalRows*10
|
|
38
|
+
}
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
getPropertyCode,
|
|
34
34
|
isObj,
|
|
35
35
|
} from './util';
|
|
36
|
-
import { getDictionarySource, uuid } from '../../../utils/utils';
|
|
36
|
+
import { getDictionarySource, judgeIsEmpty, uuid } from '../../../utils/utils';
|
|
37
37
|
import { coverToParallel } from '../../../utils/TreeUtils';
|
|
38
38
|
import {
|
|
39
39
|
BusinessSearchSelect,
|
|
@@ -1062,7 +1062,7 @@ class RuleObjectComponent extends Component {
|
|
|
1062
1062
|
let defaultValue = configItem.defaultValue;
|
|
1063
1063
|
const pCode = itemDetail.response?.find((i) => i.code == code)?.value;
|
|
1064
1064
|
if (type === 'input') {
|
|
1065
|
-
return pCode === undefined ? pCode : pCode
|
|
1065
|
+
return pCode === undefined ? pCode : judgeIsEmpty(pCode) ? defaultValue : pCode;
|
|
1066
1066
|
}
|
|
1067
1067
|
if(['date','dateTime','rangeTime'].includes(type)) {
|
|
1068
1068
|
if(['date','dateTime'].includes(type)) return pCode ? moment(pCode) : pCode;
|
|
@@ -1075,7 +1075,8 @@ class RuleObjectComponent extends Component {
|
|
|
1075
1075
|
const newPCode = Array.isArray(pCode) ? pCode?.map(s => isObj(s) ? s : ({ key: s, value: s })) : pCode?.split(',')?.map(s => ({ key: s, value: s }));
|
|
1076
1076
|
return newPCode || pCode || defaultValue;
|
|
1077
1077
|
}
|
|
1078
|
-
return pCode || defaultValue;
|
|
1078
|
+
// return pCode || defaultValue;
|
|
1079
|
+
return judgeIsEmpty(pCode) ? defaultValue : pCode;
|
|
1079
1080
|
};
|
|
1080
1081
|
const handleEdit = (code, val, functionItem) => {
|
|
1081
1082
|
let value = val;
|
|
@@ -48,6 +48,7 @@
|
|
|
48
48
|
// }
|
|
49
49
|
// ]
|
|
50
50
|
// }
|
|
51
|
+
import { judgeIsEmpty } from '@/utils';
|
|
51
52
|
import { coverToParallel } from '@/utils/TreeUtils';
|
|
52
53
|
export const formatOperationList = (data: any) => {
|
|
53
54
|
let result = data||[];
|
|
@@ -105,7 +106,7 @@ export const handleRuleShowBack = (data: any, functionRuleList: any, ruleReturnL
|
|
|
105
106
|
if (Item) {
|
|
106
107
|
return {
|
|
107
108
|
...Item,
|
|
108
|
-
value: (isStringValue ? itemValue?.split(',') : itemValue)
|
|
109
|
+
value: judgeIsEmpty(itemValue) ? (defaultValue || '') : (isStringValue ? itemValue?.split(',') : itemValue),
|
|
109
110
|
formulaName: Item?.formulaName,
|
|
110
111
|
enable: Item?.enable !== false
|
|
111
112
|
};
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
// 列自定义
|
|
2
1
|
.sort_table_wrapper {
|
|
3
2
|
.sort_table {
|
|
4
3
|
display: flex;
|
|
5
4
|
|
|
6
5
|
.sort_table_column_wrapper {
|
|
7
6
|
width: 560px;
|
|
8
|
-
margin-right:
|
|
7
|
+
margin-right: 8px;
|
|
9
8
|
}
|
|
10
9
|
|
|
11
10
|
.sort_table_content_wrapper {
|
|
@@ -17,12 +16,12 @@
|
|
|
17
16
|
height: 20px;
|
|
18
17
|
font-family: PingFangSC-Regular;
|
|
19
18
|
font-weight: 400;
|
|
20
|
-
font-size:
|
|
19
|
+
font-size: 12px;
|
|
21
20
|
color: #000000;
|
|
22
21
|
letter-spacing: 0;
|
|
23
22
|
|
|
24
23
|
span {
|
|
25
|
-
color: #
|
|
24
|
+
color: #8E8E8E;
|
|
26
25
|
}
|
|
27
26
|
}
|
|
28
27
|
|
|
@@ -47,7 +46,7 @@
|
|
|
47
46
|
text-align: center;
|
|
48
47
|
font-family: PingFangSC-Regular;
|
|
49
48
|
font-weight: 400;
|
|
50
|
-
font-size:
|
|
49
|
+
font-size: 12px;
|
|
51
50
|
color: #848484;
|
|
52
51
|
}
|
|
53
52
|
}
|
|
@@ -58,22 +57,25 @@
|
|
|
58
57
|
height: 20px;
|
|
59
58
|
font-family: PingFangSC-Regular;
|
|
60
59
|
font-weight: 400;
|
|
61
|
-
font-size:
|
|
60
|
+
font-size: 12px;
|
|
62
61
|
color: #848484;
|
|
63
62
|
letter-spacing: 0;
|
|
64
63
|
}
|
|
65
64
|
|
|
66
65
|
.ant-checkbox-wrapper {
|
|
67
66
|
width: 144px;
|
|
67
|
+
height: 16px;
|
|
68
|
+
line-height: 16px;
|
|
68
69
|
margin-top: 16px;
|
|
69
70
|
}
|
|
70
71
|
|
|
71
|
-
.ant-checkbox-wrapper
|
|
72
|
+
.ant-checkbox-wrapper + .ant-checkbox-wrapper {
|
|
72
73
|
margin-left: 0px;
|
|
73
74
|
}
|
|
74
75
|
}
|
|
75
76
|
|
|
76
77
|
.sort_table_content {
|
|
78
|
+
height: 430px;
|
|
77
79
|
margin-top: 10px;
|
|
78
80
|
padding-top: 10px;
|
|
79
81
|
padding-bottom: 10px;
|
|
@@ -83,7 +85,6 @@
|
|
|
83
85
|
.ant-table-wrapper {
|
|
84
86
|
padding: 0px !important;
|
|
85
87
|
}
|
|
86
|
-
|
|
87
88
|
.sort_table_title {
|
|
88
89
|
height: 32px;
|
|
89
90
|
line-height: 32px;
|
|
@@ -92,29 +93,11 @@
|
|
|
92
93
|
}
|
|
93
94
|
}
|
|
94
95
|
}
|
|
95
|
-
|
|
96
|
-
div.ant-modal-header {
|
|
97
|
-
width: 820px;
|
|
98
|
-
height: 64px;
|
|
99
|
-
background: #ffffff;
|
|
100
|
-
padding: 20px;
|
|
101
|
-
border: 0px;
|
|
102
|
-
|
|
103
|
-
div.ant-modal-title {
|
|
104
|
-
height: 24px;
|
|
105
|
-
font-family: PingFangSC-Medium;
|
|
106
|
-
font-weight: 500;
|
|
107
|
-
font-size: 18px;
|
|
108
|
-
color: #000000;
|
|
109
|
-
letter-spacing: 0;
|
|
110
|
-
line-height: 24px;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
96
|
+
|
|
113
97
|
|
|
114
98
|
.ant-modal-body {
|
|
115
|
-
padding:
|
|
99
|
+
padding: 10px 16px;
|
|
116
100
|
}
|
|
117
|
-
|
|
118
101
|
.ant-modal-close-x {
|
|
119
102
|
height: 24px;
|
|
120
103
|
font-family: PingFangSC-Medium;
|
|
@@ -130,7 +113,7 @@
|
|
|
130
113
|
}
|
|
131
114
|
|
|
132
115
|
input {
|
|
133
|
-
height:
|
|
116
|
+
height: 22px;
|
|
134
117
|
padding: 6px 4px;
|
|
135
118
|
border-radius: 5px;
|
|
136
119
|
}
|
|
@@ -138,34 +121,33 @@
|
|
|
138
121
|
.ant-input-prefix {
|
|
139
122
|
width: 24px;
|
|
140
123
|
height: 24px;
|
|
141
|
-
margin: 4px;
|
|
124
|
+
margin: 0 4px;
|
|
142
125
|
// border: 1px dashed #d9d9d9;
|
|
143
126
|
display: flex;
|
|
144
127
|
justify-content: center;
|
|
145
128
|
}
|
|
146
129
|
|
|
147
130
|
.ant-modal-footer {
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
131
|
+
padding: 8px 16px;
|
|
132
|
+
display: flex;
|
|
133
|
+
justify-content: space-between;
|
|
134
|
+
|
|
152
135
|
.ant-btn {
|
|
153
136
|
width: 80px;
|
|
154
|
-
height:
|
|
155
|
-
border-radius: 5px;
|
|
137
|
+
height: 28px;
|
|
156
138
|
|
|
157
139
|
span {
|
|
158
140
|
font-family: PingFangSC-Medium;
|
|
159
141
|
font-weight: 600;
|
|
160
|
-
font-size:
|
|
142
|
+
font-size: 12px;
|
|
161
143
|
letter-spacing: 0;
|
|
162
144
|
text-align: center;
|
|
163
145
|
line-height: 20px;
|
|
164
146
|
}
|
|
165
147
|
|
|
166
|
-
&:first-child {
|
|
167
|
-
|
|
168
|
-
}
|
|
148
|
+
// &:first-child {
|
|
149
|
+
// margin-right: 524px;
|
|
150
|
+
// }
|
|
169
151
|
}
|
|
170
152
|
}
|
|
171
153
|
|
|
@@ -180,21 +162,26 @@
|
|
|
180
162
|
padding-bottom: 50px;
|
|
181
163
|
|
|
182
164
|
tr {
|
|
183
|
-
height:
|
|
184
|
-
|
|
165
|
+
height: 30px;
|
|
185
166
|
td {
|
|
186
167
|
width: 24px !important;
|
|
187
|
-
height:
|
|
168
|
+
height: 30px !important;
|
|
188
169
|
font-family: PingFangSC-Regular;
|
|
189
170
|
font-weight: 400;
|
|
190
|
-
font-size:
|
|
171
|
+
font-size: 12px;
|
|
191
172
|
color: #000000;
|
|
192
173
|
letter-spacing: 0;
|
|
193
174
|
|
|
194
175
|
&:first-child {
|
|
195
176
|
padding-left: 10px !important;
|
|
196
177
|
padding-right: 0px !important;
|
|
197
|
-
width:
|
|
178
|
+
width: 108px !important;
|
|
179
|
+
display: inline-block;
|
|
180
|
+
overflow: hidden;
|
|
181
|
+
text-overflow: ellipsis;
|
|
182
|
+
white-space: nowrap;
|
|
183
|
+
height: 30px !important;
|
|
184
|
+
line-height: 30px !important;
|
|
198
185
|
}
|
|
199
186
|
|
|
200
187
|
img {
|
|
@@ -210,7 +197,7 @@
|
|
|
210
197
|
&:last-child {
|
|
211
198
|
padding-left: 0px !important;
|
|
212
199
|
padding-right: 3px !important;
|
|
213
|
-
width:
|
|
200
|
+
width: 30px !important;
|
|
214
201
|
|
|
215
202
|
img {
|
|
216
203
|
// border: 1px dashed #d9d9d9;
|
|
@@ -221,27 +208,8 @@
|
|
|
221
208
|
}
|
|
222
209
|
}
|
|
223
210
|
}
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
.row-dragging {
|
|
231
|
-
background: #fafafa;
|
|
232
|
-
border: 1px solid #ccc;
|
|
233
|
-
z-index: 10000;
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
.row-dragging td {
|
|
237
|
-
padding: 7px 16px;
|
|
238
|
-
display: none;
|
|
239
|
-
|
|
240
|
-
}
|
|
241
|
-
.row-dragging td:first-child {
|
|
242
|
-
display: inline-block;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
.row-dragging .drag-visible {
|
|
246
|
-
visibility: visible;
|
|
247
|
-
}
|
|
211
|
+
|
|
212
|
+
.ant-dropdown-link {
|
|
213
|
+
cursor: pointer;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
@@ -525,7 +525,7 @@ class TableColumnSetting extends React.Component<TableColumnSettingProps> {
|
|
|
525
525
|
return (
|
|
526
526
|
<div className={'sort_table_wrapper'}>
|
|
527
527
|
<Modal
|
|
528
|
-
title="
|
|
528
|
+
title="筛选条件设置"
|
|
529
529
|
wrapClassName={'sort_table_wrapper'}
|
|
530
530
|
width={820}
|
|
531
531
|
visible={visible}
|
|
@@ -546,15 +546,15 @@ class TableColumnSetting extends React.Component<TableColumnSettingProps> {
|
|
|
546
546
|
<div className={'sort_table'}>
|
|
547
547
|
<div className={'sort_table_column_wrapper'}>
|
|
548
548
|
<span className={'sort_table_column_count'}>
|
|
549
|
-
|
|
549
|
+
<span>勾选你想使用的筛选条件</span>
|
|
550
550
|
</span>
|
|
551
551
|
<div className={'sort_table_column'}>
|
|
552
552
|
<Input
|
|
553
553
|
prefix={<SearchOutlined className="site-form-item-icon" />}
|
|
554
|
-
placeholder="
|
|
554
|
+
placeholder="输入筛选条件名称搜索"
|
|
555
555
|
allowClear
|
|
556
556
|
onChange={this.onSearch}
|
|
557
|
-
style={{ width:
|
|
557
|
+
style={{ width: 525 }}
|
|
558
558
|
/>
|
|
559
559
|
<div>
|
|
560
560
|
{!searchDataSource && (
|
|
@@ -678,7 +678,7 @@ class TableColumnSetting extends React.Component<TableColumnSettingProps> {
|
|
|
678
678
|
</div>
|
|
679
679
|
<div className={'sort_table_content_wrapper'}>
|
|
680
680
|
<span className={'sort_table_content_count'}>
|
|
681
|
-
|
|
681
|
+
<span>已选择的搜索条件排序</span>
|
|
682
682
|
</span>
|
|
683
683
|
<div className={'sort_table_content'}>
|
|
684
684
|
<span style={{ paddingLeft: '10px' }}>
|