szld-libs 0.3.71 → 0.3.73

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.
@@ -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({
@@ -189,7 +197,7 @@ function SelectModel(props) {
189
197
  /* @__PURE__ */ jsx(
190
198
  Select,
191
199
  {
192
- placeholder: handleGetPlaceholder({ json: item }),
200
+ placeholder: handleGetPlaceholder({ json: item }, langId),
193
201
  onClick: openModal,
194
202
  open: false,
195
203
  value: attrValue,
@@ -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({
@@ -191,7 +199,7 @@ function SelectModel(props) {
191
199
  /* @__PURE__ */ jsxRuntime.jsx(
192
200
  antd.Select,
193
201
  {
194
- placeholder: func.handleGetPlaceholder({ json: item }),
202
+ placeholder: func.handleGetPlaceholder({ json: item }, langId),
195
203
  onClick: openModal,
196
204
  open: false,
197
205
  value: attrValue,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "szld-libs",
3
3
  "private": false,
4
- "version": "0.3.71",
4
+ "version": "0.3.73",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",