szld-libs 0.4.11 → 0.4.13
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 +4264 -4216
- package/dist/szld-components.umd.js +41 -41
- package/es/components/DynamicForm/func.d.ts +15 -0
- package/es/components/DynamicForm/func.js +40 -0
- package/es/components/DynamicForm/mySelect/index.d.ts +3 -1
- package/es/components/DynamicForm/mySelect/index.js +67 -15
- package/es/components/DynamicForm/selectModelBackfillFormItem/index.d.ts +0 -7
- package/es/components/DynamicForm/selectModelBackfillFormItem/index.js +2 -28
- package/es/components/DynamicForm/useDynamicForm.js +6 -0
- package/es/components/DynamicFormMobile/useDynamicForm.js +11 -6
- package/es/index.js +9 -0
- package/es/mock/index.js +1 -1
- package/es/utils/szxkFunc.d.ts +3 -2
- package/es/utils/szxkFunc.js +12 -0
- package/lib/components/DynamicForm/func.d.ts +15 -0
- package/lib/components/DynamicForm/func.js +40 -0
- package/lib/components/DynamicForm/mySelect/index.d.ts +3 -1
- package/lib/components/DynamicForm/mySelect/index.js +65 -13
- package/lib/components/DynamicForm/selectModelBackfillFormItem/index.d.ts +0 -7
- package/lib/components/DynamicForm/selectModelBackfillFormItem/index.js +3 -30
- package/lib/components/DynamicForm/useDynamicForm.js +6 -0
- package/lib/components/DynamicFormMobile/useDynamicForm.js +11 -6
- package/lib/index.js +9 -0
- package/lib/mock/index.js +1 -1
- package/lib/utils/szxkFunc.d.ts +3 -2
- package/lib/utils/szxkFunc.js +12 -0
- package/package.json +1 -1
|
@@ -109,12 +109,6 @@ function useDynamicForm(props) {
|
|
|
109
109
|
value: value ? dayjs(value) : null
|
|
110
110
|
});
|
|
111
111
|
break;
|
|
112
|
-
case "second-picker":
|
|
113
|
-
baseProps.getValueFromEvent = (date) => date == null ? void 0 : date.format(format || "HH:mm:ss");
|
|
114
|
-
baseProps.getValueProps = (value) => ({
|
|
115
|
-
value: value ? dayjs(value, format || "HH:mm:ss") : null
|
|
116
|
-
});
|
|
117
|
-
break;
|
|
118
112
|
}
|
|
119
113
|
return baseProps;
|
|
120
114
|
},
|
|
@@ -609,6 +603,13 @@ function useDynamicForm(props) {
|
|
|
609
603
|
}
|
|
610
604
|
case "range-picker":
|
|
611
605
|
return /* @__PURE__ */ jsxRuntime.jsx(reactVant.Calendar, { type: "range", readOnly: readonly, children: (val, actions) => {
|
|
606
|
+
const valType = typeof val;
|
|
607
|
+
if (valType === "string") {
|
|
608
|
+
val = val.split("~");
|
|
609
|
+
if (val.length === 1) {
|
|
610
|
+
val = [val[0], val[1]];
|
|
611
|
+
}
|
|
612
|
+
}
|
|
612
613
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
613
614
|
reactVant.Cell,
|
|
614
615
|
{
|
|
@@ -624,6 +625,10 @@ function useDynamicForm(props) {
|
|
|
624
625
|
} });
|
|
625
626
|
case "multiple-date-picker":
|
|
626
627
|
return /* @__PURE__ */ jsxRuntime.jsx(reactVant.Calendar, { type: "multiple", children: (val, actions) => {
|
|
628
|
+
const valType = typeof val;
|
|
629
|
+
if (valType === "string") {
|
|
630
|
+
val = val.split(",");
|
|
631
|
+
}
|
|
627
632
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
628
633
|
reactVant.Cell,
|
|
629
634
|
{
|
package/lib/index.js
CHANGED
|
@@ -24,6 +24,15 @@ const Demo = () => {
|
|
|
24
24
|
};
|
|
25
25
|
react.useEffect(() => {
|
|
26
26
|
setList(method.handleAttrList(mock.attrList));
|
|
27
|
+
setTimeout(() => {
|
|
28
|
+
form.setFieldsValue({
|
|
29
|
+
customFormList: [
|
|
30
|
+
{
|
|
31
|
+
"30BDE6E7977E40069B55DDE61C8795AE": "2026-05-29"
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
});
|
|
35
|
+
}, 2e3);
|
|
27
36
|
}, []);
|
|
28
37
|
const onFinish = async (values) => {
|
|
29
38
|
};
|
package/lib/mock/index.js
CHANGED
|
@@ -10,7 +10,7 @@ const attrList = [
|
|
|
10
10
|
attrid: "30BDE6E7977E40069B55DDE61C8795AE",
|
|
11
11
|
attrname: "Dates",
|
|
12
12
|
attrtype: 0,
|
|
13
|
-
info: '{"readonly":
|
|
13
|
+
info: '{"readonly":false,"input":"multiple-date-picker","range-picker-save":"single","dataType":"string","length":1000,"input-width":240,"must":true}',
|
|
14
14
|
info_base64: 0,
|
|
15
15
|
createtime: "2026-02-11 15:12:26",
|
|
16
16
|
attrvalue: "",
|
package/lib/utils/szxkFunc.d.ts
CHANGED
|
@@ -29,8 +29,8 @@ export declare const handleGetAttrDetail: (params: {
|
|
|
29
29
|
*/
|
|
30
30
|
export declare const handleGetList: (params: {
|
|
31
31
|
[key: string]: any;
|
|
32
|
-
pageSize
|
|
33
|
-
pageNum
|
|
32
|
+
pageSize?: number | undefined;
|
|
33
|
+
pageNum?: number | undefined;
|
|
34
34
|
'source-number': string | number;
|
|
35
35
|
}, commonRequestWidthParams: (params: object, data?: any) => Promise<AxiosResponse<any, any>>, requestParams?: {
|
|
36
36
|
PageName: string;
|
|
@@ -68,3 +68,4 @@ export declare const handleSetTableRowColor: (record: any, index: number | undef
|
|
|
68
68
|
};
|
|
69
69
|
export declare const handleFormatMobileDate: (values: Record<string, any>, format?: string) => Record<string, any>;
|
|
70
70
|
export declare const handleNonUniversalHeader: (nonUniversalHeader: Record<string, string>, data: Record<string, any>) => Record<string, any>;
|
|
71
|
+
export declare const handleGetControlPanelConfig: (sourceNumber: string | number, commonRequest: (InterfaceType: string, data?: any) => Promise<AxiosResponse<any, any>>) => Promise<any>;
|
package/lib/utils/szxkFunc.js
CHANGED
|
@@ -89,10 +89,22 @@ const handleNonUniversalHeader = (nonUniversalHeader, data) => {
|
|
|
89
89
|
}
|
|
90
90
|
return mappedResult;
|
|
91
91
|
};
|
|
92
|
+
const handleGetControlPanelConfig = async (sourceNumber, commonRequest) => {
|
|
93
|
+
var _a;
|
|
94
|
+
try {
|
|
95
|
+
const res = await commonRequest("YLKHDSelPCParam", { "source-number": sourceNumber });
|
|
96
|
+
if ((res == null ? void 0 : res.ReturnValue) === 1) {
|
|
97
|
+
return ((_a = res == null ? void 0 : res.data) == null ? void 0 : _a[sourceNumber]) || {};
|
|
98
|
+
}
|
|
99
|
+
return null;
|
|
100
|
+
} catch (error) {
|
|
101
|
+
}
|
|
102
|
+
};
|
|
92
103
|
exports.handleCallSupportCode = handleCallSupportCode;
|
|
93
104
|
exports.handleFormatMobileDate = handleFormatMobileDate;
|
|
94
105
|
exports.handleGetAttrDetail = handleGetAttrDetail;
|
|
95
106
|
exports.handleGetAttrList = handleGetAttrList;
|
|
107
|
+
exports.handleGetControlPanelConfig = handleGetControlPanelConfig;
|
|
96
108
|
exports.handleGetList = handleGetList;
|
|
97
109
|
exports.handleNonUniversalHeader = handleNonUniversalHeader;
|
|
98
110
|
exports.handleObjDetailToSignleAttrList = handleObjDetailToSignleAttrList;
|