szld-libs 0.2.99 → 0.3.1
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 +32001 -20129
- 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 +36 -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 +4 -1
- package/es/utils/method.js +25 -8
- 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 +36 -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 +4 -1
- package/lib/utils/method.js +25 -8
- 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,51 @@
|
|
|
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
|
+
interfaceTypeChildren: "YLFWLRDetailAttrlist",
|
|
26
|
+
formConfig: handleAttrList(attrList),
|
|
27
|
+
readonly: false,
|
|
28
|
+
relatedid: "guid",
|
|
29
|
+
colNum: 1,
|
|
30
|
+
defaultWidth: "100%",
|
|
31
|
+
commonRequestWidthParams,
|
|
32
|
+
uploadAction: uploadFormAction,
|
|
33
|
+
commonRequest,
|
|
34
|
+
instructionShowMode: "icon",
|
|
35
|
+
ref: formRef,
|
|
36
|
+
formShowType: "table"
|
|
37
|
+
}
|
|
38
|
+
),
|
|
39
|
+
/* @__PURE__ */ jsx(
|
|
40
|
+
Button,
|
|
41
|
+
{
|
|
42
|
+
onClick: async () => {
|
|
43
|
+
var _a;
|
|
44
|
+
await ((_a = formRef.current) == null ? void 0 : _a.submitForm());
|
|
45
|
+
},
|
|
46
|
+
children: "提交"
|
|
47
|
+
}
|
|
48
|
+
),
|
|
42
49
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
43
50
|
"2. 测试循环滚动组件",
|
|
44
51
|
/* @__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,10 @@ 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
|
+
}, allValues: any, isListToObj?: boolean) => {
|
|
14
17
|
updatedData: any;
|
|
15
18
|
uploadedFiles: any[];
|
|
16
19
|
};
|
package/es/utils/method.js
CHANGED
|
@@ -29,6 +29,7 @@ function isBase64(str) {
|
|
|
29
29
|
}
|
|
30
30
|
const handleSubmitForm = (originalData, allValues, isListToObj) => {
|
|
31
31
|
let updatedData = _.cloneDeep(originalData);
|
|
32
|
+
const { isMobile = false } = originalData;
|
|
32
33
|
let uploadedFiles = [];
|
|
33
34
|
const processAttrList = (attrList) => {
|
|
34
35
|
try {
|
|
@@ -42,7 +43,7 @@ const handleSubmitForm = (originalData, allValues, isListToObj) => {
|
|
|
42
43
|
attrItem.attrvalue = "";
|
|
43
44
|
continue;
|
|
44
45
|
}
|
|
45
|
-
handleDealValue(attrItem, formValue);
|
|
46
|
+
handleDealValue(attrItem, formValue, isMobile);
|
|
46
47
|
}
|
|
47
48
|
attrList.forEach((item) => {
|
|
48
49
|
if (item.children && Array.isArray(item.children) && item.children.length > 0 && !Array.isArray(item.children[0])) {
|
|
@@ -59,7 +60,7 @@ const handleSubmitForm = (originalData, allValues, isListToObj) => {
|
|
|
59
60
|
} catch (error) {
|
|
60
61
|
}
|
|
61
62
|
};
|
|
62
|
-
const handleDealValue = (attrItem, formValue) => {
|
|
63
|
+
const handleDealValue = (attrItem, formValue, isMobile2) => {
|
|
63
64
|
var _a, _b, _c, _d;
|
|
64
65
|
const inputType = (_a = attrItem.json) == null ? void 0 : _a.input;
|
|
65
66
|
const format = (_b = attrItem.json) == null ? void 0 : _b["format"];
|
|
@@ -91,17 +92,33 @@ const handleSubmitForm = (originalData, allValues, isListToObj) => {
|
|
|
91
92
|
}
|
|
92
93
|
break;
|
|
93
94
|
case "range-picker":
|
|
94
|
-
if (
|
|
95
|
-
|
|
95
|
+
if (isMobile2) {
|
|
96
|
+
if (Array.isArray(formValue) && formValue.length > 0) {
|
|
97
|
+
attrItem.attrvalue = formValue == null ? void 0 : formValue.map((v) => dayjs(v).format(format || "YYYY-MM-DD")).join("~");
|
|
98
|
+
} else {
|
|
99
|
+
attrItem.attrvalue = "";
|
|
100
|
+
}
|
|
96
101
|
} else {
|
|
97
|
-
|
|
102
|
+
if (Array.isArray(formValue) && formValue.length > 0) {
|
|
103
|
+
attrItem.attrvalue = formValue.join("~");
|
|
104
|
+
} else {
|
|
105
|
+
attrItem.attrvalue = "";
|
|
106
|
+
}
|
|
98
107
|
}
|
|
99
108
|
break;
|
|
100
109
|
case "multiple-date-picker":
|
|
101
|
-
if (
|
|
102
|
-
|
|
110
|
+
if (isMobile2) {
|
|
111
|
+
if (Array.isArray(formValue) && formValue.length > 0) {
|
|
112
|
+
attrItem.attrvalue = formValue == null ? void 0 : formValue.map((v) => dayjs(v).format(format || "YYYY-MM-DD")).join(",");
|
|
113
|
+
} else {
|
|
114
|
+
attrItem.attrvalue = formValue;
|
|
115
|
+
}
|
|
103
116
|
} else {
|
|
104
|
-
|
|
117
|
+
if (Array.isArray(formValue) && formValue.length > 0) {
|
|
118
|
+
attrItem.attrvalue = formValue.join(",");
|
|
119
|
+
} else {
|
|
120
|
+
attrItem.attrvalue = formValue;
|
|
121
|
+
}
|
|
105
122
|
}
|
|
106
123
|
break;
|
|
107
124
|
case "checkbox":
|
|
@@ -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
|
+
}[];
|