@bit-sun/business-component 4.2.0-alpha.6.1 → 4.2.0-alpha.6.11
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/dist/components/Business/AddSelectBusiness/index.d.ts +4 -3
- package/dist/components/Business/BsLayouts/Components/AllFunc/drawContent.d.ts +2 -1
- package/dist/components/Business/BsLayouts/Components/ChooseStore/index.d.ts +2 -1
- 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 -1
- package/dist/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/customMenuHeader.d.ts +2 -1
- package/dist/components/Business/BsLayouts/Components/CustomerMenu/index.d.ts +1 -1
- package/dist/components/Business/BsLayouts/Components/GlobalHeader/index.d.ts +2 -1
- package/dist/components/Business/BsLayouts/Components/RightContent/LoginModal.d.ts +2 -1
- 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 -1
- package/dist/components/Business/BsSulaQueryTable/setting.d.ts +6 -6
- package/dist/components/Business/BsSulaQueryTable/utils.d.ts +15 -14
- package/dist/components/Business/CommodityEntry/index.d.ts +2 -1
- package/dist/components/Business/CommonAlert/index.d.ts +2 -1
- package/dist/components/Business/CommonGuideWrapper/index.d.ts +3 -3
- package/dist/components/Business/DetailPageWrapper/index.d.ts +12 -11
- package/dist/components/Business/HomePageWrapper/index.d.ts +2 -1
- package/dist/components/Business/ItemPropertySelector/index.d.ts +2 -1
- package/dist/components/Business/JsonQueryTable/components/FieldsModifyModal.d.ts +2 -1
- package/dist/components/Business/JsonQueryTable/components/FieldsSettingsTable.d.ts +2 -1
- package/dist/components/Business/JsonQueryTable/components/Formula.d.ts +2 -1
- package/dist/components/Business/JsonQueryTable/components/MaintainOptions.d.ts +2 -1
- package/dist/components/Business/JsonQueryTable/drawer/index.d.ts +2 -1
- package/dist/components/Business/PropertyModal/index.d.ts +2 -1
- package/dist/components/Business/PropertyModal/propertyGroup.d.ts +1 -1
- package/dist/components/Business/SearchSelect/index.d.ts +1 -1
- package/dist/components/Business/StateFlow/index.d.ts +2 -1
- package/dist/components/Business/TreeSearchSelect/index.d.ts +1 -1
- package/dist/components/Business/columnSettingTable/columnSetting.d.ts +6 -6
- package/dist/components/Business/columnSettingTable/components/TableSumComponent.d.ts +2 -1
- package/dist/components/Business/columnSettingTable/index.d.ts +3 -3
- package/dist/components/Business/columnSettingTable/sulaSettingTable.d.ts +3 -3
- package/dist/components/Business/columnSettingTable/utils.d.ts +2 -1
- package/dist/components/Business/moreTreeTable/FixedScrollBar.d.ts +1 -1
- package/dist/components/Common/ParagraphCopier/index.d.ts +1 -1
- package/dist/components/Common/Section/index.d.ts +1 -1
- package/dist/components/Functional/AddSelect/index.d.ts +2 -1
- package/dist/components/Functional/AuthButton/index.d.ts +2 -1
- package/dist/components/Functional/DataImport/index.d.ts +3 -3
- package/dist/components/Functional/DataValidation/index.d.ts +4 -4
- package/dist/components/Functional/ExportFunctions/ExportIcon/index.d.ts +2 -1
- package/dist/components/Functional/QueryMutipleInput/index.d.ts +2 -1
- package/dist/components/Functional/QueryMutipleSelect/index.d.ts +2 -1
- package/dist/components/Functional/SearchSelect/index.d.ts +1 -1
- package/dist/components/Functional/SearchSelect/utils.d.ts +3 -2
- package/dist/components/Functional/TreeSearchSelect/index.d.ts +2 -1
- package/dist/components/Solution/RuleComponent/CustomPlugin/CustomSelector/CustomSelectorModal.d.ts +1 -1
- package/dist/components/Solution/RuleComponent/CustomPlugin/CustomSelector/index.d.ts +2 -1
- package/dist/components/Solution/RuleComponent/Formula.d.ts +2 -1
- package/dist/components/Solution/RuleComponent/InnerSelect.d.ts +2 -1
- package/dist/components/Solution/RuleComponent/RenderCompItem.d.ts +2 -1
- package/dist/components/Solution/RuleSetter/RuleInstance.d.ts +2 -1
- package/dist/components/Solution/RuleSetter/baseRule.d.ts +1 -1
- package/dist/components/Solution/RuleSetter/index.d.ts +1 -1
- package/dist/index.esm.js +1385 -796
- package/dist/index.js +1385 -796
- package/dist/plugin/TableColumnSetting/index.d.ts +5 -5
- package/dist/utils/TableUtils.d.ts +19 -18
- package/package.json +1 -1
- package/src/components/Business/SearchSelect/BusinessUtils.tsx +234 -38
- package/src/components/Business/StateFlow/index.css +126 -0
- package/src/components/Business/StateFlow/index.less +17 -17
- package/src/components/Business/columnSettingTable/index.tsx +7 -6
- package/src/components/Business/columnSettingTable/sulaSettingTable.tsx +23 -22
- package/src/components/Functional/AddSelect/index.tsx +92 -0
- package/src/components/Functional/SearchSelect/index.css +274 -0
- package/src/components/Functional/SearchSelect/index.less +5 -5
- package/src/components/Functional/SearchSelect/index.tsx +5 -2
- package/src/components/Solution/RuleComponent/index.js +1 -0
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
.state-flow .form-status-label {
|
|
2
|
+
height: 28px;
|
|
3
|
+
margin-right: 12px;
|
|
4
|
+
display: inline-block;
|
|
5
|
+
position: relative;
|
|
6
|
+
background-color: #B0B4B7;
|
|
7
|
+
align-items: center;
|
|
8
|
+
}
|
|
9
|
+
.state-flow .choosed-status-label.form-status-label {
|
|
10
|
+
background-color: #005CFF;
|
|
11
|
+
}
|
|
12
|
+
.state-flow .form-status-label:last-child {
|
|
13
|
+
margin-right: 0px;
|
|
14
|
+
}
|
|
15
|
+
.state-flow .form-status-label:first-child::after {
|
|
16
|
+
position: absolute;
|
|
17
|
+
display: block;
|
|
18
|
+
content: '';
|
|
19
|
+
right: -28px;
|
|
20
|
+
top: 0;
|
|
21
|
+
width: 28px;
|
|
22
|
+
height: 28px;
|
|
23
|
+
border: 14px solid;
|
|
24
|
+
border-color: transparent transparent transparent transparent;
|
|
25
|
+
border-left: 12px solid #B0B4B7;
|
|
26
|
+
}
|
|
27
|
+
.state-flow .choosed-status-label.form-status-label::after {
|
|
28
|
+
border-left: 12px solid #005CFF;
|
|
29
|
+
}
|
|
30
|
+
.state-flow .choosed-status-label.form-status-label:not(:first-child):not(:last-child)::after {
|
|
31
|
+
border-left: 12px solid #005CFF;
|
|
32
|
+
}
|
|
33
|
+
.state-flow .form-status-label:last-child::after {
|
|
34
|
+
position: absolute;
|
|
35
|
+
display: block;
|
|
36
|
+
content: '';
|
|
37
|
+
left: 0;
|
|
38
|
+
top: 0;
|
|
39
|
+
width: 28px;
|
|
40
|
+
height: 28px;
|
|
41
|
+
border: 14px solid;
|
|
42
|
+
border-color: transparent transparent transparent transparent;
|
|
43
|
+
border-left: 12px solid #ffffff;
|
|
44
|
+
}
|
|
45
|
+
.state-flow .form-status-label:first-child {
|
|
46
|
+
padding-left: 10px;
|
|
47
|
+
}
|
|
48
|
+
.state-flow .form-status-label:not(:first-child) {
|
|
49
|
+
padding-left: 15px;
|
|
50
|
+
}
|
|
51
|
+
.state-flow .form-status-label:not(:first-child):not(:last-child)::before {
|
|
52
|
+
position: absolute;
|
|
53
|
+
display: block;
|
|
54
|
+
content: '';
|
|
55
|
+
left: 0;
|
|
56
|
+
top: 0;
|
|
57
|
+
width: 28px;
|
|
58
|
+
height: 28px;
|
|
59
|
+
border: 14px solid;
|
|
60
|
+
border-color: transparent transparent transparent transparent;
|
|
61
|
+
border-left: 12px solid #ffffff;
|
|
62
|
+
}
|
|
63
|
+
.state-flow .form-status-label:not(:first-child):not(:last-child)::after {
|
|
64
|
+
position: absolute;
|
|
65
|
+
display: block;
|
|
66
|
+
content: '';
|
|
67
|
+
right: -28px;
|
|
68
|
+
top: 0;
|
|
69
|
+
width: 28px;
|
|
70
|
+
height: 28px;
|
|
71
|
+
border: 14px solid;
|
|
72
|
+
border-color: transparent transparent transparent transparent;
|
|
73
|
+
border-left: 12px solid #B0B4B7;
|
|
74
|
+
}
|
|
75
|
+
.state-flow .status-label-index {
|
|
76
|
+
display: inline-block;
|
|
77
|
+
width: 24px;
|
|
78
|
+
height: 24px;
|
|
79
|
+
border: 1px solid #FFFFFF;
|
|
80
|
+
color: #FFFFFF;
|
|
81
|
+
border-radius: 50%;
|
|
82
|
+
font-family: Montserrat;
|
|
83
|
+
font-size: 14px;
|
|
84
|
+
line-height: 24px;
|
|
85
|
+
text-align: center;
|
|
86
|
+
margin: 0 6px 0 20px;
|
|
87
|
+
}
|
|
88
|
+
.state-flow .status-label-key {
|
|
89
|
+
width: auto;
|
|
90
|
+
height: 100%;
|
|
91
|
+
display: inline-flex;
|
|
92
|
+
float: left;
|
|
93
|
+
align-items: center;
|
|
94
|
+
justify-content: center;
|
|
95
|
+
color: #FFFFFF;
|
|
96
|
+
font-size: 14px;
|
|
97
|
+
}
|
|
98
|
+
.state-flow .status-label-operate {
|
|
99
|
+
overflow: hidden;
|
|
100
|
+
text-overflow: ellipsis;
|
|
101
|
+
white-space: nowrap;
|
|
102
|
+
height: 12px;
|
|
103
|
+
margin: 8px 0;
|
|
104
|
+
margin-left: 8px;
|
|
105
|
+
padding-left: 8px;
|
|
106
|
+
font-size: 10px;
|
|
107
|
+
border-left: 1px solid #FFFFFF95;
|
|
108
|
+
}
|
|
109
|
+
.state-flow .status-label-operate > div {
|
|
110
|
+
font-size: 12px;
|
|
111
|
+
height: 12px;
|
|
112
|
+
line-height: 12px;
|
|
113
|
+
color: #FFFFFF;
|
|
114
|
+
font-family: PingFangSC;
|
|
115
|
+
overflow: hidden;
|
|
116
|
+
text-overflow: ellipsis;
|
|
117
|
+
white-space: nowrap;
|
|
118
|
+
}
|
|
119
|
+
.state-flow .status-label-operate > div:first-child {
|
|
120
|
+
font-size: 10px;
|
|
121
|
+
font-weight: 400;
|
|
122
|
+
}
|
|
123
|
+
.state-flow .only-one-child.form-status-label::after,
|
|
124
|
+
.state-flow .only-one-child.form-status-label::before {
|
|
125
|
+
border-left: 0px;
|
|
126
|
+
}
|
|
@@ -12,11 +12,11 @@
|
|
|
12
12
|
.choosed-status-label.form-status-label {
|
|
13
13
|
background-color: #005CFF;
|
|
14
14
|
}
|
|
15
|
-
|
|
15
|
+
|
|
16
16
|
.form-status-label:last-child {
|
|
17
17
|
margin-right: 0px;
|
|
18
18
|
}
|
|
19
|
-
|
|
19
|
+
|
|
20
20
|
.form-status-label:first-child::after {
|
|
21
21
|
position: absolute;
|
|
22
22
|
display: block;
|
|
@@ -29,15 +29,15 @@
|
|
|
29
29
|
border-color: transparent transparent transparent transparent;
|
|
30
30
|
border-left: 12px solid #B0B4B7;
|
|
31
31
|
}
|
|
32
|
-
|
|
32
|
+
|
|
33
33
|
.choosed-status-label.form-status-label::after {
|
|
34
34
|
border-left: 12px solid #005CFF;
|
|
35
35
|
}
|
|
36
|
-
|
|
36
|
+
|
|
37
37
|
.choosed-status-label.form-status-label:not(:first-child):not(:last-child)::after {
|
|
38
38
|
border-left: 12px solid #005CFF;
|
|
39
39
|
}
|
|
40
|
-
|
|
40
|
+
|
|
41
41
|
.form-status-label:last-child::after {
|
|
42
42
|
position: absolute;
|
|
43
43
|
display: block;
|
|
@@ -50,15 +50,15 @@
|
|
|
50
50
|
border-color: transparent transparent transparent transparent;
|
|
51
51
|
border-left: 12px solid #ffffff;
|
|
52
52
|
}
|
|
53
|
-
|
|
53
|
+
|
|
54
54
|
.form-status-label:first-child {
|
|
55
55
|
padding-left: 10px;
|
|
56
56
|
}
|
|
57
|
-
|
|
57
|
+
|
|
58
58
|
.form-status-label:not(:first-child) {
|
|
59
59
|
padding-left: 15px;
|
|
60
60
|
}
|
|
61
|
-
|
|
61
|
+
|
|
62
62
|
.form-status-label:not(:first-child):not(:last-child)::before {
|
|
63
63
|
position: absolute;
|
|
64
64
|
display: block;
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
border-color: transparent transparent transparent transparent;
|
|
72
72
|
border-left: 12px solid #ffffff;
|
|
73
73
|
}
|
|
74
|
-
|
|
74
|
+
|
|
75
75
|
.form-status-label:not(:first-child):not(:last-child)::after {
|
|
76
76
|
position: absolute;
|
|
77
77
|
display: block;
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
border-color: transparent transparent transparent transparent;
|
|
85
85
|
border-left: 12px solid #B0B4B7;
|
|
86
86
|
}
|
|
87
|
-
|
|
87
|
+
|
|
88
88
|
.status-label-index {
|
|
89
89
|
display: inline-block;
|
|
90
90
|
width: 24px;
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
text-align: center;
|
|
98
98
|
margin: 0 6px 0 20px;
|
|
99
99
|
}
|
|
100
|
-
|
|
100
|
+
|
|
101
101
|
.status-label-key {
|
|
102
102
|
width: auto;
|
|
103
103
|
height: 100%;
|
|
@@ -110,11 +110,11 @@
|
|
|
110
110
|
color: #FFFFFF;
|
|
111
111
|
font-size: 14px;
|
|
112
112
|
}
|
|
113
|
-
|
|
113
|
+
|
|
114
114
|
.status-label-operate {
|
|
115
115
|
// flex-grow: 1;
|
|
116
116
|
// flex-shrink: 1;
|
|
117
|
-
float: left;
|
|
117
|
+
// float: left;
|
|
118
118
|
overflow: hidden;
|
|
119
119
|
text-overflow: ellipsis;
|
|
120
120
|
white-space: nowrap;
|
|
@@ -123,8 +123,8 @@
|
|
|
123
123
|
margin-left: 8px;
|
|
124
124
|
padding-left: 8px;
|
|
125
125
|
font-size: 10px;
|
|
126
|
-
border-left: 1px solid #
|
|
127
|
-
|
|
126
|
+
border-left: 1px solid #FFFFFF95;
|
|
127
|
+
|
|
128
128
|
&>div {
|
|
129
129
|
font-size: 12px;
|
|
130
130
|
height: 12px;
|
|
@@ -140,8 +140,8 @@
|
|
|
140
140
|
font-weight: 400;
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
|
-
|
|
143
|
+
|
|
144
144
|
.only-one-child.form-status-label::after,.only-one-child.form-status-label::before {
|
|
145
145
|
border-left: 0px;
|
|
146
146
|
}
|
|
147
|
-
}
|
|
147
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
1
2
|
import React, { useState } from 'react';
|
|
2
3
|
import { Table, Tooltip, Typography } from 'antd';
|
|
3
4
|
import { Resizable } from 'react-resizable';
|
|
@@ -81,9 +82,9 @@ export default class ColumnSettingTable extends React.Component {
|
|
|
81
82
|
|
|
82
83
|
/**
|
|
83
84
|
* 新增函数,用于根据传入的小数位数进行四舍五入
|
|
84
|
-
* @param number
|
|
85
|
-
* @param decimalPlaces
|
|
86
|
-
* @returns
|
|
85
|
+
* @param number
|
|
86
|
+
* @param decimalPlaces
|
|
87
|
+
* @returns
|
|
87
88
|
*/
|
|
88
89
|
roundToDecimalPlaces = (number: any, decimalPlaces: number) => {
|
|
89
90
|
const factor = Math.pow(10, (decimalPlaces || 2));
|
|
@@ -92,7 +93,7 @@ export default class ColumnSettingTable extends React.Component {
|
|
|
92
93
|
|
|
93
94
|
/**
|
|
94
95
|
* 合计行逻辑
|
|
95
|
-
* @returns
|
|
96
|
+
* @returns
|
|
96
97
|
*/
|
|
97
98
|
getTableSummaryInfo = () => {
|
|
98
99
|
const { summary = undefined, rowSelection, expandable, modeType, dataSource, isSpecial = false, }: any = this.props;
|
|
@@ -232,7 +233,7 @@ export default class ColumnSettingTable extends React.Component {
|
|
|
232
233
|
|
|
233
234
|
/**
|
|
234
235
|
* 处理行点击事件
|
|
235
|
-
* @param record
|
|
236
|
+
* @param record
|
|
236
237
|
*/
|
|
237
238
|
handleRowClick = (record: any) => {
|
|
238
239
|
const { selectedRowKeys, selectedRows, } = this.state;
|
|
@@ -316,7 +317,7 @@ export default class ColumnSettingTable extends React.Component {
|
|
|
316
317
|
...propRowSelection,
|
|
317
318
|
selectedRowKeys: this.state.selectedRowKeys,
|
|
318
319
|
onChange: (selectedRowKeys: any, selectedRows: any) => {
|
|
319
|
-
this.setState({
|
|
320
|
+
this.setState({
|
|
320
321
|
selectedRowKeys,
|
|
321
322
|
selectedRows
|
|
322
323
|
});
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
1
2
|
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
2
3
|
import { Table as SulaTable, request } from 'bssula';
|
|
3
4
|
import { Resizable } from 'react-resizable';
|
|
@@ -22,7 +23,7 @@ export default class ColumnSettingSulaTable extends React.Component {
|
|
|
22
23
|
showColumns: [],
|
|
23
24
|
selectedRowKeys: [], // 新增状态,用于跟踪选中的行的键
|
|
24
25
|
selectedRows: [],
|
|
25
|
-
showSummary: null
|
|
26
|
+
showSummary: null
|
|
26
27
|
}
|
|
27
28
|
this.sulaTableRef = React.createRef<any>();
|
|
28
29
|
}
|
|
@@ -79,9 +80,9 @@ export default class ColumnSettingSulaTable extends React.Component {
|
|
|
79
80
|
|
|
80
81
|
/**
|
|
81
82
|
* 新增函数,用于根据传入的小数位数进行四舍五入
|
|
82
|
-
* @param number
|
|
83
|
-
* @param decimalPlaces
|
|
84
|
-
* @returns
|
|
83
|
+
* @param number
|
|
84
|
+
* @param decimalPlaces
|
|
85
|
+
* @returns
|
|
85
86
|
*/
|
|
86
87
|
roundToDecimalPlaces = (number: any, decimalPlaces: number) => {
|
|
87
88
|
const factor = Math.pow(10, (decimalPlaces || 2));
|
|
@@ -90,7 +91,7 @@ export default class ColumnSettingSulaTable extends React.Component {
|
|
|
90
91
|
|
|
91
92
|
/**
|
|
92
93
|
* 合计行逻辑
|
|
93
|
-
* @returns
|
|
94
|
+
* @returns
|
|
94
95
|
*/
|
|
95
96
|
getTableSummaryInfo = () => {
|
|
96
97
|
const { summary = undefined, rowSelection, expandable, isSpecial = false, modeType }: any = this.props;
|
|
@@ -167,10 +168,10 @@ export default class ColumnSettingSulaTable extends React.Component {
|
|
|
167
168
|
</Table.Summary.Row>
|
|
168
169
|
</Table.Summary>
|
|
169
170
|
);
|
|
170
|
-
|
|
171
|
+
|
|
171
172
|
return () => summaryDom;
|
|
172
|
-
};
|
|
173
|
-
|
|
173
|
+
};
|
|
174
|
+
|
|
174
175
|
handledynamicColumns = (col: any[]) => {
|
|
175
176
|
let { dynamicColumns, modeType }: any = this.props;
|
|
176
177
|
col = col.map((item: any) => {
|
|
@@ -205,7 +206,7 @@ export default class ColumnSettingSulaTable extends React.Component {
|
|
|
205
206
|
|
|
206
207
|
ResizeableTitle = (props: any) => {
|
|
207
208
|
const { onResize, width, ...restProps } = props;
|
|
208
|
-
|
|
209
|
+
|
|
209
210
|
const [innerWidth, setInnerWidth] = useState(width);
|
|
210
211
|
const [isResizing, setIsResizing] = useState(false); // 标记是否正在拖拽
|
|
211
212
|
const [isDragging, setIsDragging] = useState(false); // 标记拖拽句柄是否被拖拽
|
|
@@ -213,9 +214,9 @@ export default class ColumnSettingSulaTable extends React.Component {
|
|
|
213
214
|
const markerPosition = useRef({ left: 0, top: 0 });
|
|
214
215
|
const currentStart = useRef(0);
|
|
215
216
|
const uuidref = useRef(uuid());
|
|
216
|
-
|
|
217
|
+
|
|
217
218
|
const prevWidthRef = useRef(width);
|
|
218
|
-
|
|
219
|
+
|
|
219
220
|
const handleMouseDown = (e: any) => {
|
|
220
221
|
currentStart.current = e.clientX;
|
|
221
222
|
markerPosition.current = { left: e.clientX, top: e.clientY }
|
|
@@ -223,35 +224,35 @@ export default class ColumnSettingSulaTable extends React.Component {
|
|
|
223
224
|
document.addEventListener('mousemove', handleMouseMove);
|
|
224
225
|
document.addEventListener('mouseup', handleMouseUp);
|
|
225
226
|
};
|
|
226
|
-
|
|
227
|
+
|
|
227
228
|
const handleMouseMove = (e: any) => {
|
|
228
229
|
e.stopPropagation();
|
|
229
230
|
e.preventDefault();
|
|
230
231
|
// 更新标记位置
|
|
231
232
|
markerPosition.current = { left: e.clientX, top: e.clientY }
|
|
232
233
|
const dom: HTMLElement | null = document.getElementById('text1');
|
|
233
|
-
|
|
234
|
+
|
|
234
235
|
if (dom && dom.style) {
|
|
235
236
|
dom.style.left = `${e.clientX}px`;
|
|
236
237
|
dom.style.top = `${e.clientY - 20}px`;
|
|
237
238
|
}
|
|
238
239
|
};
|
|
239
|
-
|
|
240
|
+
|
|
240
241
|
const handleMouseUp = (e: any) => {
|
|
241
242
|
document.removeEventListener('mousemove', handleMouseMove);
|
|
242
243
|
document.removeEventListener('mouseup', handleMouseUp);
|
|
243
244
|
setIsResizing(false);
|
|
244
245
|
};
|
|
245
|
-
|
|
246
|
+
|
|
246
247
|
const handleresize = (e: any, data: any, title: string) => {
|
|
247
248
|
const newWidth = data?.size?.width || 0;
|
|
248
249
|
setInnerWidth(newWidth); // 更新内部分宽度
|
|
249
250
|
};
|
|
250
|
-
|
|
251
|
+
|
|
251
252
|
const handleResizeStart = () => {
|
|
252
253
|
setIsResizing(true);
|
|
253
254
|
};
|
|
254
|
-
|
|
255
|
+
|
|
255
256
|
const handleResizeStop = (e: any, data: any) => {
|
|
256
257
|
setIsResizing(false);
|
|
257
258
|
if (onResize) {
|
|
@@ -265,11 +266,11 @@ export default class ColumnSettingSulaTable extends React.Component {
|
|
|
265
266
|
setInnerWidth(width);
|
|
266
267
|
}
|
|
267
268
|
}, [width]);
|
|
268
|
-
|
|
269
|
+
|
|
269
270
|
const thStyle = {
|
|
270
271
|
boxShadow: isResizing ? '2px 2px 10px rgba(0, 0, 0, 0.3)' : 'none',
|
|
271
272
|
};
|
|
272
|
-
|
|
273
|
+
|
|
273
274
|
return (
|
|
274
275
|
<Resizable
|
|
275
276
|
width={innerWidth}
|
|
@@ -333,7 +334,7 @@ export default class ColumnSettingSulaTable extends React.Component {
|
|
|
333
334
|
|
|
334
335
|
/**
|
|
335
336
|
* 处理行点击事件
|
|
336
|
-
* @param record
|
|
337
|
+
* @param record
|
|
337
338
|
*/
|
|
338
339
|
handleRowClick = (record: any) => {
|
|
339
340
|
const { selectedRowKeys, selectedRows, } = this.state;
|
|
@@ -420,7 +421,7 @@ export default class ColumnSettingSulaTable extends React.Component {
|
|
|
420
421
|
...propRowSelection,
|
|
421
422
|
selectedRowKeys: this.state.selectedRowKeys,
|
|
422
423
|
onChange: (selectedRowKeys: any, selectedRows: any) => {
|
|
423
|
-
this.setState({
|
|
424
|
+
this.setState({
|
|
424
425
|
selectedRowKeys,
|
|
425
426
|
selectedRows
|
|
426
427
|
});
|
|
@@ -436,7 +437,7 @@ export default class ColumnSettingSulaTable extends React.Component {
|
|
|
436
437
|
};
|
|
437
438
|
},
|
|
438
439
|
}
|
|
439
|
-
|
|
440
|
+
|
|
440
441
|
return (
|
|
441
442
|
<div style={{ position: 'relative' }}>
|
|
442
443
|
<span style={{ position: 'absolute', zIndex: '10', right: '8px', top: '10px' }} className="ant-dropdown-link">
|
|
@@ -222,6 +222,98 @@ const AddSelect = (props: any) => {
|
|
|
222
222
|
acc[key] = typeof value === 'function' ? value?.(record) : value;
|
|
223
223
|
return acc;
|
|
224
224
|
}, {});
|
|
225
|
+
|
|
226
|
+
// 可输入非数字字符
|
|
227
|
+
if(item.canInputString) {
|
|
228
|
+
return (
|
|
229
|
+
<InputNumber
|
|
230
|
+
min={0}
|
|
231
|
+
precision={0}
|
|
232
|
+
controls={false}
|
|
233
|
+
{...inputProps}
|
|
234
|
+
value={text || ''}
|
|
235
|
+
keyboard={false}
|
|
236
|
+
onPressEnter={(e: any) => {
|
|
237
|
+
e.target.blur();
|
|
238
|
+
}}
|
|
239
|
+
onBlur={async (e: any) => {
|
|
240
|
+
const {
|
|
241
|
+
target: { value },
|
|
242
|
+
} = e;
|
|
243
|
+
record[item.dataIndex] = value
|
|
244
|
+
editRecord(record)
|
|
245
|
+
}}
|
|
246
|
+
onKeyDown={(e) => {
|
|
247
|
+
if(e.keyCode === 13 && e.ctrlKey) {
|
|
248
|
+
handleOk(true)
|
|
249
|
+
document.getElementById("first-query")?.focus()
|
|
250
|
+
}
|
|
251
|
+
if(e.keyCode === 8 && e.ctrlKey) {
|
|
252
|
+
message.success('删除当前行')
|
|
253
|
+
e.stopPropagation();
|
|
254
|
+
e.preventDefault();
|
|
255
|
+
let dom = e.nativeEvent.path[5].children[index + 2]?.getElementsByTagName('input')[currentIndex]
|
|
256
|
+
if (dom) {
|
|
257
|
+
dom.select();
|
|
258
|
+
dom.focus();
|
|
259
|
+
dom.scrollIntoView(false)
|
|
260
|
+
}
|
|
261
|
+
dom = null
|
|
262
|
+
deleteRecord(record, popvalue);
|
|
263
|
+
}
|
|
264
|
+
if (e.keyCode === 37 && e.shiftKey) { // 左滑动
|
|
265
|
+
e.stopPropagation();
|
|
266
|
+
e.preventDefault();
|
|
267
|
+
let dom = e.nativeEvent.path[5].children[index + 1]?.getElementsByTagName('input')[currentIndex - 1]
|
|
268
|
+
if (dom) {
|
|
269
|
+
dom.select();
|
|
270
|
+
dom.focus();
|
|
271
|
+
dom.scrollIntoView(false)
|
|
272
|
+
}
|
|
273
|
+
dom = null
|
|
274
|
+
}
|
|
275
|
+
if (e.keyCode === 39 && e.shiftKey) { // 右滑
|
|
276
|
+
e.stopPropagation();
|
|
277
|
+
e.preventDefault();
|
|
278
|
+
let dom = e.nativeEvent.path[5].children[index + 1]?.getElementsByTagName('input')[currentIndex + 1]
|
|
279
|
+
if (dom) {
|
|
280
|
+
dom.select();
|
|
281
|
+
dom.focus();
|
|
282
|
+
dom.scrollIntoView(false)
|
|
283
|
+
}
|
|
284
|
+
dom = null
|
|
285
|
+
}
|
|
286
|
+
if (e.keyCode === 40) {
|
|
287
|
+
e.stopPropagation();
|
|
288
|
+
e.preventDefault();
|
|
289
|
+
let dom = e.nativeEvent.path[5].children[index + 2]?.getElementsByTagName('input')[currentIndex]
|
|
290
|
+
if (dom) {
|
|
291
|
+
dom.select();
|
|
292
|
+
dom.focus();
|
|
293
|
+
dom.scrollIntoView(false)
|
|
294
|
+
}
|
|
295
|
+
dom = null
|
|
296
|
+
} else if (e.keyCode === 38) {
|
|
297
|
+
e.stopPropagation();
|
|
298
|
+
e.preventDefault();
|
|
299
|
+
let dom1 = e.nativeEvent.path[5].children[index]?.getElementsByTagName('input')[currentIndex]
|
|
300
|
+
if (dom1) {
|
|
301
|
+
// dom1.value=""
|
|
302
|
+
// dom1.setSelectionRange(100, 0);
|
|
303
|
+
dom1.select();
|
|
304
|
+
dom1.focus();
|
|
305
|
+
dom1.scrollIntoViewIfNeeded(false)
|
|
306
|
+
// dom1.value=record['count']
|
|
307
|
+
}
|
|
308
|
+
dom1 = null
|
|
309
|
+
} else if (e.keyCode === 9 && index === selectedRowKeys.length - 1 && currentIndex === inputLength - 1) {
|
|
310
|
+
e.stopPropagation();
|
|
311
|
+
e.preventDefault();
|
|
312
|
+
}
|
|
313
|
+
}}
|
|
314
|
+
/>
|
|
315
|
+
);
|
|
316
|
+
}
|
|
225
317
|
|
|
226
318
|
return (
|
|
227
319
|
<InputNumber
|