szld-libs 0.2.99 → 0.3.2
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/style.css +1 -1
- package/dist/szld-components.es.js +32023 -20148
- package/dist/szld-components.umd.js +72 -60
- package/es/components/DynamicForm/index.js +3 -2
- package/es/components/DynamicForm/selectModelBackfillFormItem/index.js +8 -7
- package/es/components/DynamicFormMobile/func.d.ts +35 -0
- package/es/components/DynamicFormMobile/func.js +204 -0
- package/es/components/DynamicFormMobile/index.d.ts +116 -0
- package/es/components/DynamicFormMobile/index.js +134 -0
- package/es/components/DynamicFormMobile/myCascader/index.d.ts +17 -0
- package/es/components/DynamicFormMobile/myCascader/index.js +196 -0
- package/es/components/DynamicFormMobile/myCascader/vite.svg +1 -0
- package/es/components/DynamicFormMobile/myCheckbox/index.d.ts +19 -0
- package/es/components/DynamicFormMobile/myCheckbox/index.js +109 -0
- package/es/components/DynamicFormMobile/myCheckbox/vite.svg +1 -0
- package/es/components/DynamicFormMobile/myRadio/index.d.ts +20 -0
- package/es/components/DynamicFormMobile/myRadio/index.js +107 -0
- package/es/components/DynamicFormMobile/myRadio/vite.svg +1 -0
- package/es/components/DynamicFormMobile/mySelect/index.css +31 -0
- package/es/components/DynamicFormMobile/mySelect/index.d.ts +16 -0
- package/es/components/DynamicFormMobile/mySelect/index.js +147 -0
- package/es/components/DynamicFormMobile/mySelect/vite.svg +1 -0
- package/es/components/DynamicFormMobile/myUpload/index.css +3 -0
- package/es/components/DynamicFormMobile/myUpload/index.d.ts +16 -0
- package/es/components/DynamicFormMobile/myUpload/index.js +103 -0
- package/es/components/DynamicFormMobile/myUpload/vite.svg +1 -0
- package/es/components/DynamicFormMobile/radioCard/index.d.ts +12 -0
- package/es/components/DynamicFormMobile/radioCard/index.js +142 -0
- package/es/components/DynamicFormMobile/radioCard/vite.svg +1 -0
- package/es/components/DynamicFormMobile/selectModel/index.d.ts +22 -0
- package/es/components/DynamicFormMobile/selectModel/index.js +235 -0
- package/es/components/DynamicFormMobile/selectModel/vite.svg +1 -0
- package/es/components/DynamicFormMobile/selectModelBackfillFormItem/index.d.ts +27 -0
- package/es/components/DynamicFormMobile/selectModelBackfillFormItem/index.js +242 -0
- package/es/components/DynamicFormMobile/selectModelBackfillFormItem/vite.svg +1 -0
- package/es/components/DynamicFormMobile/useDynamicForm.d.ts +43 -0
- package/es/components/DynamicFormMobile/useDynamicForm.js +772 -0
- package/es/components/DynamicFormMobile/vite.svg +1 -0
- package/es/index.css +1 -0
- package/es/index.d.ts +1 -1
- package/es/index.js +35 -29
- package/es/main.d.ts +2 -1
- package/es/main.js +22 -20
- package/es/mock/index.js +20 -59
- package/es/services/index.js +3 -5
- package/es/services/request.js +2 -2
- package/es/utils/method.d.ts +6 -1
- package/es/utils/method.js +60 -34
- package/lib/components/DynamicForm/index.js +3 -2
- package/lib/components/DynamicForm/selectModelBackfillFormItem/index.js +8 -7
- package/lib/components/DynamicFormMobile/func.d.ts +35 -0
- package/lib/components/DynamicFormMobile/func.js +204 -0
- package/lib/components/DynamicFormMobile/index.d.ts +116 -0
- package/lib/components/DynamicFormMobile/index.js +133 -0
- package/lib/components/DynamicFormMobile/myCascader/index.d.ts +17 -0
- package/lib/components/DynamicFormMobile/myCascader/index.js +195 -0
- package/lib/components/DynamicFormMobile/myCascader/vite.svg +1 -0
- package/lib/components/DynamicFormMobile/myCheckbox/index.d.ts +19 -0
- package/lib/components/DynamicFormMobile/myCheckbox/index.js +108 -0
- package/lib/components/DynamicFormMobile/myCheckbox/vite.svg +1 -0
- package/lib/components/DynamicFormMobile/myRadio/index.d.ts +20 -0
- package/lib/components/DynamicFormMobile/myRadio/index.js +106 -0
- package/lib/components/DynamicFormMobile/myRadio/vite.svg +1 -0
- package/lib/components/DynamicFormMobile/mySelect/index.css +31 -0
- package/lib/components/DynamicFormMobile/mySelect/index.d.ts +16 -0
- package/lib/components/DynamicFormMobile/mySelect/index.js +146 -0
- package/lib/components/DynamicFormMobile/mySelect/vite.svg +1 -0
- package/lib/components/DynamicFormMobile/myUpload/index.css +3 -0
- package/lib/components/DynamicFormMobile/myUpload/index.d.ts +16 -0
- package/lib/components/DynamicFormMobile/myUpload/index.js +102 -0
- package/lib/components/DynamicFormMobile/myUpload/vite.svg +1 -0
- package/lib/components/DynamicFormMobile/radioCard/index.d.ts +12 -0
- package/lib/components/DynamicFormMobile/radioCard/index.js +141 -0
- package/lib/components/DynamicFormMobile/radioCard/vite.svg +1 -0
- package/lib/components/DynamicFormMobile/selectModel/index.d.ts +22 -0
- package/lib/components/DynamicFormMobile/selectModel/index.js +235 -0
- package/lib/components/DynamicFormMobile/selectModel/vite.svg +1 -0
- package/lib/components/DynamicFormMobile/selectModelBackfillFormItem/index.d.ts +27 -0
- package/lib/components/DynamicFormMobile/selectModelBackfillFormItem/index.js +242 -0
- package/lib/components/DynamicFormMobile/selectModelBackfillFormItem/vite.svg +1 -0
- package/lib/components/DynamicFormMobile/useDynamicForm.d.ts +43 -0
- package/lib/components/DynamicFormMobile/useDynamicForm.js +771 -0
- package/lib/components/DynamicFormMobile/vite.svg +1 -0
- package/lib/index.css +1 -0
- package/lib/index.d.ts +1 -1
- package/lib/index.js +35 -29
- package/lib/main.d.ts +2 -1
- package/lib/main.js +2 -0
- package/lib/mock/index.js +20 -59
- package/lib/services/index.js +3 -5
- package/lib/services/request.js +2 -2
- package/lib/utils/method.d.ts +6 -1
- package/lib/utils/method.js +60 -34
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
|
package/es/index.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
package/es/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import './index.css';
|
package/es/index.js
CHANGED
|
@@ -1,44 +1,50 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { commonRequestWidthParams, uploadFormAction, commonRequest } from "./services";
|
|
3
|
+
import { handleAttrList } from "./utils/method";
|
|
4
|
+
import { BackHeader, DynamicFormMobile } from "./main";
|
|
5
|
+
import { BrowserRouter } from "react-router-dom";
|
|
6
|
+
import { ConfigProvider, App } from "antd";
|
|
7
|
+
import { Form, Button } from "react-vant";
|
|
2
8
|
import { useEffect, useRef } from "react";
|
|
3
9
|
import ReactDOM from "react-dom/client";
|
|
4
|
-
import { BrowserRouter } from "react-router-dom";
|
|
5
|
-
import { ConfigProvider, App, Form, Button } from "antd";
|
|
6
|
-
import { BackHeader, DynamicForm } from "./main";
|
|
7
|
-
import { attrList } from "./mock";
|
|
8
|
-
import { commonRequestWidthParams, uploadFormAction, commonRequest } from "./services";
|
|
9
10
|
import zhCN from "antd/es/locale/zh_CN";
|
|
11
|
+
import { attrList } from "./mock";
|
|
10
12
|
import dayjs from "dayjs";
|
|
13
|
+
const index = "";
|
|
11
14
|
dayjs.locale("zh-cn");
|
|
12
15
|
const Demo = () => {
|
|
13
16
|
useEffect(() => {
|
|
14
17
|
}, []);
|
|
15
18
|
const formRef = useRef(null);
|
|
16
|
-
|
|
17
|
-
const onFinish = (values) => {
|
|
18
|
-
};
|
|
19
|
+
Form.useForm();
|
|
19
20
|
return /* @__PURE__ */ jsxs("div", { style: { height: "100vh", display: "flex", flexDirection: "column", gap: 20 }, children: [
|
|
20
21
|
/* @__PURE__ */ jsx(BackHeader, { title: "页头组件", isBack: true }),
|
|
21
|
-
/* @__PURE__ */
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
22
|
+
/* @__PURE__ */ jsx(
|
|
23
|
+
DynamicFormMobile,
|
|
24
|
+
{
|
|
25
|
+
formConfig: handleAttrList(attrList),
|
|
26
|
+
readonly: false,
|
|
27
|
+
relatedid: "guid",
|
|
28
|
+
colNum: 1,
|
|
29
|
+
defaultWidth: "100%",
|
|
30
|
+
commonRequestWidthParams,
|
|
31
|
+
uploadAction: uploadFormAction,
|
|
32
|
+
commonRequest,
|
|
33
|
+
instructionShowMode: "icon",
|
|
34
|
+
ref: formRef,
|
|
35
|
+
formShowType: "table"
|
|
36
|
+
}
|
|
37
|
+
),
|
|
38
|
+
/* @__PURE__ */ jsx(
|
|
39
|
+
Button,
|
|
40
|
+
{
|
|
41
|
+
onClick: async () => {
|
|
42
|
+
var _a;
|
|
43
|
+
await ((_a = formRef.current) == null ? void 0 : _a.submitForm());
|
|
44
|
+
},
|
|
45
|
+
children: "提交"
|
|
46
|
+
}
|
|
47
|
+
),
|
|
42
48
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
43
49
|
"2. 测试循环滚动组件",
|
|
44
50
|
/* @__PURE__ */ jsx(
|
package/es/main.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ import LoopSlide from './components/LoopSlide';
|
|
|
9
9
|
import showWorkFlow, { WorkFlowNode } from './components/WorkFlowNode';
|
|
10
10
|
import CustomPagination from './components/CustomPagination';
|
|
11
11
|
import DynamicForm from './components/DynamicForm';
|
|
12
|
+
import DynamicFormMobile from './components/DynamicFormMobile';
|
|
12
13
|
import * as download from './utils/download';
|
|
13
14
|
import * as fileType from './utils/filetype';
|
|
14
15
|
import * as FormRules from './utils/formRules';
|
|
@@ -26,4 +27,4 @@ import useConfig from './hooks/useConfig';
|
|
|
26
27
|
import useRemember from './hooks/useRemember';
|
|
27
28
|
import useRowSelection from './hooks/useRowSelection';
|
|
28
29
|
import useDetailRender from './hooks/useDetailRender';
|
|
29
|
-
export { AES, AuthButton, BackHeader, compressionImage, CoralButton, CreateForm, EditTable, HmacSHA512, HmacSM3, LoopSlide, SearchTable, showWorkFlow, UploadFile, DynamicForm, useCaptcha, useChangePwd, useConfig, useRemember, useRowSelection, WorkFlowNode, CustomPagination, useDetailRender, utils, download, fileType, FormRules, verfyCode, method, szxkFunc, };
|
|
30
|
+
export { AES, AuthButton, BackHeader, compressionImage, CoralButton, CreateForm, EditTable, HmacSHA512, HmacSM3, LoopSlide, SearchTable, showWorkFlow, UploadFile, DynamicForm, DynamicFormMobile, useCaptcha, useChangePwd, useConfig, useRemember, useRowSelection, WorkFlowNode, CustomPagination, useDetailRender, utils, download, fileType, FormRules, verfyCode, method, szxkFunc, };
|
package/es/main.js
CHANGED
|
@@ -9,51 +9,53 @@ import { default as default9 } from "./components/LoopSlide";
|
|
|
9
9
|
import { WorkFlowNode, default as default10 } from "./components/WorkFlowNode";
|
|
10
10
|
import { default as default11 } from "./components/CustomPagination";
|
|
11
11
|
import { default as default12 } from "./components/DynamicForm";
|
|
12
|
+
import { default as default13 } from "./components/DynamicFormMobile";
|
|
12
13
|
import * as download from "./utils/download";
|
|
13
14
|
import * as filetype from "./utils/filetype";
|
|
14
15
|
import * as formRules from "./utils/formRules";
|
|
15
|
-
import { default as
|
|
16
|
+
import { default as default14 } from "./utils/image-compression";
|
|
16
17
|
import * as index from "./utils/index";
|
|
17
18
|
import * as verifyCode from "./utils/verify-code";
|
|
18
|
-
import { default as
|
|
19
|
-
import { default as
|
|
20
|
-
import { default as
|
|
19
|
+
import { default as default15 } from "./utils/aes";
|
|
20
|
+
import { default as default16 } from "./utils/hmacSHA512";
|
|
21
|
+
import { default as default17 } from "./utils/hmacSM3";
|
|
21
22
|
import * as method from "./utils/method";
|
|
22
23
|
import * as szxkFunc from "./utils/szxkFunc";
|
|
23
|
-
import { default as
|
|
24
|
-
import { default as
|
|
25
|
-
import { default as
|
|
26
|
-
import { default as
|
|
27
|
-
import { default as
|
|
28
|
-
import { default as
|
|
24
|
+
import { default as default18 } from "./hooks/useCaptcha";
|
|
25
|
+
import { default as default19 } from "./hooks/useChangePwd";
|
|
26
|
+
import { default as default20 } from "./hooks/useConfig";
|
|
27
|
+
import { default as default21 } from "./hooks/useRemember";
|
|
28
|
+
import { default as default22 } from "./hooks/useRowSelection";
|
|
29
|
+
import { default as default23 } from "./hooks/useDetailRender";
|
|
29
30
|
export {
|
|
30
|
-
|
|
31
|
+
default15 as AES,
|
|
31
32
|
default7 as AuthButton,
|
|
32
33
|
default2 as BackHeader,
|
|
33
34
|
default8 as CoralButton,
|
|
34
35
|
default3 as CreateForm,
|
|
35
36
|
default11 as CustomPagination,
|
|
36
37
|
default12 as DynamicForm,
|
|
38
|
+
default13 as DynamicFormMobile,
|
|
37
39
|
default6 as EditTable,
|
|
38
40
|
formRules as FormRules,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
+
default16 as HmacSHA512,
|
|
42
|
+
default17 as HmacSM3,
|
|
41
43
|
default9 as LoopSlide,
|
|
42
44
|
default4 as SearchTable,
|
|
43
45
|
default5 as UploadFile,
|
|
44
46
|
WorkFlowNode,
|
|
45
|
-
|
|
47
|
+
default14 as compressionImage,
|
|
46
48
|
download,
|
|
47
49
|
filetype as fileType,
|
|
48
50
|
method,
|
|
49
51
|
default10 as showWorkFlow,
|
|
50
52
|
szxkFunc,
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
53
|
+
default18 as useCaptcha,
|
|
54
|
+
default19 as useChangePwd,
|
|
55
|
+
default20 as useConfig,
|
|
56
|
+
default23 as useDetailRender,
|
|
57
|
+
default21 as useRemember,
|
|
58
|
+
default22 as useRowSelection,
|
|
57
59
|
index as utils,
|
|
58
60
|
verifyCode as verfyCode
|
|
59
61
|
};
|
package/es/mock/index.js
CHANGED
|
@@ -2,78 +2,39 @@ const baseAttrList = [];
|
|
|
2
2
|
const attrList = [
|
|
3
3
|
{
|
|
4
4
|
xh: 1,
|
|
5
|
-
asid: "
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
attrid: "02FAE63A990E4E9D87609D3DA764B10C",
|
|
9
|
-
attrname: "唯一编号",
|
|
5
|
+
asid: "904A28FACAF346DFA63CBEEB3437BDA8",
|
|
6
|
+
attrid: "6970C54A08E54463888CD8F9E7FD851B",
|
|
7
|
+
attrname: "喂药日期",
|
|
10
8
|
attrtype: 0,
|
|
11
|
-
info: '{"input":"
|
|
9
|
+
info: '{"input":"multiple-date-picker","range-picker-save":"single","dataType":"string","length":1000}',
|
|
12
10
|
info_base64: 0,
|
|
13
|
-
createtime: "2026-01-
|
|
14
|
-
attrvalue: "",
|
|
15
|
-
serialnum: 0,
|
|
16
|
-
children: []
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
xh: 2,
|
|
20
|
-
asid: "FB5D3B940E544EA898A6983A31FD1504",
|
|
21
|
-
astype: 0,
|
|
22
|
-
tname: "ygzh_table",
|
|
23
|
-
attrid: "3A8EC89103A740F192CB5FD582CA5678",
|
|
24
|
-
attrname: "账号",
|
|
25
|
-
attrtype: 0,
|
|
26
|
-
info: '{"input":"text","dataType":"string","length":100}',
|
|
27
|
-
info_base64: 0,
|
|
28
|
-
createtime: "2026-01-26 10:23:31",
|
|
29
|
-
attrvalue: "",
|
|
11
|
+
createtime: "2026-01-05 15:33:36",
|
|
30
12
|
serialnum: 1,
|
|
31
|
-
|
|
13
|
+
label_list: []
|
|
32
14
|
},
|
|
33
15
|
{
|
|
34
|
-
xh:
|
|
35
|
-
asid: "
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
attrid: "7795221133E0479D956D254A71858B39",
|
|
39
|
-
attrname: "密码",
|
|
16
|
+
xh: 2,
|
|
17
|
+
asid: "904A28FACAF346DFA63CBEEB3437BDA8",
|
|
18
|
+
attrid: "98FD46568CAC4F248B5FD66D52DF5086",
|
|
19
|
+
attrname: "当日次数",
|
|
40
20
|
attrtype: 0,
|
|
41
|
-
info: '{"input":"text","dataType":"string","length":
|
|
21
|
+
info: '{"input":"text","dataType":"string","length":1}',
|
|
42
22
|
info_base64: 0,
|
|
43
|
-
createtime: "2026-01-
|
|
44
|
-
attrvalue: "",
|
|
23
|
+
createtime: "2026-01-05 15:33:45",
|
|
45
24
|
serialnum: 2,
|
|
46
|
-
|
|
25
|
+
label_list: []
|
|
47
26
|
},
|
|
48
27
|
{
|
|
49
|
-
xh:
|
|
50
|
-
asid: "
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
attrid: "7039599603174845B3CD03CA351EEB62",
|
|
54
|
-
attrname: "关联人员编号",
|
|
28
|
+
xh: 3,
|
|
29
|
+
asid: "904A28FACAF346DFA63CBEEB3437BDA8",
|
|
30
|
+
attrid: "E7C4B706E65E4F81B51AAA9D313B5482",
|
|
31
|
+
attrname: "当日时间",
|
|
55
32
|
attrtype: 0,
|
|
56
|
-
info: '{
|
|
33
|
+
info: '{"input":"mult-select","inputType":"local","data":["09:00","10:00","11:00","12:00","13:00","14:00"],"dataType":"string","length":100}',
|
|
57
34
|
info_base64: 0,
|
|
58
|
-
createtime: "2026-01-
|
|
59
|
-
attrvalue: "",
|
|
35
|
+
createtime: "2026-01-05 15:34:22",
|
|
60
36
|
serialnum: 3,
|
|
61
|
-
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
xh: 5,
|
|
65
|
-
asid: "FB5D3B940E544EA898A6983A31FD1504",
|
|
66
|
-
astype: 0,
|
|
67
|
-
tname: "ygzh_table",
|
|
68
|
-
attrid: "3DD9CF67A3E34A62A9857CD1DB9CD782",
|
|
69
|
-
attrname: "关联人员姓名",
|
|
70
|
-
attrtype: 0,
|
|
71
|
-
info: '{\r\n "input": "mul-field-modal-select",\r\n "inputType": "url",\r\n "dataType": "string",\r\n "length": 100,\r\n "modal-caption": "关联人员",\r\n "modal-width": 800,\r\n "modal-height": 500,\r\n "modal-field-list": {\r\n "CAB51378248F4097BE2CF327F78E408B": "姓名",\r\n "F7CB899C4AE140948D2D0E161F9B1F50": "性别",\r\n "FF3E62E516124D8296D3A0BF6A7160EC": "出生年月日",\r\n "E84B71814D2C4921943B62243903F9CA": "职位"\r\n },\r\n "action-url": "http://113.219.243.107:19003/ucc?AppID=KF_SZLD_YLFWLR&Password=KF_SZLD_YLFWLR2557013&return=true&PageName=YLFWLRInstanceData&Controlname=List",\r\n "action-url-extra-params": {\r\n "asid": "3D6CD87DC9EC4CCB9FA1149A1F04E93A"\r\n },\r\n "key-field": {\r\n "3DD9CF67A3E34A62A9857CD1DB9CD782": {\r\n "list": ["CAB51378248F4097BE2CF327F78E408B"],\r\n "delimiter": "-"\r\n },\r\n "7039599603174845B3CD03CA351EEB62": {\r\n "list": ["9416A2FA296846E199738345A393E264"],\r\n "delimiter": "-"\r\n }\r\n }\r\n}',
|
|
72
|
-
info_base64: 0,
|
|
73
|
-
createtime: "2026-01-26 10:27:29",
|
|
74
|
-
attrvalue: "",
|
|
75
|
-
serialnum: 4,
|
|
76
|
-
children: []
|
|
37
|
+
label_list: []
|
|
77
38
|
}
|
|
78
39
|
];
|
|
79
40
|
export {
|
package/es/services/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import queryString from "query-string";
|
|
2
2
|
import request, { domainSetting } from "./request";
|
|
3
3
|
import { TOKEN, encryptParamStrings } from "../utils/enum";
|
|
4
|
-
import { HmacSHA512 } from "
|
|
4
|
+
import { HmacSHA512 } from "../main";
|
|
5
5
|
const commonRequest = async (InterfaceType, data) => {
|
|
6
6
|
return request.post("", data, {
|
|
7
7
|
params: {
|
|
@@ -34,7 +34,6 @@ const commonRequestActionUrl = async (data) => {
|
|
|
34
34
|
});
|
|
35
35
|
};
|
|
36
36
|
const uploadAction = () => {
|
|
37
|
-
var _a;
|
|
38
37
|
const SessionID = sessionStorage.getItem(TOKEN);
|
|
39
38
|
const params = {
|
|
40
39
|
...domainSetting.baseParams,
|
|
@@ -50,12 +49,11 @@ const uploadAction = () => {
|
|
|
50
49
|
obj[key] = params[key] || "";
|
|
51
50
|
});
|
|
52
51
|
const encryptParams = queryString.stringify(obj, { sort: false });
|
|
53
|
-
const sha = new HmacSHA512(
|
|
52
|
+
const sha = new HmacSHA512("HnSzldjt#2557013#");
|
|
54
53
|
params["TokenId"] = sha.encrypt(encryptParams);
|
|
55
54
|
return domainSetting.baseUrl + "?" + queryString.stringify(params);
|
|
56
55
|
};
|
|
57
56
|
const uploadFormAction = () => {
|
|
58
|
-
var _a;
|
|
59
57
|
const SessionID = sessionStorage.getItem(TOKEN);
|
|
60
58
|
const params = {
|
|
61
59
|
...domainSetting.baseParams,
|
|
@@ -71,7 +69,7 @@ const uploadFormAction = () => {
|
|
|
71
69
|
obj[key] = params[key] || "";
|
|
72
70
|
});
|
|
73
71
|
const encryptParams = queryString.stringify(obj, { sort: false });
|
|
74
|
-
const sha = new HmacSHA512(
|
|
72
|
+
const sha = new HmacSHA512("HnSzldjt#2557013#");
|
|
75
73
|
params["TokenId"] = sha.encrypt(encryptParams);
|
|
76
74
|
return domainSetting.baseUrl + "?" + queryString.stringify(params);
|
|
77
75
|
};
|
package/es/services/request.js
CHANGED
|
@@ -15,8 +15,8 @@ const domainSetting = {
|
|
|
15
15
|
if (env === "test" || env === "dev") {
|
|
16
16
|
domainSetting.baseUrl = "/ucc";
|
|
17
17
|
domainSetting.baseParams = {
|
|
18
|
-
AppID: "
|
|
19
|
-
Password: "
|
|
18
|
+
AppID: "KF_SZLD_DDGLXT",
|
|
19
|
+
Password: "KF_SZLD_DDGLXT2557013"
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
22
|
if (env === "dev") {
|
package/es/utils/method.d.ts
CHANGED
|
@@ -10,7 +10,12 @@ export declare function isBase64(str: string): boolean;
|
|
|
10
10
|
* @param isListToObj 是否将列表转换为提交数据格式对象,默认false
|
|
11
11
|
* @returns
|
|
12
12
|
*/
|
|
13
|
-
export declare const handleSubmitForm: (originalData:
|
|
13
|
+
export declare const handleSubmitForm: (originalData: {
|
|
14
|
+
attr_list: any[];
|
|
15
|
+
isMobile?: boolean;
|
|
16
|
+
guid?: string;
|
|
17
|
+
isListToObj?: boolean;
|
|
18
|
+
}, allValues: any) => {
|
|
14
19
|
updatedData: any;
|
|
15
20
|
uploadedFiles: any[];
|
|
16
21
|
};
|
package/es/utils/method.js
CHANGED
|
@@ -27,31 +27,36 @@ function isBase64(str) {
|
|
|
27
27
|
const base64Regex = /^[A-Za-z0-9+/]+(?:=?=?)$/;
|
|
28
28
|
return base64Regex.test(str);
|
|
29
29
|
}
|
|
30
|
-
const handleSubmitForm = (originalData, allValues
|
|
30
|
+
const handleSubmitForm = (originalData, allValues) => {
|
|
31
|
+
var _a;
|
|
31
32
|
let updatedData = _.cloneDeep(originalData);
|
|
33
|
+
const { attr_list = [] } = updatedData;
|
|
34
|
+
const { isMobile = false, guid, isListToObj = false } = originalData;
|
|
32
35
|
let uploadedFiles = [];
|
|
33
|
-
const processAttrList = (attrList) => {
|
|
36
|
+
const processAttrList = (attrList, values) => {
|
|
34
37
|
try {
|
|
35
38
|
const attrMap = new Map(attrList.map((item, index) => [item.attrid, index]));
|
|
36
|
-
for (const [fieldName, formValue] of Object.entries(
|
|
39
|
+
for (const [fieldName, formValue] of Object.entries(values)) {
|
|
37
40
|
const index = attrMap.get(fieldName);
|
|
38
|
-
if (index === void 0)
|
|
41
|
+
if (index === void 0) {
|
|
39
42
|
continue;
|
|
40
|
-
|
|
43
|
+
}
|
|
44
|
+
let attrItem = attrList[index];
|
|
41
45
|
if (!formValue && formValue !== 0) {
|
|
42
46
|
attrItem.attrvalue = "";
|
|
43
47
|
continue;
|
|
44
48
|
}
|
|
45
|
-
handleDealValue(attrItem, formValue);
|
|
49
|
+
attrItem = handleDealValue(attrItem, formValue, isMobile);
|
|
46
50
|
}
|
|
47
51
|
attrList.forEach((item) => {
|
|
48
52
|
if (item.children && Array.isArray(item.children) && item.children.length > 0 && !Array.isArray(item.children[0])) {
|
|
49
|
-
processAttrList(item.children);
|
|
53
|
+
processAttrList(item.children, values[item.attrid]);
|
|
50
54
|
}
|
|
51
55
|
if (item.children && Array.isArray(item.children) && item.children.length > 0 && Array.isArray(item.children[0])) {
|
|
52
|
-
item.children.forEach((v) => {
|
|
53
|
-
|
|
54
|
-
|
|
56
|
+
item.children.forEach((v, i) => {
|
|
57
|
+
var _a2;
|
|
58
|
+
if (v && Array.isArray(v)) {
|
|
59
|
+
processAttrList(v, (_a2 = values == null ? void 0 : values[item.attrid]) == null ? void 0 : _a2[i]);
|
|
55
60
|
}
|
|
56
61
|
});
|
|
57
62
|
}
|
|
@@ -59,9 +64,9 @@ const handleSubmitForm = (originalData, allValues, isListToObj) => {
|
|
|
59
64
|
} catch (error) {
|
|
60
65
|
}
|
|
61
66
|
};
|
|
62
|
-
const handleDealValue = (attrItem, formValue) => {
|
|
63
|
-
var
|
|
64
|
-
const inputType = (
|
|
67
|
+
const handleDealValue = (attrItem, formValue, isMobile2) => {
|
|
68
|
+
var _a2, _b, _c, _d;
|
|
69
|
+
const inputType = (_a2 = attrItem.json) == null ? void 0 : _a2.input;
|
|
65
70
|
const format = (_b = attrItem.json) == null ? void 0 : _b["format"];
|
|
66
71
|
switch (inputType) {
|
|
67
72
|
case "image":
|
|
@@ -75,8 +80,8 @@ const handleSubmitForm = (originalData, allValues, isListToObj) => {
|
|
|
75
80
|
}
|
|
76
81
|
const existingFiles = parsedValue.filter((file) => file.FileId);
|
|
77
82
|
const uploadedFileList = parsedValue.filter((file) => {
|
|
78
|
-
var
|
|
79
|
-
return file.status === "done" && ((
|
|
83
|
+
var _a3;
|
|
84
|
+
return file.status === "done" && ((_a3 = file.response) == null ? void 0 : _a3.data);
|
|
80
85
|
}).map((file) => file.response.data);
|
|
81
86
|
const allFiles = [...existingFiles, ...uploadedFileList];
|
|
82
87
|
uploadedFiles = [...uploadedFiles, ...uploadedFileList];
|
|
@@ -91,17 +96,33 @@ const handleSubmitForm = (originalData, allValues, isListToObj) => {
|
|
|
91
96
|
}
|
|
92
97
|
break;
|
|
93
98
|
case "range-picker":
|
|
94
|
-
if (
|
|
95
|
-
|
|
99
|
+
if (isMobile2) {
|
|
100
|
+
if (Array.isArray(formValue) && formValue.length > 0) {
|
|
101
|
+
attrItem.attrvalue = formValue == null ? void 0 : formValue.map((v) => dayjs(v).format(format || "YYYY-MM-DD")).join("~");
|
|
102
|
+
} else {
|
|
103
|
+
attrItem.attrvalue = "";
|
|
104
|
+
}
|
|
96
105
|
} else {
|
|
97
|
-
|
|
106
|
+
if (Array.isArray(formValue) && formValue.length > 0) {
|
|
107
|
+
attrItem.attrvalue = formValue.join("~");
|
|
108
|
+
} else {
|
|
109
|
+
attrItem.attrvalue = "";
|
|
110
|
+
}
|
|
98
111
|
}
|
|
99
112
|
break;
|
|
100
113
|
case "multiple-date-picker":
|
|
101
|
-
if (
|
|
102
|
-
|
|
114
|
+
if (isMobile2) {
|
|
115
|
+
if (Array.isArray(formValue) && formValue.length > 0) {
|
|
116
|
+
attrItem.attrvalue = formValue == null ? void 0 : formValue.map((v) => dayjs(v).format(format || "YYYY-MM-DD")).join(",");
|
|
117
|
+
} else {
|
|
118
|
+
attrItem.attrvalue = formValue;
|
|
119
|
+
}
|
|
103
120
|
} else {
|
|
104
|
-
|
|
121
|
+
if (Array.isArray(formValue) && formValue.length > 0) {
|
|
122
|
+
attrItem.attrvalue = formValue.join(",");
|
|
123
|
+
} else {
|
|
124
|
+
attrItem.attrvalue = formValue;
|
|
125
|
+
}
|
|
105
126
|
}
|
|
106
127
|
break;
|
|
107
128
|
case "checkbox":
|
|
@@ -132,10 +153,25 @@ const handleSubmitForm = (originalData, allValues, isListToObj) => {
|
|
|
132
153
|
}
|
|
133
154
|
break;
|
|
134
155
|
}
|
|
156
|
+
return attrItem;
|
|
135
157
|
};
|
|
136
158
|
if (updatedData.attr_list && Array.isArray(updatedData.attr_list)) {
|
|
137
|
-
processAttrList(
|
|
159
|
+
processAttrList(attr_list, allValues);
|
|
138
160
|
}
|
|
161
|
+
(_a = updatedData == null ? void 0 : updatedData.attr_list) == null ? void 0 : _a.forEach((v) => {
|
|
162
|
+
var _a2, _b, _c, _d, _e, _f;
|
|
163
|
+
if (((_a2 = v == null ? void 0 : v.json) == null ? void 0 : _a2["auto-generate"]) && ((_b = v == null ? void 0 : v.json) == null ? void 0 : _b["auto-generate-type"])) {
|
|
164
|
+
if (((_c = v == null ? void 0 : v.json) == null ? void 0 : _c["auto-generate-type"]) === "currenttime") {
|
|
165
|
+
v.attrvalue = dayjs().format("YYYY-MM-DD HH:mm:ss");
|
|
166
|
+
}
|
|
167
|
+
if (((_d = v == null ? void 0 : v.json) == null ? void 0 : _d["auto-generate-type"]) === "guid") {
|
|
168
|
+
v.attrvalue = guid || "";
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
if ((_e = v == null ? void 0 : v.json) == null ? void 0 : _e["default"]) {
|
|
172
|
+
v.attrvalue = (_f = v == null ? void 0 : v.json) == null ? void 0 : _f["default"];
|
|
173
|
+
}
|
|
174
|
+
});
|
|
139
175
|
return {
|
|
140
176
|
updatedData: isListToObj ? handleAttrListToObj(updatedData.attr_list || []) : updatedData,
|
|
141
177
|
uploadedFiles
|
|
@@ -313,12 +349,8 @@ const handleAttrListToObj = (attrList) => {
|
|
|
313
349
|
data_list: [processLevel(item.children)]
|
|
314
350
|
};
|
|
315
351
|
} else if (item.attrtype === 1 && item.children.length > 0 && Array.isArray(item.children)) {
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
if (Array.isArray(attrvalue) && (attrvalue == null ? void 0 : attrvalue.length)) {
|
|
319
|
-
item.children = attrvalue.map((v) => {
|
|
320
|
-
return handleObjDetailToSignleAttrList((children == null ? void 0 : children[0]) || [], v);
|
|
321
|
-
});
|
|
352
|
+
const { children = [] } = item || {};
|
|
353
|
+
if ((children == null ? void 0 : children.length) && Array.isArray(children == null ? void 0 : children[0])) {
|
|
322
354
|
result[key] = {
|
|
323
355
|
asid: ((_e = (_d = (_c = item.children) == null ? void 0 : _c[0]) == null ? void 0 : _d[0]) == null ? void 0 : _e.asid) || "",
|
|
324
356
|
data_list: item.children.map((child) => {
|
|
@@ -471,12 +503,6 @@ const handleSelectOptions = async ({
|
|
|
471
503
|
}
|
|
472
504
|
return options;
|
|
473
505
|
};
|
|
474
|
-
const handleObjDetailToSignleAttrList = (attrList, detail) => {
|
|
475
|
-
return attrList.map((item) => ({
|
|
476
|
-
...item,
|
|
477
|
-
attrvalue: detail[item.attrid] || ""
|
|
478
|
-
}));
|
|
479
|
-
};
|
|
480
506
|
export {
|
|
481
507
|
base64ToString,
|
|
482
508
|
getJson,
|
|
@@ -30,7 +30,8 @@ const DynamicForm = react.forwardRef((props, ref) => {
|
|
|
30
30
|
hideAttrList = [],
|
|
31
31
|
formShowType = "form",
|
|
32
32
|
headerWidth,
|
|
33
|
-
formListItemWidth
|
|
33
|
+
formListItemWidth,
|
|
34
|
+
formListItemName
|
|
34
35
|
} = props;
|
|
35
36
|
const delFileListRef = react.useRef([]);
|
|
36
37
|
const updateDelFileList = (file) => {
|
|
@@ -58,7 +59,7 @@ const DynamicForm = react.forwardRef((props, ref) => {
|
|
|
58
59
|
return delFileListRef.current;
|
|
59
60
|
}
|
|
60
61
|
}));
|
|
61
|
-
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: formShowType === "table" ? /* @__PURE__ */ jsxRuntime.jsx(antd.Form.List, { name: "customFormList", initialValue: [{}], children: (fields, { add, remove }) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "custom-form-list", children: [
|
|
62
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: formShowType === "table" ? /* @__PURE__ */ jsxRuntime.jsx(antd.Form.List, { name: formListItemName || "customFormList", initialValue: [{}], children: (fields, { add, remove }) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "custom-form-list", children: [
|
|
62
63
|
/* @__PURE__ */ jsxRuntime.jsxs(antd.Flex, { align: "center", children: [
|
|
63
64
|
/* @__PURE__ */ jsxRuntime.jsx(antd.Flex, { className: "custom-form-list-header", align: "center", children: formConfig == null ? void 0 : formConfig.map((child, index) => {
|
|
64
65
|
return /* @__PURE__ */ jsxRuntime.jsxs(antd.Flex, { style: { width: (headerWidth == null ? void 0 : headerWidth[index]) || defaultWidth }, align: "center", children: [
|
|
@@ -74,21 +74,22 @@ function SelectModel(props) {
|
|
|
74
74
|
message.error("请配置action-url");
|
|
75
75
|
};
|
|
76
76
|
const openModal = () => {
|
|
77
|
-
var _a
|
|
77
|
+
var _a;
|
|
78
78
|
if (disabled) {
|
|
79
79
|
return;
|
|
80
80
|
}
|
|
81
81
|
if (value) {
|
|
82
|
-
const
|
|
83
|
-
const
|
|
84
|
-
|
|
82
|
+
const keyField = item == null ? void 0 : item["key-field"];
|
|
83
|
+
const el = keyField == null ? void 0 : keyField[attrid];
|
|
84
|
+
const { delimiter = "-", list = [] } = el || {};
|
|
85
|
+
if (!keyField) {
|
|
85
86
|
message.error("请配置key-field");
|
|
86
87
|
return;
|
|
87
88
|
}
|
|
88
89
|
switch (mode) {
|
|
89
|
-
case "modal-select":
|
|
90
|
-
const id = value == null ? void 0 : value.split(
|
|
91
|
-
const index = dataSource == null ? void 0 : dataSource.findIndex((item2) =>
|
|
90
|
+
case "mul-field-modal-select":
|
|
91
|
+
const id = (_a = value == null ? void 0 : value.split(delimiter)) == null ? void 0 : _a[0];
|
|
92
|
+
const index = dataSource == null ? void 0 : dataSource.findIndex((item2) => Object.values(item2).includes(id));
|
|
92
93
|
setSelectedRowKeys([index]);
|
|
93
94
|
break;
|
|
94
95
|
case "modal-mult-select":
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { IformConfigItem, Ijson } from './index.d';
|
|
2
|
+
import { RangePickerProps } from 'antd/es/date-picker';
|
|
3
|
+
import { AxiosResponse } from 'axios';
|
|
4
|
+
export declare const handleGetPlaceholder: (itemWithJson: IformConfigItem) => string;
|
|
5
|
+
/**
|
|
6
|
+
* 处理表单项目初始值
|
|
7
|
+
* 根据输入类型转换初始值为组件所需格式
|
|
8
|
+
*/
|
|
9
|
+
export declare const handleSetFormItemInitialValue: (itemWithJson: IformConfigItem) => any;
|
|
10
|
+
export declare const disabledDate: RangePickerProps['disabledDate'];
|
|
11
|
+
/**
|
|
12
|
+
* 处理URL选项
|
|
13
|
+
* 将URL中的指定字段拼接为字符串
|
|
14
|
+
*/
|
|
15
|
+
export declare const handleUrlOptions: (val: any, delimiter: string, list: any[]) => string;
|
|
16
|
+
/**
|
|
17
|
+
* 根据配置处理成下拉数据
|
|
18
|
+
* @param param0
|
|
19
|
+
* @returns
|
|
20
|
+
*/
|
|
21
|
+
export declare const handleSelectOptions: ({ commonRequestWidthParams, commonRequest, interfaceTypeDict, interfaceTypeSysDict, actionUrlKey, actionUrlExtraParams, item, }: {
|
|
22
|
+
commonRequestWidthParams: (params: object, data?: any) => Promise<AxiosResponse<any, any>>;
|
|
23
|
+
commonRequest: (InterfaceType: string, data?: any) => Promise<AxiosResponse<any, any>>;
|
|
24
|
+
interfaceTypeDict?: string | undefined;
|
|
25
|
+
interfaceTypeSysDict?: string | undefined;
|
|
26
|
+
actionUrlKey?: string | undefined;
|
|
27
|
+
actionUrlExtraParams?: object | undefined;
|
|
28
|
+
item: Ijson;
|
|
29
|
+
}) => Promise<any[]>;
|
|
30
|
+
/**
|
|
31
|
+
* attrList 格式的单层数组 处理成对象{attrid:attrname}
|
|
32
|
+
*/
|
|
33
|
+
export declare const handleGetSingleAttrListObj: (children: any[]) => {
|
|
34
|
+
[key: string]: any;
|
|
35
|
+
}[];
|