szld-libs 0.3.70 → 0.3.72

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.
@@ -25,7 +25,6 @@ const DynamicForm = forwardRef((props, ref) => {
25
25
  actionUrlExtraParams = {},
26
26
  CustomModalComponent,
27
27
  formShowType = "form",
28
- headerWidth,
29
28
  formListItemWidth,
30
29
  formListItemName,
31
30
  isEdit = false,
@@ -43,7 +43,7 @@ function SelectModel(props) {
43
43
  setSelectedRecords(selectedRows);
44
44
  };
45
45
  const getData = async () => {
46
- var _a, _b, _c;
46
+ var _a, _b, _c, _d, _e;
47
47
  if (item.inputType === "url" && (item == null ? void 0 : item["action-url"])) {
48
48
  setLoading(true);
49
49
  try {
@@ -95,13 +95,21 @@ function SelectModel(props) {
95
95
  try {
96
96
  const res = await commonRequestWidthParams(defaultRequestParams, _params);
97
97
  if ((res == null ? void 0 : res.ReturnValue) === 1) {
98
- setDataSource(((_b = res == null ? void 0 : res.data) == null ? void 0 : _b.list) || []);
98
+ const list = (_c = ((_b = res == null ? void 0 : res.data) == null ? void 0 : _b.list) || []) == null ? void 0 : _c.map((item2, index) => {
99
+ const _rowKey = (params.PageNum - 1) * params.PageSize + index;
100
+ return {
101
+ ...item2,
102
+ _rowKey
103
+ };
104
+ });
105
+ setTotal(((_d = res == null ? void 0 : res.data) == null ? void 0 : _d.number) || 0);
106
+ setDataSource([...list]);
99
107
  }
100
108
  const config = await commonRequest("YLKHDSelPCParam", {
101
109
  "source-number": item == null ? void 0 : item["instance-source-number"]
102
110
  });
103
111
  if ((config == null ? void 0 : config.ReturnValue) === 1) {
104
- const configData = (_c = config == null ? void 0 : config.data) == null ? void 0 : _c[item == null ? void 0 : item["instance-source-number"]];
112
+ const configData = (_e = config == null ? void 0 : config.data) == null ? void 0 : _e[item == null ? void 0 : item["instance-source-number"]];
105
113
  const universalHeader = (configData == null ? void 0 : configData["universal-header"]) || [];
106
114
  const attributeSetId = (configData == null ? void 0 : configData["attribute-set-id"]) || "";
107
115
  const list = handleUniversalHeaderToColumns({
@@ -109,7 +117,7 @@ function SelectModel(props) {
109
117
  attributeSetId,
110
118
  getTitle
111
119
  }) || [];
112
- setColumns(list);
120
+ setColumns([...list]);
113
121
  }
114
122
  } catch (error) {
115
123
  }
@@ -26,7 +26,6 @@ const DynamicForm = react.forwardRef((props, ref) => {
26
26
  actionUrlExtraParams = {},
27
27
  CustomModalComponent,
28
28
  formShowType = "form",
29
- headerWidth,
30
29
  formListItemWidth,
31
30
  formListItemName,
32
31
  isEdit = false,
@@ -45,7 +45,7 @@ function SelectModel(props) {
45
45
  setSelectedRecords(selectedRows);
46
46
  };
47
47
  const getData = async () => {
48
- var _a, _b, _c;
48
+ var _a, _b, _c, _d, _e;
49
49
  if (item.inputType === "url" && (item == null ? void 0 : item["action-url"])) {
50
50
  setLoading(true);
51
51
  try {
@@ -97,13 +97,21 @@ function SelectModel(props) {
97
97
  try {
98
98
  const res = await commonRequestWidthParams(defaultRequestParams, _params);
99
99
  if ((res == null ? void 0 : res.ReturnValue) === 1) {
100
- setDataSource(((_b = res == null ? void 0 : res.data) == null ? void 0 : _b.list) || []);
100
+ const list = (_c = ((_b = res == null ? void 0 : res.data) == null ? void 0 : _b.list) || []) == null ? void 0 : _c.map((item2, index) => {
101
+ const _rowKey = (params.PageNum - 1) * params.PageSize + index;
102
+ return {
103
+ ...item2,
104
+ _rowKey
105
+ };
106
+ });
107
+ setTotal(((_d = res == null ? void 0 : res.data) == null ? void 0 : _d.number) || 0);
108
+ setDataSource([...list]);
101
109
  }
102
110
  const config = await commonRequest("YLKHDSelPCParam", {
103
111
  "source-number": item == null ? void 0 : item["instance-source-number"]
104
112
  });
105
113
  if ((config == null ? void 0 : config.ReturnValue) === 1) {
106
- const configData = (_c = config == null ? void 0 : config.data) == null ? void 0 : _c[item == null ? void 0 : item["instance-source-number"]];
114
+ const configData = (_e = config == null ? void 0 : config.data) == null ? void 0 : _e[item == null ? void 0 : item["instance-source-number"]];
107
115
  const universalHeader = (configData == null ? void 0 : configData["universal-header"]) || [];
108
116
  const attributeSetId = (configData == null ? void 0 : configData["attribute-set-id"]) || "";
109
117
  const list = handleUniversalHeaderToColumns({
@@ -111,7 +119,7 @@ function SelectModel(props) {
111
119
  attributeSetId,
112
120
  getTitle
113
121
  }) || [];
114
- setColumns(list);
122
+ setColumns([...list]);
115
123
  }
116
124
  } catch (error) {
117
125
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "szld-libs",
3
3
  "private": false,
4
- "version": "0.3.70",
4
+ "version": "0.3.72",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",