@bit-sun/business-component 4.0.13-alpha.9 → 4.2.0-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 (64) hide show
  1. package/.umirc.ts +21 -10
  2. package/dist/components/Business/BsSulaQueryTable/setting.d.ts +5 -2
  3. package/dist/components/Business/DetailPageWrapper/index.d.ts +6 -0
  4. package/dist/components/Business/ItemPropertySelector/index.d.ts +3 -0
  5. package/dist/components/Business/ModalUtils/index.d.ts +8 -0
  6. package/dist/components/Business/SearchSelect/utils.d.ts +4 -2
  7. package/dist/components/Business/columnSettingTable/columnSetting.d.ts +3 -2
  8. package/dist/components/Business/columnSettingTable/index.d.ts +19 -2
  9. package/dist/components/Business/columnSettingTable/sulaSettingTable.d.ts +20 -3
  10. package/dist/components/Functional/DataValidation/index.d.ts +11 -1
  11. package/dist/components/Functional/SearchSelect/utils.d.ts +2 -1
  12. package/dist/index.d.ts +1 -0
  13. package/dist/index.esm.js +2030 -901
  14. package/dist/index.js +2030 -900
  15. package/package.json +9 -7
  16. package/src/assets/btn-cancel.svg +3 -0
  17. package/src/assets/btn-copy.svg +3 -0
  18. package/src/assets/btn-delete.svg +2 -29
  19. package/src/assets/btn-edit.svg +2 -19
  20. package/src/assets/btn-hangUp.svg +3 -0
  21. package/src/assets/btn-print.svg +3 -0
  22. package/src/assets/btn-refresh.svg +3 -0
  23. package/src/assets/btn-unhook.svg +3 -0
  24. package/src/components/Business/BsSulaQueryTable/SearchItemSetting.tsx +4 -3
  25. package/src/components/Business/BsSulaQueryTable/bssulaquerytable.less +0 -4
  26. package/src/components/Business/BsSulaQueryTable/index.less +5 -3
  27. package/src/components/Business/BsSulaQueryTable/index.md +45 -32
  28. package/src/components/Business/BsSulaQueryTable/index.tsx +153 -76
  29. package/src/components/Business/BsSulaQueryTable/setting.tsx +40 -10
  30. package/src/components/Business/BsSulaQueryTable/utils.tsx +15 -12
  31. package/src/components/Business/CommodityEntry/index.md +1 -1
  32. package/src/components/Business/CommodityEntry/index.tsx +11 -9
  33. package/src/components/Business/DetailPageWrapper/index.less +1 -1
  34. package/src/components/Business/DetailPageWrapper/index.tsx +24 -5
  35. package/src/components/Business/DetailPageWrapper/utils.tsx +7 -2
  36. package/src/components/Business/HomePageWrapper/index.less +1 -1
  37. package/src/components/Business/ItemPropertySelector/index.tsx +88 -0
  38. package/src/components/Business/JsonQueryTable/function.ts +1 -1
  39. package/src/components/Business/ModalUtils/index.tsx +45 -0
  40. package/src/components/Business/SearchSelect/BusinessUtils.tsx +284 -57
  41. package/src/components/Business/SearchSelect/index.md +4 -4
  42. package/src/components/Business/SearchSelect/utils.ts +26 -4
  43. package/src/components/Business/columnSettingTable/columnSetting.tsx +27 -11
  44. package/src/components/Business/columnSettingTable/index.less +5 -3
  45. package/src/components/Business/columnSettingTable/index.md +200 -136
  46. package/src/components/Business/columnSettingTable/index.tsx +167 -39
  47. package/src/components/Business/columnSettingTable/sulaSettingTable.tsx +178 -47
  48. package/src/components/Functional/AddSelect/index.tsx +19 -9
  49. package/src/components/Functional/BillEntry/index.less +3 -0
  50. package/src/components/Functional/DataValidation/index.md +1 -0
  51. package/src/components/Functional/DataValidation/index.tsx +138 -23
  52. package/src/components/Functional/QueryMutipleSelect/index.tsx +2 -1
  53. package/src/components/Functional/SearchSelect/index.less +4 -0
  54. package/src/components/Functional/SearchSelect/index.tsx +61 -20
  55. package/src/components/Functional/SearchSelect/utils.tsx +13 -10
  56. package/src/components/Functional/TreeSearchSelect/index.tsx +2 -1
  57. package/src/components/Solution/RuleComponent/index.js +59 -1
  58. package/src/components/Solution/RuleComponent/ruleFiled.js +1 -1
  59. package/src/index.ts +1 -0
  60. package/src/plugin/TableColumnSetting/index.less +5 -3
  61. package/src/plugin/TableColumnSetting/index.tsx +4 -3
  62. package/src/styles/bsDefault.less +9 -3
  63. package/src/utils/request.ts +8 -4
  64. package/src/utils/utils.ts +11 -15
@@ -151,16 +151,18 @@
151
151
  }
152
152
  }
153
153
 
154
- .ant-table-wrapper::-webkit-scrollbar {
154
+ .ant-table-tbody::-webkit-scrollbar {
155
155
  display: none;
156
156
  }
157
157
 
158
158
  .ant-table-wrapper {
159
159
  margin-top: 10px;
160
- height: 364px;
161
- overflow: scroll;
162
160
  padding-bottom: 50px;
163
161
 
162
+ tbody tr:first-child {
163
+ display: none;
164
+ }
165
+
164
166
  tr {
165
167
  height: 30px;
166
168
  td {
@@ -411,7 +411,7 @@ class TableColumnSetting extends React.Component<TableColumnSettingProps> {
411
411
  DraggableContainer = (props: any) => (
412
412
  <SortableBody
413
413
  useDragHandle
414
- disableAutoscroll
414
+ lockAxis='y'
415
415
  helperClass="row-dragging"
416
416
  onSortEnd={this.onSortEnd}
417
417
  {...props}
@@ -422,9 +422,9 @@ class TableColumnSetting extends React.Component<TableColumnSettingProps> {
422
422
  const { sortDataSource } = this.state;
423
423
  // function findIndex base on Table rowKey props and should always be a right array index
424
424
  const index = sortDataSource.findIndex(
425
- (x:any) => x.key === restProps['data-row-key'],
425
+ (x:any) => (x.key||x.dataIndex) == restProps['data-row-key'],
426
426
  );
427
- return <SortableItem index={index} {...restProps} />;
427
+ return <SortableItem key={restProps['data-row-key']} index={index} {...restProps} />;
428
428
  };
429
429
 
430
430
  onChange = (e: any, title: any) => {
@@ -709,6 +709,7 @@ class TableColumnSetting extends React.Component<TableColumnSettingProps> {
709
709
  row: this.DraggableBodyRow,
710
710
  },
711
711
  }}
712
+ scroll={{ y: 364 }}
712
713
  />
713
714
  </div>
714
715
  </div>
@@ -1469,8 +1469,12 @@ body .ant-table .ant-table-container .ant-table-thead > tr > th {
1469
1469
  .table_odd {
1470
1470
  background: #f7f8fb;
1471
1471
  }
1472
+ .table_gray {
1473
+ background: #D3D3D3;
1474
+ }
1472
1475
  // 浮起的列 设置斑马
1473
1476
  .table_base,
1477
+ .table_gray,
1474
1478
  .table_odd {
1475
1479
 
1476
1480
  .ant-table-cell-fix-left,
@@ -1908,16 +1912,18 @@ body .ant-table .ant-table-container .ant-table-thead > tr > th {
1908
1912
  }
1909
1913
  }
1910
1914
 
1911
- .ant-table-wrapper::-webkit-scrollbar {
1915
+ .ant-table-tbody::-webkit-scrollbar {
1912
1916
  display: none;
1913
1917
  }
1914
1918
 
1915
1919
  .ant-table-wrapper {
1916
1920
  margin-top: 10px;
1917
- height: 364px;
1918
- overflow: scroll;
1919
1921
  padding-bottom: 50px;
1920
1922
 
1923
+ tbody tr:first-child {
1924
+ display: none;
1925
+ }
1926
+
1921
1927
  tr {
1922
1928
  height: 30px;
1923
1929
  td {
@@ -7,27 +7,31 @@ const get = (url, params?: any) => {
7
7
  }).then(handleResponseData);
8
8
  };
9
9
 
10
- const post = (url, data?: any) => {
10
+ const post = (url, data?: any, params?: any) => {
11
11
  return request.post(url, {
12
12
  data,
13
+ ...params,
13
14
  }).then(handleResponseData);
14
15
  };
15
16
 
16
- const patch = (url, data?: any) => {
17
+ const patch = (url, data?: any, params?: any) => {
17
18
  return request.patch(url, {
18
19
  data,
20
+ ...params,
19
21
  }).then(handleResponseData);
20
22
  };
21
23
 
22
- const put = (url, data?: any) => {
24
+ const put = (url, data?: any, params?: any) => {
23
25
  return request.put(url, {
24
26
  data,
27
+ ...params,
25
28
  }).then(handleResponseData);
26
29
  };
27
30
 
28
- const deleteS = (url, data?: any) => {
31
+ const deleteS = (url, data?: any, params?: any) => {
29
32
  return request.delete(url, {
30
33
  data,
34
+ ...params,
31
35
  }).then(handleResponseData);
32
36
  };
33
37
 
@@ -87,16 +87,13 @@ export const handleBssulaColumnsSpecialParams = (col: any) => {
87
87
  } else if (col.timeRender) {
88
88
  // 处理不显示 时分秒的时间
89
89
  col.render = ({ text }: any) => handleTooltip(text, col.timeRender);
90
- }
91
- // 处理有问题,弃用
92
- // else if (col.textOverflow) {
93
- // // 处理文字太长
94
- // const colWidth = typeof col?.width === 'number' ? col.width : (col.width && parseWidth(col.width));
95
- // const originalRender = col?.render;
96
- // const renderText = (params) => originalRender ? originalRender(params) : params.text;
97
- // col.render = (params) => handleTextOverflowNoTooltip(renderText(params), colWidth);
98
- // }
99
- else if (col.images) {
90
+ } else if (col.textOverflow) {
91
+ // 处理文字太长
92
+ const colWidth = typeof col?.width === 'number' ? col.width : (col.width && parseWidth(col.width));
93
+ const originalRender = col?.render;
94
+ const renderText = (params) => originalRender ? originalRender(params) : params.text;
95
+ col.render = (params) => handleTextOverflowNoTooltip(renderText(params), colWidth);
96
+ } else if (col.images) {
100
97
  col.render = ({ text }: any) => tableColumnsImage(text);
101
98
  } else if (col.double) {
102
99
  col.render = ({ record }: any) =>
@@ -127,12 +124,11 @@ export const handleBssulaColumnsSpecialParams = (col: any) => {
127
124
  if (col.timeRender) {
128
125
  col.render = (text: any) => handleTooltip(text, col.timeRender);
129
126
  }
130
- // 处理有问题,弃用
131
127
  // 处理文字太长
132
- // if (col.textOverflow) {
133
- // const colWidth = typeof col?.width === 'number' ? col.width : (col.width && parseWidth(col.width))
134
- // col.render = (text: any) => handleTextOverflow(text,colWidth);
135
- // }
128
+ if (col.textOverflow) {
129
+ const colWidth = typeof col?.width === 'number' ? col.width : (col.width && parseWidth(col.width))
130
+ col.render = (text: any) => handleTextOverflow(text,colWidth);
131
+ }
136
132
  if (col.images) {
137
133
  col.render = (text: any) => tableColumnsImage(text);
138
134
  }