szld-libs 0.2.88 → 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.
- package/dist/szld-components.es.js +62 -54
- package/dist/szld-components.umd.js +3 -3
- package/es/utils/szxkFunc.d.ts +9 -1
- package/es/utils/szxkFunc.js +14 -2
- package/lib/utils/szxkFunc.d.ts +9 -1
- package/lib/utils/szxkFunc.js +14 -2
- package/package.json +1 -1
package/es/utils/szxkFunc.d.ts
CHANGED
|
@@ -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 请求参数
|
|
@@ -6,7 +14,7 @@ import { AxiosResponse } from 'axios';
|
|
|
6
14
|
* @param interfaceType 接口类型,默认值为'YLFWLRDataDetails'
|
|
7
15
|
* @returns 属性集详情 {attrid_attrtype: attrvalue} 格式的数据
|
|
8
16
|
*/
|
|
9
|
-
export declare const
|
|
17
|
+
export declare const handleGetAttrDetail: (params: any, commonRequest: (InterfaceType: string, data?: any) => Promise<AxiosResponse<any, any>>, interfaceType?: string) => Promise<any>;
|
|
10
18
|
/**
|
|
11
19
|
* 单层详情数据对应到单个属性集
|
|
12
20
|
* @param attrList 属性集列表
|
package/es/utils/szxkFunc.js
CHANGED
|
@@ -1,4 +1,15 @@
|
|
|
1
|
-
const
|
|
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
|
+
};
|
|
12
|
+
const handleGetAttrDetail = async (params, commonRequest, interfaceType) => {
|
|
2
13
|
var _a;
|
|
3
14
|
try {
|
|
4
15
|
const res = await commonRequest(interfaceType || "YLFWLRDataDetails", params);
|
|
@@ -16,6 +27,7 @@ const handleObjDetailToSignleAttrList = (attrList, detail) => {
|
|
|
16
27
|
}));
|
|
17
28
|
};
|
|
18
29
|
export {
|
|
19
|
-
|
|
30
|
+
handleGetAttrDetail,
|
|
31
|
+
handleGetAttrList,
|
|
20
32
|
handleObjDetailToSignleAttrList
|
|
21
33
|
};
|
package/lib/utils/szxkFunc.d.ts
CHANGED
|
@@ -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 请求参数
|
|
@@ -6,7 +14,7 @@ import { AxiosResponse } from 'axios';
|
|
|
6
14
|
* @param interfaceType 接口类型,默认值为'YLFWLRDataDetails'
|
|
7
15
|
* @returns 属性集详情 {attrid_attrtype: attrvalue} 格式的数据
|
|
8
16
|
*/
|
|
9
|
-
export declare const
|
|
17
|
+
export declare const handleGetAttrDetail: (params: any, commonRequest: (InterfaceType: string, data?: any) => Promise<AxiosResponse<any, any>>, interfaceType?: string) => Promise<any>;
|
|
10
18
|
/**
|
|
11
19
|
* 单层详情数据对应到单个属性集
|
|
12
20
|
* @param attrList 属性集列表
|
package/lib/utils/szxkFunc.js
CHANGED
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const
|
|
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
|
+
};
|
|
14
|
+
const handleGetAttrDetail = async (params, commonRequest, interfaceType) => {
|
|
4
15
|
var _a;
|
|
5
16
|
try {
|
|
6
17
|
const res = await commonRequest(interfaceType || "YLFWLRDataDetails", params);
|
|
@@ -17,5 +28,6 @@ const handleObjDetailToSignleAttrList = (attrList, detail) => {
|
|
|
17
28
|
attrvalue: detail[item.attrid] || ""
|
|
18
29
|
}));
|
|
19
30
|
};
|
|
20
|
-
exports.
|
|
31
|
+
exports.handleGetAttrDetail = handleGetAttrDetail;
|
|
32
|
+
exports.handleGetAttrList = handleGetAttrList;
|
|
21
33
|
exports.handleObjDetailToSignleAttrList = handleObjDetailToSignleAttrList;
|