@bit-sun/business-component 4.0.11-alpha.1 → 4.0.11-alpha.10
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/SearchSelect/BusinessUtils.d.ts +2 -1
- package/dist/components/Functional/SearchSelect/utils.d.ts +7 -0
- package/dist/index.esm.js +1590 -987
- package/dist/index.js +1589 -986
- package/package.json +1 -1
- 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/index.tsx +17 -15
- package/src/components/Business/BsSulaQueryTable/utils.tsx +1 -1
- package/src/components/Business/DetailPageWrapper/index.less +1 -2
- package/src/components/Business/SearchSelect/BusinessUtils.tsx +774 -160
- package/src/components/Business/SearchSelect/index.md +180 -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 +1 -1
- 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 +26 -22
- package/src/components/Functional/SearchSelect/index.less +220 -74
- package/src/components/Functional/SearchSelect/index.tsx +264 -217
- package/src/components/Functional/SearchSelect/utils.ts +24 -0
- package/src/components/Solution/RuleComponent/index.js +4 -3
- package/src/components/Solution/RuleSetter/function.ts +2 -1
- package/src/styles/bsDefault.less +2 -13
- package/src/utils/TableUtils.tsx +1 -1
|
@@ -1,3 +1,27 @@
|
|
|
1
1
|
export const handleSourceName = (sName: any) => {
|
|
2
2
|
return sName
|
|
3
3
|
}
|
|
4
|
+
|
|
5
|
+
export const getFormRowInfo = (list: any) => {
|
|
6
|
+
const columnsPerRow = 4; // 每行的列数
|
|
7
|
+
const totalRows = Math.ceil(list.length / columnsPerRow); // 计算总行数
|
|
8
|
+
const lastRowColumns = (list.length+1) % columnsPerRow; // 计算最后一行的实际列数
|
|
9
|
+
const emptySlots = lastRowColumns === 0 ? 0 : columnsPerRow - lastRowColumns; // 计算最后一行的空位数
|
|
10
|
+
const emptyArray = new Array(emptySlots).fill(null); // 生成长度为 emptySlots 的数组
|
|
11
|
+
return { totalRows, emptyArray }
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const defaultVisibleFieldsCount = 7;
|
|
15
|
+
export const getVisibleFieldsCount = (modalTableProps: any) => {
|
|
16
|
+
const { visibleFieldsCount = defaultVisibleFieldsCount, tableSearchForm } = modalTableProps || {};
|
|
17
|
+
let count = visibleFieldsCount;
|
|
18
|
+
if (count === true) {
|
|
19
|
+
return tableSearchForm?.length;
|
|
20
|
+
}
|
|
21
|
+
return count!;
|
|
22
|
+
}
|
|
23
|
+
export const hasMoreQueryFields = (modalTableProps: any) => {
|
|
24
|
+
const { tableSearchForm } = modalTableProps || {}
|
|
25
|
+
const visibleFieldsCount = getVisibleFieldsCount(modalTableProps);
|
|
26
|
+
return visibleFieldsCount < tableSearchForm?.length;
|
|
27
|
+
}
|
|
@@ -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
|
};
|
|
@@ -1256,13 +1256,6 @@ ol {
|
|
|
1256
1256
|
}
|
|
1257
1257
|
}
|
|
1258
1258
|
|
|
1259
|
-
.ant-tabs-tab + .ant-tabs-tab {
|
|
1260
|
-
margin: 0;
|
|
1261
|
-
}
|
|
1262
|
-
.ant-tabs-tab {
|
|
1263
|
-
margin: 0 20px 0 0 !important;
|
|
1264
|
-
}
|
|
1265
|
-
|
|
1266
1259
|
// 滚动条
|
|
1267
1260
|
/* 滚动槽(轨道)宽高 */
|
|
1268
1261
|
|
|
@@ -1517,9 +1510,6 @@ body .ant-table .ant-table-container .ant-table-thead > tr > th {
|
|
|
1517
1510
|
|
|
1518
1511
|
.clomnsImg {
|
|
1519
1512
|
:global {
|
|
1520
|
-
.ant-image {
|
|
1521
|
-
margin: 8px;
|
|
1522
|
-
}
|
|
1523
1513
|
.ant-image-mask-info {
|
|
1524
1514
|
font-size: 12px !important;
|
|
1525
1515
|
padding: 0;
|
|
@@ -1528,10 +1518,9 @@ body .ant-table .ant-table-container .ant-table-thead > tr > th {
|
|
|
1528
1518
|
}
|
|
1529
1519
|
}
|
|
1530
1520
|
.clomnsImg2 {
|
|
1531
|
-
margin: 8px;
|
|
1532
1521
|
img {
|
|
1533
|
-
width:
|
|
1534
|
-
height:
|
|
1522
|
+
width: 16px;
|
|
1523
|
+
height: 16px;
|
|
1535
1524
|
}
|
|
1536
1525
|
}
|
|
1537
1526
|
|
package/src/utils/TableUtils.tsx
CHANGED
|
@@ -339,7 +339,7 @@ const tableColumnsImage = (url?: string, paramsObj?: tableColumnsImageType) => {
|
|
|
339
339
|
<>
|
|
340
340
|
{url ? (
|
|
341
341
|
<div className={`clomnsImg`}>
|
|
342
|
-
<Image src={url} width="
|
|
342
|
+
<Image src={url} width="16px" height="16px" {...paramsObj}></Image>
|
|
343
343
|
</div>
|
|
344
344
|
) : (
|
|
345
345
|
<img {...paramsObj} src={noImg}></img>
|