szld-libs 0.3.57 → 0.3.59
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 +4465 -4451
- package/dist/szld-components.umd.js +30 -30
- package/es/utils/method.d.ts +1 -0
- package/es/utils/method.js +2 -2
- package/es/utils/szxkFunc.d.ts +11 -0
- package/es/utils/szxkFunc.js +15 -0
- package/lib/utils/method.d.ts +1 -0
- package/lib/utils/method.js +2 -2
- package/lib/utils/szxkFunc.d.ts +11 -0
- package/lib/utils/szxkFunc.js +15 -0
- package/package.json +1 -1
package/es/utils/method.d.ts
CHANGED
package/es/utils/method.js
CHANGED
|
@@ -31,7 +31,7 @@ const handleSubmitForm = (originalData, allValues) => {
|
|
|
31
31
|
var _a;
|
|
32
32
|
let updatedData = _.cloneDeep(originalData);
|
|
33
33
|
const { attr_list = [] } = updatedData;
|
|
34
|
-
const { isMobile = false, guid, isListToObj = false, isAutoFill = true } = originalData;
|
|
34
|
+
const { isMobile = false, guid, isListToObj = false, isAutoFill = true, onlyNumber = "" } = originalData;
|
|
35
35
|
let uploadedFiles = [];
|
|
36
36
|
if (isAutoFill) {
|
|
37
37
|
(_a = updatedData == null ? void 0 : updatedData.attr_list) == null ? void 0 : _a.forEach((v) => {
|
|
@@ -41,7 +41,7 @@ const handleSubmitForm = (originalData, allValues) => {
|
|
|
41
41
|
v.attrvalue = dayjs().format("YYYY-MM-DD HH:mm:ss");
|
|
42
42
|
}
|
|
43
43
|
if (((_d = v == null ? void 0 : v.json) == null ? void 0 : _d["auto-generate-type"]) === "guid") {
|
|
44
|
-
v.attrvalue = guid || "";
|
|
44
|
+
v.attrvalue = onlyNumber || guid || "";
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
if ((_e = v == null ? void 0 : v.json) == null ? void 0 : _e["default"]) {
|
package/es/utils/szxkFunc.d.ts
CHANGED
|
@@ -37,6 +37,17 @@ export declare const handleGetList: (params: {
|
|
|
37
37
|
Controlname: string;
|
|
38
38
|
InterfaceType: string;
|
|
39
39
|
}) => Promise<any>;
|
|
40
|
+
/**
|
|
41
|
+
* 调用通用支持代码接口
|
|
42
|
+
*/
|
|
43
|
+
export declare const handleCallSupportCode: ({ params, commonRequestWidthParams, requestParams, }: {
|
|
44
|
+
params: Record<string, any>;
|
|
45
|
+
commonRequestWidthParams: (params: object, data?: any) => Promise<AxiosResponse<any, any>>;
|
|
46
|
+
requestParams?: {
|
|
47
|
+
PageName: string;
|
|
48
|
+
Controlname: string;
|
|
49
|
+
} | undefined;
|
|
50
|
+
}) => Promise<void>;
|
|
40
51
|
/**
|
|
41
52
|
* 单层详情数据对应到单个属性集
|
|
42
53
|
* @param attrList 属性集列表
|
package/es/utils/szxkFunc.js
CHANGED
|
@@ -36,6 +36,20 @@ const handleGetList = async (params, commonRequestWidthParams, requestParams) =>
|
|
|
36
36
|
} catch (error) {
|
|
37
37
|
}
|
|
38
38
|
};
|
|
39
|
+
const handleCallSupportCode = async ({
|
|
40
|
+
params,
|
|
41
|
+
commonRequestWidthParams,
|
|
42
|
+
requestParams
|
|
43
|
+
}) => {
|
|
44
|
+
const defaultRequestParams = {
|
|
45
|
+
PageName: "PCInstanceData",
|
|
46
|
+
Controlname: "DataProcess"
|
|
47
|
+
};
|
|
48
|
+
try {
|
|
49
|
+
const res = await commonRequestWidthParams(requestParams || defaultRequestParams || {}, params);
|
|
50
|
+
} catch (error) {
|
|
51
|
+
}
|
|
52
|
+
};
|
|
39
53
|
const handleObjDetailToSignleAttrList = (attrList, detail) => {
|
|
40
54
|
return attrList.map((item) => ({
|
|
41
55
|
...item,
|
|
@@ -48,6 +62,7 @@ const handleSetTableRowColor = (record, index, ngColor) => ({
|
|
|
48
62
|
}
|
|
49
63
|
});
|
|
50
64
|
export {
|
|
65
|
+
handleCallSupportCode,
|
|
51
66
|
handleGetAttrDetail,
|
|
52
67
|
handleGetAttrList,
|
|
53
68
|
handleGetList,
|
package/lib/utils/method.d.ts
CHANGED
package/lib/utils/method.js
CHANGED
|
@@ -33,7 +33,7 @@ const handleSubmitForm = (originalData, allValues) => {
|
|
|
33
33
|
var _a;
|
|
34
34
|
let updatedData = _.cloneDeep(originalData);
|
|
35
35
|
const { attr_list = [] } = updatedData;
|
|
36
|
-
const { isMobile = false, guid, isListToObj = false, isAutoFill = true } = originalData;
|
|
36
|
+
const { isMobile = false, guid, isListToObj = false, isAutoFill = true, onlyNumber = "" } = originalData;
|
|
37
37
|
let uploadedFiles = [];
|
|
38
38
|
if (isAutoFill) {
|
|
39
39
|
(_a = updatedData == null ? void 0 : updatedData.attr_list) == null ? void 0 : _a.forEach((v) => {
|
|
@@ -43,7 +43,7 @@ const handleSubmitForm = (originalData, allValues) => {
|
|
|
43
43
|
v.attrvalue = dayjs().format("YYYY-MM-DD HH:mm:ss");
|
|
44
44
|
}
|
|
45
45
|
if (((_d = v == null ? void 0 : v.json) == null ? void 0 : _d["auto-generate-type"]) === "guid") {
|
|
46
|
-
v.attrvalue = guid || "";
|
|
46
|
+
v.attrvalue = onlyNumber || guid || "";
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
if ((_e = v == null ? void 0 : v.json) == null ? void 0 : _e["default"]) {
|
package/lib/utils/szxkFunc.d.ts
CHANGED
|
@@ -37,6 +37,17 @@ export declare const handleGetList: (params: {
|
|
|
37
37
|
Controlname: string;
|
|
38
38
|
InterfaceType: string;
|
|
39
39
|
}) => Promise<any>;
|
|
40
|
+
/**
|
|
41
|
+
* 调用通用支持代码接口
|
|
42
|
+
*/
|
|
43
|
+
export declare const handleCallSupportCode: ({ params, commonRequestWidthParams, requestParams, }: {
|
|
44
|
+
params: Record<string, any>;
|
|
45
|
+
commonRequestWidthParams: (params: object, data?: any) => Promise<AxiosResponse<any, any>>;
|
|
46
|
+
requestParams?: {
|
|
47
|
+
PageName: string;
|
|
48
|
+
Controlname: string;
|
|
49
|
+
} | undefined;
|
|
50
|
+
}) => Promise<void>;
|
|
40
51
|
/**
|
|
41
52
|
* 单层详情数据对应到单个属性集
|
|
42
53
|
* @param attrList 属性集列表
|
package/lib/utils/szxkFunc.js
CHANGED
|
@@ -38,6 +38,20 @@ const handleGetList = async (params, commonRequestWidthParams, requestParams) =>
|
|
|
38
38
|
} catch (error) {
|
|
39
39
|
}
|
|
40
40
|
};
|
|
41
|
+
const handleCallSupportCode = async ({
|
|
42
|
+
params,
|
|
43
|
+
commonRequestWidthParams,
|
|
44
|
+
requestParams
|
|
45
|
+
}) => {
|
|
46
|
+
const defaultRequestParams = {
|
|
47
|
+
PageName: "PCInstanceData",
|
|
48
|
+
Controlname: "DataProcess"
|
|
49
|
+
};
|
|
50
|
+
try {
|
|
51
|
+
const res = await commonRequestWidthParams(requestParams || defaultRequestParams || {}, params);
|
|
52
|
+
} catch (error) {
|
|
53
|
+
}
|
|
54
|
+
};
|
|
41
55
|
const handleObjDetailToSignleAttrList = (attrList, detail) => {
|
|
42
56
|
return attrList.map((item) => ({
|
|
43
57
|
...item,
|
|
@@ -49,6 +63,7 @@ const handleSetTableRowColor = (record, index, ngColor) => ({
|
|
|
49
63
|
backgroundColor: index !== void 0 && index % 2 === 1 ? (ngColor == null ? void 0 : ngColor[0]) || "var(--bg-color-2)" : (ngColor == null ? void 0 : ngColor[1]) || "var(--bg-color-3)"
|
|
50
64
|
}
|
|
51
65
|
});
|
|
66
|
+
exports.handleCallSupportCode = handleCallSupportCode;
|
|
52
67
|
exports.handleGetAttrDetail = handleGetAttrDetail;
|
|
53
68
|
exports.handleGetAttrList = handleGetAttrList;
|
|
54
69
|
exports.handleGetList = handleGetList;
|