szld-libs 0.2.89 → 0.2.90

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.
@@ -1,4 +1,12 @@
1
1
  import { AxiosResponse } from 'axios';
2
+ /**
3
+ * 获取属性集列表
4
+ * @param params
5
+ * @returns
6
+ */
7
+ export declare const handleGetAttrList: (params: {
8
+ asid: string;
9
+ }, commonRequest: (InterfaceType: string, data?: any) => Promise<AxiosResponse<any, any>>, interfaceType?: string) => Promise<any>;
2
10
  /**
3
11
  *
4
12
  * @param params 请求参数
@@ -1,3 +1,14 @@
1
+ const handleGetAttrList = async (params, commonRequest, interfaceType) => {
2
+ var _a;
3
+ try {
4
+ const res = await commonRequest(interfaceType || "SERATTALLList", params);
5
+ if ((res == null ? void 0 : res.ReturnValue) === 1) {
6
+ return ((_a = res == null ? void 0 : res.data) == null ? void 0 : _a.attr_list) || [];
7
+ }
8
+ return [];
9
+ } catch (error) {
10
+ }
11
+ };
1
12
  const handleGetAttrDetail = async (params, commonRequest, interfaceType) => {
2
13
  var _a;
3
14
  try {
@@ -17,5 +28,6 @@ const handleObjDetailToSignleAttrList = (attrList, detail) => {
17
28
  };
18
29
  export {
19
30
  handleGetAttrDetail,
31
+ handleGetAttrList,
20
32
  handleObjDetailToSignleAttrList
21
33
  };
@@ -1,4 +1,12 @@
1
1
  import { AxiosResponse } from 'axios';
2
+ /**
3
+ * 获取属性集列表
4
+ * @param params
5
+ * @returns
6
+ */
7
+ export declare const handleGetAttrList: (params: {
8
+ asid: string;
9
+ }, commonRequest: (InterfaceType: string, data?: any) => Promise<AxiosResponse<any, any>>, interfaceType?: string) => Promise<any>;
2
10
  /**
3
11
  *
4
12
  * @param params 请求参数
@@ -1,5 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const handleGetAttrList = async (params, commonRequest, interfaceType) => {
4
+ var _a;
5
+ try {
6
+ const res = await commonRequest(interfaceType || "SERATTALLList", params);
7
+ if ((res == null ? void 0 : res.ReturnValue) === 1) {
8
+ return ((_a = res == null ? void 0 : res.data) == null ? void 0 : _a.attr_list) || [];
9
+ }
10
+ return [];
11
+ } catch (error) {
12
+ }
13
+ };
3
14
  const handleGetAttrDetail = async (params, commonRequest, interfaceType) => {
4
15
  var _a;
5
16
  try {
@@ -18,4 +29,5 @@ const handleObjDetailToSignleAttrList = (attrList, detail) => {
18
29
  }));
19
30
  };
20
31
  exports.handleGetAttrDetail = handleGetAttrDetail;
32
+ exports.handleGetAttrList = handleGetAttrList;
21
33
  exports.handleObjDetailToSignleAttrList = handleObjDetailToSignleAttrList;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "szld-libs",
3
3
  "private": false,
4
- "version": "0.2.89",
4
+ "version": "0.2.90",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",