@bit-sun/business-component 4.0.11 → 4.0.12-alpha.3
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 +1910 -980
- package/dist/index.js +1909 -979
- 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 +31 -69
- package/src/components/Business/columnSettingTable/index.tsx +36 -6
- package/src/components/Business/columnSettingTable/sulaSettingTable.tsx +36 -7
- 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 +400 -263
- 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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bit-sun/business-component",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.12-alpha.3",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"start": "dumi dev",
|
|
6
6
|
"docs:build": "dumi build",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"antd": "^4.17.2",
|
|
31
|
-
"bssula": "4.0.
|
|
31
|
+
"bssula": "4.0.12-alpha.6",
|
|
32
32
|
"umi-plugin-bssula": "4.0.8-alpha.3",
|
|
33
33
|
"umi": "^3.5.20",
|
|
34
34
|
"@ant-design/pro-layout": "^6.5.0",
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
+
<title>编组 28</title>
|
|
4
|
+
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
5
|
+
<g id="单据-详情页订单金额信息" transform="translate(-418.000000, -1210.000000)">
|
|
6
|
+
<g id="编组-2" transform="translate(280.000000, 998.000000)">
|
|
7
|
+
<g id="编组" transform="translate(0.000000, 204.000000)">
|
|
8
|
+
<g id="编组-28" transform="translate(138.000000, 8.000000)">
|
|
9
|
+
<rect id="矩形" stroke="#979797" fill="#005CFF" opacity="0" x="0.5" y="0.5" width="23" height="23"></rect>
|
|
10
|
+
<path d="M13.5,9 C14.3284271,9 15,9.67157287 15,10.5 L15,18.5 C15,19.3284271 14.3284271,20 13.5,20 L5.5,20 C4.67157288,20 4,19.3284271 4,18.5 L4,10.5 C4,9.67157287 4.67157288,9 5.5,9 L13.5,9 Z M13.5,10.5 L5.5,10.5 L5.5,18.5 L13.5,18.5 L13.5,10.5 Z M12,15 L12,16.5 L7,16.5 L7,15 L12,15 Z M18.5,4 C19.3284271,4 20,4.67157288 20,5.5 L20,13.5 C20,14.3284271 19.3284271,15 18.5,15 L16,15 L16,13.5 L18.5,13.5 L18.5,5.5 L10.5,5.5 L10.5,8 L9,8 L9,5.5 C9,4.67157288 9.67157287,4 10.5,4 L18.5,4 Z M12,12.5 L12,14 L7,14 L7,12.5 L12,12.5 Z" id="形状" fill="#005CFF" fill-rule="nonzero"></path>
|
|
11
|
+
</g>
|
|
12
|
+
</g>
|
|
13
|
+
</g>
|
|
14
|
+
</g>
|
|
15
|
+
</g>
|
|
16
|
+
</svg>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
+
<title>zhankaitiaojian-icon</title>
|
|
4
|
+
<defs>
|
|
5
|
+
<rect id="path-1" x="0" y="0" width="24" height="24"></rect>
|
|
6
|
+
</defs>
|
|
7
|
+
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
8
|
+
<g id="icon" transform="translate(-702.000000, -498.000000)">
|
|
9
|
+
<g id="zhankaitiaojian-icon" transform="translate(702.000000, 498.000000)">
|
|
10
|
+
<mask id="mask-2" fill="white">
|
|
11
|
+
<use xlink:href="#path-1"></use>
|
|
12
|
+
</mask>
|
|
13
|
+
<use id="蒙版" fill="#D8D8D8" opacity="0" xlink:href="#path-1"></use>
|
|
14
|
+
<path d="M12.0142082,6 L18,11.9972435 L12.0142082,18 L11.04209,17.0260337 L16.0562218,11.9972435 L11.04209,6.97396631 L12.0142082,6 Z M6.97257658,6 L12.9583683,11.9972435 L6.97257658,18 L6.00091666,17.0260337 L11.0150485,11.9972435 L6,6.97396631 L6.97257658,6 Z" id="形状" fill="#005CFF" fill-rule="nonzero" mask="url(#mask-2)" transform="translate(12.000000, 12.000000) rotate(-270.000000) translate(-12.000000, -12.000000) "></path>
|
|
15
|
+
</g>
|
|
16
|
+
</g>
|
|
17
|
+
</g>
|
|
18
|
+
</svg>
|
|
@@ -507,11 +507,24 @@ class BasicLayout extends React.PureComponent {
|
|
|
507
507
|
query: route.query,
|
|
508
508
|
match: match,
|
|
509
509
|
key: currentKey,
|
|
510
|
+
state: route.state,
|
|
510
511
|
tab: this.getPageTitle(route.pathname) + '',
|
|
511
512
|
},
|
|
512
513
|
];
|
|
513
514
|
newListenRouterKey = [...listenRouterKey, currentKey];
|
|
514
515
|
}
|
|
516
|
+
} else {
|
|
517
|
+
// 更新已存储路由的query和state
|
|
518
|
+
newListenRouterState = newListenRouterState.map(item => {
|
|
519
|
+
if (item.key === currentKey) {
|
|
520
|
+
return {
|
|
521
|
+
...item,
|
|
522
|
+
query: route.query,
|
|
523
|
+
state: route.state,
|
|
524
|
+
};
|
|
525
|
+
}
|
|
526
|
+
return item;
|
|
527
|
+
})
|
|
515
528
|
}
|
|
516
529
|
|
|
517
530
|
// -------------------处理页签关闭----------------------------
|
|
@@ -1507,6 +1520,7 @@ class BasicLayout extends React.PureComponent {
|
|
|
1507
1520
|
getDictionaryTextByValue={this.getDictionaryTextByValue}
|
|
1508
1521
|
timeFormat={this.timeFormat}
|
|
1509
1522
|
transparentProps={transparentProps}
|
|
1523
|
+
activeKey={activeKey}
|
|
1510
1524
|
/>
|
|
1511
1525
|
</TabPane>
|
|
1512
1526
|
))}
|
|
@@ -1559,6 +1573,9 @@ class WrapperComponent extends React.Component {
|
|
|
1559
1573
|
if (window.__POWERED_BY_WUJIE__ && nextProps?.item?.key?.indexOf('edit-template-template') > -1) { // 适配wujie环境主应用下渲染打印编辑器
|
|
1560
1574
|
return true
|
|
1561
1575
|
}
|
|
1576
|
+
if (nextProps.activeKey === nextProps.item.key && JSON.stringify(nextProps.item) !== JSON.stringify(this.props.item)) {
|
|
1577
|
+
return true;
|
|
1578
|
+
}
|
|
1562
1579
|
return false;
|
|
1563
1580
|
}
|
|
1564
1581
|
render() {
|
|
@@ -204,7 +204,6 @@ class SearchItemTable extends React.Component {
|
|
|
204
204
|
title: '搜索字段名称',
|
|
205
205
|
dataIndex: 'label',
|
|
206
206
|
className: 'drag-visible',
|
|
207
|
-
width: 100,
|
|
208
207
|
},
|
|
209
208
|
{
|
|
210
209
|
title: '删除',
|
|
@@ -212,15 +211,16 @@ class SearchItemTable extends React.Component {
|
|
|
212
211
|
render: (text, record) => {
|
|
213
212
|
return (
|
|
214
213
|
<span
|
|
214
|
+
style={{paddingLeft: '46px'}}
|
|
215
215
|
onClick={() => {
|
|
216
216
|
this.setState({
|
|
217
217
|
sortDataSource: this.state.sortDataSource.filter((item) => {
|
|
218
|
-
return item.
|
|
218
|
+
return item.name !== record.name;
|
|
219
219
|
}),
|
|
220
220
|
isDefaultValue: false,
|
|
221
221
|
dataSource: [
|
|
222
222
|
...this.state.dataSource.map((item) => {
|
|
223
|
-
if (item.
|
|
223
|
+
if (item.name === record.name) {
|
|
224
224
|
return {
|
|
225
225
|
...item,
|
|
226
226
|
hidden: true,
|
|
@@ -265,6 +265,7 @@ class SearchItemTable extends React.Component {
|
|
|
265
265
|
console.log(e);
|
|
266
266
|
this.setState({
|
|
267
267
|
visible: false,
|
|
268
|
+
searchDataSource: '',
|
|
268
269
|
});
|
|
269
270
|
};
|
|
270
271
|
|
|
@@ -326,17 +327,17 @@ class SearchItemTable extends React.Component {
|
|
|
326
327
|
return <SortableItem index={index} {...restProps} />;
|
|
327
328
|
};
|
|
328
329
|
|
|
329
|
-
onChange = (e: CheckboxChangeEvent,
|
|
330
|
+
onChange = (e: CheckboxChangeEvent, name) => {
|
|
330
331
|
const { sortDataSource, dataSource } = this.state;
|
|
331
332
|
if (!e.target.checked) {
|
|
332
333
|
this.setState({
|
|
333
334
|
sortDataSource: sortDataSource.filter((item) => {
|
|
334
|
-
return item.
|
|
335
|
+
return item.name !== name;
|
|
335
336
|
}),
|
|
336
337
|
isDefaultValue: false,
|
|
337
338
|
dataSource: [
|
|
338
339
|
...dataSource.map((item) => {
|
|
339
|
-
if (item.
|
|
340
|
+
if (item.name === name) {
|
|
340
341
|
return {
|
|
341
342
|
...item,
|
|
342
343
|
hidden: true,
|
|
@@ -350,7 +351,7 @@ class SearchItemTable extends React.Component {
|
|
|
350
351
|
let newSortData = [
|
|
351
352
|
...sortDataSource,
|
|
352
353
|
...dataSource
|
|
353
|
-
.filter((item) => item.
|
|
354
|
+
.filter((item) => item.name === name)
|
|
354
355
|
.map((source) => {
|
|
355
356
|
return {
|
|
356
357
|
...source,
|
|
@@ -363,7 +364,7 @@ class SearchItemTable extends React.Component {
|
|
|
363
364
|
isDefaultValue: false,
|
|
364
365
|
dataSource: [
|
|
365
366
|
...dataSource.map((item) => {
|
|
366
|
-
if (item.
|
|
367
|
+
if (item.name === name) {
|
|
367
368
|
return {
|
|
368
369
|
...item,
|
|
369
370
|
hidden: false,
|
|
@@ -396,14 +397,41 @@ class SearchItemTable extends React.Component {
|
|
|
396
397
|
});
|
|
397
398
|
};
|
|
398
399
|
|
|
400
|
+
// 处理非标准 特殊搜索项 名称回显
|
|
401
|
+
showSearchItemLabel = (item: object) => {
|
|
402
|
+
//搜索项 存在 label默认返回
|
|
403
|
+
if(item.label){
|
|
404
|
+
return item.label;
|
|
405
|
+
} else {
|
|
406
|
+
switch(item.field.type){
|
|
407
|
+
//多值录入搜索组件 默认使用下拉框第一个选项
|
|
408
|
+
case 'bs-multiInput':
|
|
409
|
+
const { options = [] } = item?.field?.props;
|
|
410
|
+
return options[0]?.text;
|
|
411
|
+
default:
|
|
412
|
+
return '';
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
|
|
399
418
|
render() {
|
|
400
419
|
const {
|
|
401
|
-
dataSource = [],
|
|
420
|
+
dataSource: originDataSource = [],
|
|
402
421
|
searchDataSource,
|
|
403
|
-
sortDataSource,
|
|
422
|
+
sortDataSource: originSortDataSource = [],
|
|
404
423
|
visible,
|
|
405
424
|
onSearchSort,
|
|
406
425
|
} = this.state;
|
|
426
|
+
const dataSource = originDataSource.map((item: any) => ({
|
|
427
|
+
...item,
|
|
428
|
+
label: this.showSearchItemLabel(item),
|
|
429
|
+
}));
|
|
430
|
+
const sortDataSource = originSortDataSource.map((item: any) => ({
|
|
431
|
+
...item,
|
|
432
|
+
label: this.showSearchItemLabel(item),
|
|
433
|
+
}));
|
|
434
|
+
|
|
407
435
|
let newSearchSource = dataSource.filter(
|
|
408
436
|
(item) => item?.label?.indexOf(searchDataSource||'') > -1,
|
|
409
437
|
);
|
|
@@ -411,7 +439,7 @@ class SearchItemTable extends React.Component {
|
|
|
411
439
|
<div className={'sort_table_wrapper'}>
|
|
412
440
|
{visible && (
|
|
413
441
|
<Modal
|
|
414
|
-
title="
|
|
442
|
+
title="筛选条件设置"
|
|
415
443
|
wrapClassName={'sort_table_wrapper'}
|
|
416
444
|
width={820}
|
|
417
445
|
visible={visible}
|
|
@@ -439,15 +467,15 @@ class SearchItemTable extends React.Component {
|
|
|
439
467
|
<div className={'sort_table'}>
|
|
440
468
|
<div className={'sort_table_column_wrapper'}>
|
|
441
469
|
<span className={'sort_table_column_count'}>
|
|
442
|
-
|
|
470
|
+
<span>勾选你想使用的筛选条件</span>
|
|
443
471
|
</span>
|
|
444
472
|
<div className={'sort_table_column'}>
|
|
445
473
|
<Input
|
|
446
474
|
prefix={<SearchOutlined className="site-form-item-icon" />}
|
|
447
|
-
placeholder="
|
|
475
|
+
placeholder="输入筛选条件名称搜索"
|
|
448
476
|
allowClear
|
|
449
477
|
onChange={this.onSearch}
|
|
450
|
-
style={{ width:
|
|
478
|
+
style={{ width: 525 }}
|
|
451
479
|
/>
|
|
452
480
|
<div>
|
|
453
481
|
{!searchDataSource && (
|
|
@@ -487,7 +515,7 @@ class SearchItemTable extends React.Component {
|
|
|
487
515
|
<Checkbox
|
|
488
516
|
checked={!item.hidden}
|
|
489
517
|
onChange={(e) => {
|
|
490
|
-
this.onChange(e, item.
|
|
518
|
+
this.onChange(e, item.name);
|
|
491
519
|
}}
|
|
492
520
|
>
|
|
493
521
|
{item.label}
|
|
@@ -499,7 +527,7 @@ class SearchItemTable extends React.Component {
|
|
|
499
527
|
<Checkbox
|
|
500
528
|
checked={!item.hidden}
|
|
501
529
|
onChange={(e) => {
|
|
502
|
-
this.onChange(e, item.
|
|
530
|
+
this.onChange(e, item.name);
|
|
503
531
|
}}
|
|
504
532
|
>
|
|
505
533
|
{item.label}
|
|
@@ -520,7 +548,7 @@ class SearchItemTable extends React.Component {
|
|
|
520
548
|
</div>
|
|
521
549
|
<div className={'sort_table_content_wrapper'}>
|
|
522
550
|
<span className={'sort_table_content_count'}>
|
|
523
|
-
|
|
551
|
+
<span>已选择的搜索条件排序</span>
|
|
524
552
|
</span>
|
|
525
553
|
<div className={'sort_table_content'}>
|
|
526
554
|
<span style={{ paddingLeft: '10px' }}>
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
.sort_table_column_wrapper {
|
|
6
6
|
width: 560px;
|
|
7
|
-
margin-right:
|
|
7
|
+
margin-right: 8px;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
.sort_table_content_wrapper {
|
|
@@ -16,12 +16,12 @@
|
|
|
16
16
|
height: 20px;
|
|
17
17
|
font-family: PingFangSC-Regular;
|
|
18
18
|
font-weight: 400;
|
|
19
|
-
font-size:
|
|
19
|
+
font-size: 12px;
|
|
20
20
|
color: #000000;
|
|
21
21
|
letter-spacing: 0;
|
|
22
22
|
|
|
23
23
|
span {
|
|
24
|
-
color: #
|
|
24
|
+
color: #8E8E8E;
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
text-align: center;
|
|
47
47
|
font-family: PingFangSC-Regular;
|
|
48
48
|
font-weight: 400;
|
|
49
|
-
font-size:
|
|
49
|
+
font-size: 12px;
|
|
50
50
|
color: #848484;
|
|
51
51
|
}
|
|
52
52
|
}
|
|
@@ -57,13 +57,15 @@
|
|
|
57
57
|
height: 20px;
|
|
58
58
|
font-family: PingFangSC-Regular;
|
|
59
59
|
font-weight: 400;
|
|
60
|
-
font-size:
|
|
60
|
+
font-size: 12px;
|
|
61
61
|
color: #848484;
|
|
62
62
|
letter-spacing: 0;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
.ant-checkbox-wrapper {
|
|
66
66
|
width: 144px;
|
|
67
|
+
height: 16px;
|
|
68
|
+
line-height: 16px;
|
|
67
69
|
margin-top: 16px;
|
|
68
70
|
}
|
|
69
71
|
|
|
@@ -73,6 +75,7 @@
|
|
|
73
75
|
}
|
|
74
76
|
|
|
75
77
|
.sort_table_content {
|
|
78
|
+
height: 430px;
|
|
76
79
|
margin-top: 10px;
|
|
77
80
|
padding-top: 10px;
|
|
78
81
|
padding-bottom: 10px;
|
|
@@ -90,28 +93,11 @@
|
|
|
90
93
|
}
|
|
91
94
|
}
|
|
92
95
|
}
|
|
93
|
-
|
|
94
|
-
width: 820px;
|
|
95
|
-
height: 64px;
|
|
96
|
-
background: #ffffff;
|
|
97
|
-
padding: 20px;
|
|
98
|
-
border: 0px;
|
|
99
|
-
|
|
100
|
-
div.ant-modal-title {
|
|
101
|
-
height: 24px;
|
|
102
|
-
font-family: PingFangSC-Medium;
|
|
103
|
-
font-weight: 500;
|
|
104
|
-
font-size: 18px;
|
|
105
|
-
color: #000000;
|
|
106
|
-
letter-spacing: 0;
|
|
107
|
-
line-height: 24px;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
96
|
+
|
|
110
97
|
|
|
111
98
|
.ant-modal-body {
|
|
112
|
-
padding:
|
|
99
|
+
padding: 10px 16px;
|
|
113
100
|
}
|
|
114
|
-
|
|
115
101
|
.ant-modal-close-x {
|
|
116
102
|
height: 24px;
|
|
117
103
|
font-family: PingFangSC-Medium;
|
|
@@ -127,7 +113,7 @@
|
|
|
127
113
|
}
|
|
128
114
|
|
|
129
115
|
input {
|
|
130
|
-
height:
|
|
116
|
+
height: 22px;
|
|
131
117
|
padding: 6px 4px;
|
|
132
118
|
border-radius: 5px;
|
|
133
119
|
}
|
|
@@ -135,28 +121,25 @@
|
|
|
135
121
|
.ant-input-prefix {
|
|
136
122
|
width: 24px;
|
|
137
123
|
height: 24px;
|
|
138
|
-
margin: 4px;
|
|
124
|
+
margin: 0 4px;
|
|
139
125
|
// border: 1px dashed #d9d9d9;
|
|
140
126
|
display: flex;
|
|
141
127
|
justify-content: center;
|
|
142
128
|
}
|
|
143
129
|
|
|
144
130
|
.ant-modal-footer {
|
|
145
|
-
|
|
146
|
-
border: 0;
|
|
147
|
-
padding: 20px;
|
|
131
|
+
padding: 8px 16px;
|
|
148
132
|
display: flex;
|
|
149
133
|
justify-content: space-between;
|
|
150
134
|
|
|
151
135
|
.ant-btn {
|
|
152
136
|
width: 80px;
|
|
153
|
-
height:
|
|
154
|
-
border-radius: 5px;
|
|
137
|
+
height: 28px;
|
|
155
138
|
|
|
156
139
|
span {
|
|
157
140
|
font-family: PingFangSC-Medium;
|
|
158
141
|
font-weight: 600;
|
|
159
|
-
font-size:
|
|
142
|
+
font-size: 12px;
|
|
160
143
|
letter-spacing: 0;
|
|
161
144
|
text-align: center;
|
|
162
145
|
line-height: 20px;
|
|
@@ -179,13 +162,13 @@
|
|
|
179
162
|
padding-bottom: 50px;
|
|
180
163
|
|
|
181
164
|
tr {
|
|
182
|
-
height:
|
|
165
|
+
height: 30px;
|
|
183
166
|
td {
|
|
184
167
|
width: 24px !important;
|
|
185
|
-
height:
|
|
168
|
+
height: 30px !important;
|
|
186
169
|
font-family: PingFangSC-Regular;
|
|
187
170
|
font-weight: 400;
|
|
188
|
-
font-size:
|
|
171
|
+
font-size: 12px;
|
|
189
172
|
color: #000000;
|
|
190
173
|
letter-spacing: 0;
|
|
191
174
|
|
|
@@ -197,8 +180,8 @@
|
|
|
197
180
|
overflow: hidden;
|
|
198
181
|
text-overflow: ellipsis;
|
|
199
182
|
white-space: nowrap;
|
|
200
|
-
height:
|
|
201
|
-
line-height:
|
|
183
|
+
height: 30px !important;
|
|
184
|
+
line-height: 30px !important;
|
|
202
185
|
}
|
|
203
186
|
|
|
204
187
|
img {
|
|
@@ -214,7 +197,7 @@
|
|
|
214
197
|
&:last-child {
|
|
215
198
|
padding-left: 0px !important;
|
|
216
199
|
padding-right: 3px !important;
|
|
217
|
-
width:
|
|
200
|
+
width: 30px !important;
|
|
218
201
|
|
|
219
202
|
img {
|
|
220
203
|
// border: 1px dashed #d9d9d9;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
import React, { useState, useEffect, useRef, useMemo } from 'react';
|
|
3
|
-
import { useLocation } from 'umi';
|
|
3
|
+
import { useLocation, history } from 'umi';
|
|
4
4
|
import { QueryTable } from 'bssula';
|
|
5
5
|
import { Menu, Tooltip, Dropdown, Table, Typography } from 'antd';
|
|
6
6
|
import { Resizable } from 'react-resizable';
|
|
@@ -460,6 +460,14 @@ export default (props: any) => {
|
|
|
460
460
|
},
|
|
461
461
|
...tableProps?.components,
|
|
462
462
|
},
|
|
463
|
+
...(props.viewPagePath ? // 详情页查看地址 存在该参数时 默认列表支持双击打开
|
|
464
|
+
{
|
|
465
|
+
onRow: (record: any) => ({
|
|
466
|
+
onDoubleClick: (e: any) => {
|
|
467
|
+
history.push(eval(`\`${props.viewPagePath.replace(/'/g, '`').replace(/#{(.*?)}/g, (match: any, p: any) => `\${${p}}`)}\``));
|
|
468
|
+
},
|
|
469
|
+
}),
|
|
470
|
+
} : {}),
|
|
463
471
|
};
|
|
464
472
|
|
|
465
473
|
// @ts-ignore
|
|
@@ -741,6 +749,20 @@ export default (props: any) => {
|
|
|
741
749
|
}
|
|
742
750
|
};
|
|
743
751
|
|
|
752
|
+
const columnsDom = <span className="ant-dropdown-link">
|
|
753
|
+
<div onClick={sortTableRef?.current?.showModal} className="ant-dropdown-link">
|
|
754
|
+
<img style={{position: 'relative', left: '-7px'}} width={24} src={shezhi} />
|
|
755
|
+
</div>
|
|
756
|
+
</span>
|
|
757
|
+
|
|
758
|
+
const queryFieldsDom = <SearchItemTable
|
|
759
|
+
ref={searchTableRef}
|
|
760
|
+
setShowSearchFields={setShowSearchFields}
|
|
761
|
+
showSearchFields={showSearchFields}
|
|
762
|
+
datasource={value?.fields || []}
|
|
763
|
+
bsTableCode={bsTableCode}
|
|
764
|
+
/>
|
|
765
|
+
|
|
744
766
|
const memoConfig = useMemo(
|
|
745
767
|
() => ({
|
|
746
768
|
...config,
|
|
@@ -748,6 +770,8 @@ export default (props: any) => {
|
|
|
748
770
|
summaryList: props.summaryList ? getTableSummaryInfo : undefined,
|
|
749
771
|
statusMapping: props.statusMapping,
|
|
750
772
|
isBsSulaQueryTable: true,
|
|
773
|
+
columnsDom:columnsDom,
|
|
774
|
+
queryFieldsDom,
|
|
751
775
|
}),
|
|
752
776
|
[
|
|
753
777
|
checkedList,
|
|
@@ -758,23 +782,9 @@ export default (props: any) => {
|
|
|
758
782
|
],
|
|
759
783
|
);
|
|
760
784
|
|
|
761
|
-
const columnsDom = <span className="ant-dropdown-link">
|
|
762
|
-
<div onClick={sortTableRef?.current?.showModal} className="ant-dropdown-link">
|
|
763
|
-
<img style={{position: 'relative', left: '-7px'}} width={24} src={shezhi} />
|
|
764
|
-
</div>
|
|
765
|
-
</span>
|
|
766
|
-
|
|
767
|
-
const queryFieldsDom = <SearchItemTable
|
|
768
|
-
ref={searchTableRef}
|
|
769
|
-
setShowSearchFields={setShowSearchFields}
|
|
770
|
-
showSearchFields={showSearchFields}
|
|
771
|
-
datasource={value?.fields || []}
|
|
772
|
-
bsTableCode={bsTableCode}
|
|
773
|
-
/>
|
|
774
|
-
|
|
775
785
|
return (
|
|
776
786
|
<div id="bs-sula-query-table">
|
|
777
|
-
<MemoQueryTable {...memoConfig}
|
|
787
|
+
<MemoQueryTable {...memoConfig} />
|
|
778
788
|
{/* 列设置弹出框表格 */}
|
|
779
789
|
<SortableTable
|
|
780
790
|
ref={sortTableRef}
|
|
@@ -711,9 +711,9 @@ class SortableTable extends React.Component {
|
|
|
711
711
|
<div className={'sort_table_wrapper'}>
|
|
712
712
|
{visible && (
|
|
713
713
|
<Modal
|
|
714
|
-
title="
|
|
714
|
+
title="筛选条件设置"
|
|
715
715
|
wrapClassName={'sort_table_wrapper'}
|
|
716
|
-
width={
|
|
716
|
+
width={810}
|
|
717
717
|
visible={visible}
|
|
718
718
|
onOk={this.handleOk}
|
|
719
719
|
onCancel={this.handleCancel}
|
|
@@ -748,7 +748,7 @@ class SortableTable extends React.Component {
|
|
|
748
748
|
<div className={'sort_table'}>
|
|
749
749
|
<div className={'sort_table_column_wrapper'}>
|
|
750
750
|
<span className={'sort_table_column_count'}>
|
|
751
|
-
|
|
751
|
+
<span>勾选你想使用的筛选条件</span>
|
|
752
752
|
</span>
|
|
753
753
|
<div className={'sort_table_column'}>
|
|
754
754
|
<Input
|
|
@@ -756,7 +756,7 @@ class SortableTable extends React.Component {
|
|
|
756
756
|
placeholder="搜索"
|
|
757
757
|
allowClear
|
|
758
758
|
onChange={this.onSearch}
|
|
759
|
-
style={{ width:
|
|
759
|
+
style={{ width: 525, height: 24 }}
|
|
760
760
|
/>
|
|
761
761
|
<div>
|
|
762
762
|
{!searchDataSource && (
|
|
@@ -882,7 +882,7 @@ class SortableTable extends React.Component {
|
|
|
882
882
|
</div>
|
|
883
883
|
<div className={'sort_table_content_wrapper'}>
|
|
884
884
|
<span className={'sort_table_content_count'}>
|
|
885
|
-
|
|
885
|
+
<span>已选择的搜索条件排序</span>
|
|
886
886
|
</span>
|
|
887
887
|
<div className={'sort_table_content'}>
|
|
888
888
|
<span style={{ paddingLeft: '10px' }}>
|
|
@@ -165,20 +165,41 @@ export const handleTextOverflow = (
|
|
|
165
165
|
width: number = 130,
|
|
166
166
|
) => {
|
|
167
167
|
return (
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
168
|
+
<Tooltip title={text || '-'}>
|
|
169
|
+
<span
|
|
170
|
+
style={{
|
|
171
|
+
width: width ? width + 'px' : '130px',
|
|
172
|
+
display: 'inline-block',
|
|
173
|
+
textOverflow: 'ellipsis',
|
|
174
|
+
overflow: 'hidden',
|
|
175
|
+
whiteSpace: 'nowrap',
|
|
176
|
+
verticalAlign: 'middle',
|
|
177
|
+
}}
|
|
178
|
+
>
|
|
179
|
+
{text || '-'}
|
|
180
|
+
</span>
|
|
181
|
+
</Tooltip>
|
|
182
|
+
);
|
|
183
|
+
};
|
|
184
|
+
|
|
185
|
+
// 超出缩略 无提示 ...
|
|
186
|
+
export const handleTextOverflowNoTooltip = (
|
|
187
|
+
text: string | undefined,
|
|
188
|
+
width: number = 130,
|
|
189
|
+
) => {
|
|
190
|
+
return (
|
|
191
|
+
<span
|
|
192
|
+
style={{
|
|
193
|
+
width: width ? width + 'px' : '130px',
|
|
194
|
+
display: 'inline-block',
|
|
195
|
+
textOverflow: 'ellipsis',
|
|
196
|
+
overflow: 'hidden',
|
|
197
|
+
whiteSpace: 'nowrap',
|
|
198
|
+
verticalAlign: 'middle',
|
|
199
|
+
}}
|
|
200
|
+
>
|
|
201
|
+
{text || '-'}
|
|
202
|
+
</span>
|
|
182
203
|
);
|
|
183
204
|
};
|
|
184
205
|
|
|
@@ -232,7 +253,7 @@ export const tableColumnsImage = (
|
|
|
232
253
|
<>
|
|
233
254
|
{url ? (
|
|
234
255
|
<div className={`clomnsImg`}>
|
|
235
|
-
<Image src={url} width="
|
|
256
|
+
<Image src={url} width="16px" height="16px" {...paramsObj}></Image>
|
|
236
257
|
</div>
|
|
237
258
|
) : (
|
|
238
259
|
<div className={`clomnsImg2`}>
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
.bs_detail_page_head_wrapper{
|
|
2
|
+
height: 32px;
|
|
3
|
+
position: sticky;
|
|
4
|
+
background: #fff;
|
|
5
|
+
width: 100%;
|
|
6
|
+
top: 0px;
|
|
7
|
+
z-index: 10;
|
|
8
|
+
}
|
|
9
|
+
|
|
1
10
|
.detail_page_head {
|
|
2
11
|
height: 32px;
|
|
3
12
|
z-index: 5;
|
|
@@ -23,7 +32,7 @@
|
|
|
23
32
|
color: #282828;
|
|
24
33
|
}
|
|
25
34
|
|
|
26
|
-
li .
|
|
35
|
+
li .bread_name_pre:hover {
|
|
27
36
|
color: #000000d9;
|
|
28
37
|
}
|
|
29
38
|
}
|
|
@@ -31,7 +40,6 @@
|
|
|
31
40
|
.detail_page_wrapper {
|
|
32
41
|
// padding-top: 51px;
|
|
33
42
|
height: calc(100vh - 80px);
|
|
34
|
-
background-color: #FFF;
|
|
35
43
|
}
|
|
36
44
|
|
|
37
45
|
.back_home_img_content {
|
|
@@ -81,7 +89,7 @@
|
|
|
81
89
|
gap: 8px;
|
|
82
90
|
margin-right: 20px;
|
|
83
91
|
button {
|
|
84
|
-
height:
|
|
92
|
+
height: 24px !important;
|
|
85
93
|
display: flex;
|
|
86
94
|
align-items: center;
|
|
87
95
|
gap: 2px;
|