szld-libs 0.2.97 → 0.2.99

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.
Files changed (43) hide show
  1. package/dist/szld-components.es.js +6774 -6558
  2. package/dist/szld-components.umd.js +44 -44
  3. package/es/components/DynamicForm/index.d.ts +2 -0
  4. package/es/components/DynamicForm/selectModel/index.js +1 -1
  5. package/es/components/DynamicForm/selectModelBackfillFormItem/index.d.ts +27 -0
  6. package/es/components/DynamicForm/selectModelBackfillFormItem/index.js +241 -0
  7. package/es/components/DynamicForm/selectModelBackfillFormItem/vite.svg +1 -0
  8. package/es/components/DynamicForm/useDynamicForm.js +22 -1
  9. package/es/index.js +34 -8
  10. package/es/mock/index.d.ts +2 -0
  11. package/es/mock/index.js +82 -1
  12. package/es/services/index.d.ts +6 -0
  13. package/es/services/index.js +85 -0
  14. package/es/services/request.d.ts +6 -0
  15. package/es/services/request.js +140 -0
  16. package/es/services/status.d.ts +1 -0
  17. package/es/services/status.js +44 -0
  18. package/es/services/vite.svg +1 -0
  19. package/es/utils/enum.d.ts +4 -0
  20. package/es/utils/enum.js +10 -0
  21. package/es/utils/method.js +14 -10
  22. package/es/vite-env.d.ts +5 -0
  23. package/lib/components/DynamicForm/index.d.ts +2 -0
  24. package/lib/components/DynamicForm/selectModel/index.js +1 -1
  25. package/lib/components/DynamicForm/selectModelBackfillFormItem/index.d.ts +27 -0
  26. package/lib/components/DynamicForm/selectModelBackfillFormItem/index.js +241 -0
  27. package/lib/components/DynamicForm/selectModelBackfillFormItem/vite.svg +1 -0
  28. package/lib/components/DynamicForm/useDynamicForm.js +22 -1
  29. package/lib/index.js +31 -5
  30. package/lib/mock/index.d.ts +2 -0
  31. package/lib/mock/index.js +81 -0
  32. package/lib/services/index.d.ts +6 -0
  33. package/lib/services/index.js +85 -0
  34. package/lib/services/request.d.ts +6 -0
  35. package/lib/services/request.js +140 -0
  36. package/lib/services/status.d.ts +1 -0
  37. package/lib/services/status.js +44 -0
  38. package/lib/services/vite.svg +1 -0
  39. package/lib/utils/enum.d.ts +4 -0
  40. package/lib/utils/enum.js +10 -0
  41. package/lib/utils/method.js +14 -10
  42. package/lib/vite-env.d.ts +5 -0
  43. package/package.json +3 -1
@@ -18,6 +18,7 @@ export interface IformConfigItem {
18
18
  }
19
19
 
20
20
  export interface Ijson {
21
+ 'action-url-extra-params'?: { [key: string]: any }; // 弹窗选择对应多个表单字段时,额外的参数
21
22
  'disable-date-goover'?: boolean; // 禁用日期选择器超出当前日期
22
23
  'default-prompt'?: string; // 提示信息
23
24
  'regexp-message'?: string; // 正则表达式提示信息
@@ -91,6 +92,7 @@ export type InputType =
91
92
  | 'radio'
92
93
  | 'checkbox'
93
94
  | 'cascader'
95
+ | 'mult-field-modal-select' // 弹窗选择对应多个表单字段
94
96
  | string;
95
97
 
96
98
  // 定义文件上传值类型
@@ -137,7 +137,7 @@ function SelectModel(props) {
137
137
  /* @__PURE__ */ jsx(
138
138
  Select,
139
139
  {
140
- placeholder: (item == null ? void 0 : item["message"]) || "请选择",
140
+ placeholder: (item == null ? void 0 : item["default-prompt"]) || "请选择",
141
141
  onClick: openModal,
142
142
  value,
143
143
  open: false,
@@ -0,0 +1,27 @@
1
+ import { FormInstance } from 'antd';
2
+ import React from 'react';
3
+ import { AxiosResponse } from 'axios';
4
+ import { Ijson } from '../index.d';
5
+ interface SelectModelProps {
6
+ item: Ijson;
7
+ onSure: (value: {
8
+ [key: string]: any;
9
+ }) => void;
10
+ value: string;
11
+ disabled: boolean;
12
+ style?: React.CSSProperties;
13
+ commonRequestWidthParams: (params: object, data?: any) => Promise<AxiosResponse<any, any>>;
14
+ commonRequest: (InterfaceType: string, data?: any) => Promise<AxiosResponse<any, any>>;
15
+ CustomModalComponent?: React.FC<ICustomModal>;
16
+ attrid: string;
17
+ form: FormInstance;
18
+ }
19
+ declare function SelectModel(props: SelectModelProps): import("react/jsx-runtime").JSX.Element;
20
+ /**
21
+ *
22
+ * @param selectedRows 选中的行数据
23
+ * @param attributeEnrollFormat 配置信息
24
+ * @returns 构建后的字符串
25
+ */
26
+ export declare function buildValueFromSelectedRows(selectedRows: any[], attributeEnrollFormat: Ijson): Promise<any>;
27
+ export default SelectModel;
@@ -0,0 +1,241 @@
1
+ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
+ import { Form, App, Select, Table, Modal } from "antd";
3
+ import { useState, useEffect } from "react";
4
+ function SelectModel(props) {
5
+ const { item, disabled, style, commonRequestWidthParams, CustomModalComponent, attrid, form } = props;
6
+ const attrValue = Form.useWatch(attrid, form);
7
+ const { message } = App.useApp();
8
+ const mode = item.input;
9
+ const [value, setValue] = useState(props.value);
10
+ const [modalVisible, setModalVisible] = useState(false);
11
+ const [selectedRowKeys, setSelectedRowKeys] = useState([]);
12
+ const [selectedRecords, setSelectedRecords] = useState([]);
13
+ const [loading, setLoading] = useState(false);
14
+ const [params, setParams] = useState({
15
+ PageNum: 1,
16
+ PageSize: 6
17
+ });
18
+ const [dataSource, setDataSource] = useState([]);
19
+ const [total, setTotal] = useState(0);
20
+ const columns = buildColumns();
21
+ useEffect(() => {
22
+ if (!modalVisible) {
23
+ return;
24
+ }
25
+ getData();
26
+ }, [modalVisible, params]);
27
+ const onSelectChange = (keys, selectedRows) => {
28
+ setSelectedRowKeys(keys);
29
+ setSelectedRecords(selectedRows);
30
+ };
31
+ const getData = async () => {
32
+ var _a;
33
+ if (item.inputType === "url" && (item == null ? void 0 : item["action-url"])) {
34
+ setLoading(true);
35
+ try {
36
+ const response = await commonRequestWidthParams(
37
+ {
38
+ PageName: "dns_relay",
39
+ Controlname: "CallActionUrl",
40
+ InterfaceType: ""
41
+ },
42
+ {
43
+ "action-url": item == null ? void 0 : item["action-url"],
44
+ ...params,
45
+ ...(item == null ? void 0 : item["action-url-extra-params"]) || {}
46
+ }
47
+ );
48
+ if ((response == null ? void 0 : response.ReturnValue) === 0) {
49
+ message.error(response.msg);
50
+ setLoading(false);
51
+ return;
52
+ }
53
+ const data = response == null ? void 0 : response.data;
54
+ const tempData = (_a = data == null ? void 0 : data.list) == null ? void 0 : _a.map((item2, index) => {
55
+ const _rowKey = (params.PageNum - 1) * params.PageSize + index;
56
+ return {
57
+ ...item2,
58
+ _rowKey
59
+ };
60
+ });
61
+ const tempSelectedRecords = (tempData == null ? void 0 : tempData.filter((item2) => selectedRowKeys.includes(item2._rowKey))) || [];
62
+ setSelectedRecords(tempSelectedRecords);
63
+ setDataSource([...tempData || []]);
64
+ setTotal((data == null ? void 0 : data.number) || 0);
65
+ setLoading(false);
66
+ } catch (error) {
67
+ setLoading(false);
68
+ message.error(error.msg || "参数错误");
69
+ }
70
+ return;
71
+ }
72
+ message.error("请配置action-url");
73
+ };
74
+ const openModal = () => {
75
+ var _a, _b;
76
+ if (disabled) {
77
+ return;
78
+ }
79
+ if (value) {
80
+ const keyFieldList = ((_a = item == null ? void 0 : item["key-field"]) == null ? void 0 : _a.list) ?? [];
81
+ const delimiter = ((_b = item == null ? void 0 : item["key-field"]) == null ? void 0 : _b.delimiter) ?? "-";
82
+ if (!keyFieldList.length) {
83
+ message.error("请配置key-field");
84
+ return;
85
+ }
86
+ switch (mode) {
87
+ case "modal-select":
88
+ const id = value == null ? void 0 : value.split("-");
89
+ const index = dataSource == null ? void 0 : dataSource.findIndex((item2) => id.includes((item2 == null ? void 0 : item2.typeid) || (item2 == null ? void 0 : item2.instanceid)));
90
+ setSelectedRowKeys([index]);
91
+ break;
92
+ case "modal-mult-select":
93
+ const values = value == null ? void 0 : value.split(",");
94
+ const tempKeys = values == null ? void 0 : values.map((item2) => {
95
+ var _a2;
96
+ const id2 = (_a2 = item2.split(delimiter)) == null ? void 0 : _a2[0];
97
+ return dataSource == null ? void 0 : dataSource.findIndex((item3) => id2.includes((item3 == null ? void 0 : item3.typeid) || (item3 == null ? void 0 : item3.instanceid)));
98
+ });
99
+ setSelectedRowKeys(tempKeys);
100
+ break;
101
+ }
102
+ }
103
+ setModalVisible(true);
104
+ };
105
+ const handleOk = async () => {
106
+ try {
107
+ const value2 = await buildValueFromSelectedRows(selectedRecords, item);
108
+ setValue((value2 == null ? void 0 : value2[attrid]) || "");
109
+ props.onSure(value2);
110
+ setModalVisible(false);
111
+ } catch (error) {
112
+ message.error(error.msg || "参数错误");
113
+ }
114
+ };
115
+ const handleCancel = () => {
116
+ setParams({
117
+ ...params,
118
+ PageNum: 1
119
+ });
120
+ setModalVisible(false);
121
+ };
122
+ function buildColumns() {
123
+ const modalFieldList = item["modal-field-list"];
124
+ let columns2 = [];
125
+ for (let fieldName in modalFieldList) {
126
+ let title = modalFieldList[fieldName];
127
+ const column = { dataIndex: fieldName, title };
128
+ columns2 = [...columns2, column];
129
+ }
130
+ return columns2;
131
+ }
132
+ const onPageChange = (pageNum) => {
133
+ setParams({
134
+ ...params,
135
+ PageNum: pageNum
136
+ });
137
+ };
138
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
139
+ /* @__PURE__ */ jsx(
140
+ Select,
141
+ {
142
+ placeholder: (item == null ? void 0 : item["default-prompt"]) || "请选择",
143
+ onClick: openModal,
144
+ open: false,
145
+ value: attrValue,
146
+ disabled,
147
+ style
148
+ }
149
+ ),
150
+ CustomModalComponent && /* @__PURE__ */ jsx(
151
+ CustomModalComponent,
152
+ {
153
+ title: item["modal-caption"] || "",
154
+ open: modalVisible,
155
+ onOk: handleOk,
156
+ onCancel: handleCancel,
157
+ modalStyle: { width: item["modal-width"] ?? 600, minHeight: item["modal-height"] ?? 400 },
158
+ children: /* @__PURE__ */ jsx(
159
+ Table,
160
+ {
161
+ columns,
162
+ loading,
163
+ dataSource,
164
+ rowKey: (record) => record._rowKey,
165
+ scroll: { y: "calc(80vh - 300px)" },
166
+ rowSelection: {
167
+ type: mode === "mul-field-modal-select" ? "radio" : "checkbox",
168
+ selectedRowKeys,
169
+ onChange: onSelectChange
170
+ },
171
+ pagination: {
172
+ total,
173
+ current: params.PageNum,
174
+ pageSize: params.PageSize,
175
+ onChange: onPageChange
176
+ }
177
+ }
178
+ )
179
+ }
180
+ ) || /* @__PURE__ */ jsx(
181
+ Modal,
182
+ {
183
+ title: item["modal-caption"],
184
+ open: modalVisible,
185
+ onOk: handleOk,
186
+ onCancel: handleCancel,
187
+ width: item["modal-width"] ?? 600,
188
+ okButtonProps: { disabled: selectedRowKeys.length === 0 },
189
+ children: /* @__PURE__ */ jsx(
190
+ Table,
191
+ {
192
+ columns,
193
+ loading,
194
+ dataSource,
195
+ rowKey: (record) => record._rowKey,
196
+ rowSelection: {
197
+ type: mode === "mul-field-modal-select" ? "radio" : "checkbox",
198
+ selectedRowKeys,
199
+ onChange: onSelectChange
200
+ },
201
+ pagination: {
202
+ total,
203
+ current: params.PageNum,
204
+ pageSize: params.PageSize,
205
+ onChange: onPageChange
206
+ }
207
+ }
208
+ )
209
+ }
210
+ )
211
+ ] });
212
+ }
213
+ function buildValueFromSelectedRows(selectedRows, attributeEnrollFormat) {
214
+ return new Promise((resolve, reject) => {
215
+ try {
216
+ var keyfields = attributeEnrollFormat["key-field"];
217
+ if (!keyfields) {
218
+ reject({ msg: "请配置key-field" });
219
+ return;
220
+ }
221
+ let res = {};
222
+ selectedRows.forEach((item) => {
223
+ for (let [key, value] of Object.entries(keyfields)) {
224
+ const list = (value == null ? void 0 : value.list) ?? [];
225
+ const delimiter = (value == null ? void 0 : value.delimiter) ?? "-";
226
+ const arr = list.map((v) => {
227
+ return item == null ? void 0 : item[v];
228
+ });
229
+ res[key] = arr.join(delimiter);
230
+ }
231
+ });
232
+ resolve(res);
233
+ } catch (error) {
234
+ reject({ msg: "key-field参数配置错误" });
235
+ }
236
+ });
237
+ }
238
+ export {
239
+ buildValueFromSelectedRows,
240
+ SelectModel as default
241
+ };
@@ -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>
@@ -1,6 +1,8 @@
1
1
  import { jsx, jsxs, Fragment as Fragment$1 } from "react/jsx-runtime";
2
+ import { MinusSquareOutlined, PlusSquareOutlined, CloseOutlined, InfoCircleOutlined } from "@ant-design/icons";
2
3
  import { handleSetFormItemInitialValue, handleGetPlaceholder, disabledDate } from "./func";
3
4
  import { handleUrlOptions, getJson, base64ToString } from "../../utils/method";
5
+ import SelectModelBackfillFormItem from "./selectModelBackfillFormItem";
4
6
  import { useRef, useEffect, useCallback, Fragment } from "react";
5
7
  import isoWeek from "dayjs/plugin/isoWeek";
6
8
  import SelectModel from "./selectModel";
@@ -11,7 +13,6 @@ import RadioCard from "./radioCard";
11
13
  import MySelect from "./mySelect";
12
14
  import MyUpload from "./myUpload";
13
15
  import MyRadio from "./myRadio";
14
- import { MinusSquareOutlined, PlusSquareOutlined, CloseOutlined, InfoCircleOutlined } from "@ant-design/icons";
15
16
  import { App, Col, Collapse, Form, Card, Flex, Button, Space, Input, DatePicker, InputNumber, Tooltip } from "antd";
16
17
  dayjs.extend(isoWeek);
17
18
  function useDynamicForm(props) {
@@ -432,6 +433,7 @@ function useDynamicForm(props) {
432
433
  }) => {
433
434
  var _a, _b, _c, _d;
434
435
  const mode = item.json.input || "text";
436
+ const attrid = item.attrid;
435
437
  const formatValue = handleSetFormItemInitialValue(item);
436
438
  const message2 = ((_a = item.json) == null ? void 0 : _a["default-prompt"]) || "";
437
439
  const disableDateGoover = ((_b = item.json) == null ? void 0 : _b["disable-date-goover"]) || false;
@@ -533,6 +535,25 @@ function useDynamicForm(props) {
533
535
  }
534
536
  );
535
537
  }
538
+ case "mul-field-modal-select": {
539
+ return /* @__PURE__ */ jsx(
540
+ SelectModelBackfillFormItem,
541
+ {
542
+ style: { width: defaultWidth, ...itemStyle == null ? void 0 : itemStyle.style, ...customWidth },
543
+ item: item.json,
544
+ form,
545
+ attrid,
546
+ value: item.attrvalue || item.json.default || "",
547
+ commonRequestWidthParams,
548
+ commonRequest,
549
+ onSure: async (value) => {
550
+ form.setFieldsValue(value);
551
+ },
552
+ disabled: readonly,
553
+ CustomModalComponent
554
+ }
555
+ );
556
+ }
536
557
  case "date-picker":
537
558
  case "time-picker":
538
559
  case "week-picker":
package/es/index.js CHANGED
@@ -1,18 +1,44 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
- import { useEffect } from "react";
2
+ import { useEffect, useRef } from "react";
3
3
  import ReactDOM from "react-dom/client";
4
4
  import { BrowserRouter } from "react-router-dom";
5
- import { App, Form } from "antd";
6
- import { HmacSM3, BackHeader } from "./main";
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
+ import zhCN from "antd/es/locale/zh_CN";
10
+ import dayjs from "dayjs";
11
+ dayjs.locale("zh-cn");
7
12
  const Demo = () => {
8
- Form.useForm();
9
13
  useEffect(() => {
10
14
  }, []);
11
- const sm3key = "Aa123456#";
12
- const msg = "username=admin&timestamp=1758782465&modelid=19955BC7B61A43B3A982F0B2053ABC34";
13
- HmacSM3.hmac(sm3key, msg);
15
+ const formRef = useRef(null);
16
+ const [form] = Form.useForm();
17
+ const onFinish = (values) => {
18
+ };
14
19
  return /* @__PURE__ */ jsxs("div", { style: { height: "100vh", display: "flex", flexDirection: "column", gap: 20 }, children: [
15
20
  /* @__PURE__ */ jsx(BackHeader, { title: "页头组件", isBack: true }),
21
+ /* @__PURE__ */ jsxs(Form, { form, layout: "vertical", onFinish, children: [
22
+ "测试移动端动态组件",
23
+ /* @__PURE__ */ jsx(
24
+ DynamicForm,
25
+ {
26
+ interfaceTypeChildren: "YLFWLRDetailAttrlist",
27
+ formConfig: attrList,
28
+ form,
29
+ readonly: false,
30
+ relatedid: "",
31
+ colNum: 1,
32
+ defaultWidth: 358,
33
+ commonRequestWidthParams,
34
+ uploadAction: uploadFormAction,
35
+ commonRequest,
36
+ instructionShowMode: "icon",
37
+ ref: formRef
38
+ }
39
+ ),
40
+ /* @__PURE__ */ jsx(Form.Item, { children: /* @__PURE__ */ jsx(Button, { type: "primary", htmlType: "submit", children: "提交" }) })
41
+ ] }),
16
42
  /* @__PURE__ */ jsxs("div", { children: [
17
43
  "2. 测试循环滚动组件",
18
44
  /* @__PURE__ */ jsx(
@@ -29,5 +55,5 @@ const Demo = () => {
29
55
  ] });
30
56
  };
31
57
  ReactDOM.createRoot(document.getElementById("root")).render(
32
- /* @__PURE__ */ jsx(BrowserRouter, { children: /* @__PURE__ */ jsx(App, { children: /* @__PURE__ */ jsx(Demo, {}) }) })
58
+ /* @__PURE__ */ jsx(ConfigProvider, { locale: zhCN, children: /* @__PURE__ */ jsx(BrowserRouter, { children: /* @__PURE__ */ jsx(App, { children: /* @__PURE__ */ jsx(Demo, {}) }) }) })
33
59
  );
@@ -0,0 +1,2 @@
1
+ export declare const baseAttrList: never[];
2
+ export declare const attrList: any;
package/es/mock/index.js CHANGED
@@ -1 +1,82 @@
1
-
1
+ const baseAttrList = [];
2
+ const attrList = [
3
+ {
4
+ xh: 1,
5
+ asid: "FB5D3B940E544EA898A6983A31FD1504",
6
+ astype: 0,
7
+ tname: "ygzh_table",
8
+ attrid: "02FAE63A990E4E9D87609D3DA764B10C",
9
+ attrname: "唯一编号",
10
+ attrtype: 0,
11
+ info: '{"input":"text","dataType":"string","length":100,"auto-generate":true,"auto-generate-type":"guid"}',
12
+ info_base64: 0,
13
+ createtime: "2026-01-26 10:23:31",
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: "",
30
+ serialnum: 1,
31
+ children: []
32
+ },
33
+ {
34
+ xh: 3,
35
+ asid: "FB5D3B940E544EA898A6983A31FD1504",
36
+ astype: 0,
37
+ tname: "ygzh_table",
38
+ attrid: "7795221133E0479D956D254A71858B39",
39
+ attrname: "密码",
40
+ attrtype: 0,
41
+ info: '{"input":"text","dataType":"string","length":100}',
42
+ info_base64: 0,
43
+ createtime: "2026-01-26 10:23:31",
44
+ attrvalue: "",
45
+ serialnum: 2,
46
+ children: []
47
+ },
48
+ {
49
+ xh: 4,
50
+ asid: "FB5D3B940E544EA898A6983A31FD1504",
51
+ astype: 0,
52
+ tname: "ygzh_table",
53
+ attrid: "7039599603174845B3CD03CA351EEB62",
54
+ attrname: "关联人员编号",
55
+ attrtype: 0,
56
+ 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}',
57
+ info_base64: 0,
58
+ createtime: "2026-01-26 10:27:10",
59
+ attrvalue: "",
60
+ serialnum: 3,
61
+ children: []
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: []
77
+ }
78
+ ];
79
+ export {
80
+ attrList,
81
+ baseAttrList
82
+ };
@@ -0,0 +1,6 @@
1
+ export declare const commonRequest: (InterfaceType: string, data?: any) => Promise<any>;
2
+ export declare const commonRequestDic: (data?: any) => Promise<import("axios").AxiosResponse<any, any, {}>>;
3
+ export declare const commonRequestWidthParams: (params: object, data?: any) => Promise<any>;
4
+ export declare const commonRequestActionUrl: (data?: any) => Promise<any>;
5
+ export declare const uploadAction: () => string;
6
+ export declare const uploadFormAction: () => string;
@@ -0,0 +1,85 @@
1
+ import queryString from "query-string";
2
+ import request, { domainSetting } from "./request";
3
+ import { TOKEN, encryptParamStrings } from "../utils/enum";
4
+ import { HmacSHA512 } from "szld-libs";
5
+ const commonRequest = async (InterfaceType, data) => {
6
+ return request.post("", data, {
7
+ params: {
8
+ PageName: "dns_relay",
9
+ Controlname: "Connon_Control",
10
+ InterfaceType
11
+ }
12
+ });
13
+ };
14
+ const commonRequestDic = async (data) => {
15
+ return request.post("", data, {
16
+ params: {
17
+ PageName: "DicInterface",
18
+ Controlname: "SelectDic"
19
+ }
20
+ });
21
+ };
22
+ const commonRequestWidthParams = async (params, data) => {
23
+ return request.post("", data, {
24
+ params
25
+ });
26
+ };
27
+ const commonRequestActionUrl = async (data) => {
28
+ return request.post("", data, {
29
+ params: {
30
+ PageName: "dns_relay",
31
+ Controlname: "CallActionUrl",
32
+ InterfaceType: "DPGLSysemName"
33
+ }
34
+ });
35
+ };
36
+ const uploadAction = () => {
37
+ var _a;
38
+ const SessionID = sessionStorage.getItem(TOKEN);
39
+ const params = {
40
+ ...domainSetting.baseParams,
41
+ PageName: "dns_relay",
42
+ return: true,
43
+ Controlname: "UpSingleFile",
44
+ InterfaceType: "",
45
+ udmfile: "file",
46
+ SessionID
47
+ };
48
+ const obj = {};
49
+ encryptParamStrings.forEach((key) => {
50
+ obj[key] = params[key] || "";
51
+ });
52
+ const encryptParams = queryString.stringify(obj, { sort: false });
53
+ const sha = new HmacSHA512((_a = window == null ? void 0 : window.CONFIG) == null ? void 0 : _a.Salt);
54
+ params["TokenId"] = sha.encrypt(encryptParams);
55
+ return domainSetting.baseUrl + "?" + queryString.stringify(params);
56
+ };
57
+ const uploadFormAction = () => {
58
+ var _a;
59
+ const SessionID = sessionStorage.getItem(TOKEN);
60
+ const params = {
61
+ ...domainSetting.baseParams,
62
+ PageName: "initializationfile",
63
+ return: true,
64
+ Controlname: "UpSingleFile",
65
+ InterfaceType: "",
66
+ udmfile: "file",
67
+ SessionID
68
+ };
69
+ const obj = {};
70
+ encryptParamStrings.forEach((key) => {
71
+ obj[key] = params[key] || "";
72
+ });
73
+ const encryptParams = queryString.stringify(obj, { sort: false });
74
+ const sha = new HmacSHA512((_a = window == null ? void 0 : window.CONFIG) == null ? void 0 : _a.Salt);
75
+ params["TokenId"] = sha.encrypt(encryptParams);
76
+ return domainSetting.baseUrl + "?" + queryString.stringify(params);
77
+ };
78
+ export {
79
+ commonRequest,
80
+ commonRequestActionUrl,
81
+ commonRequestDic,
82
+ commonRequestWidthParams,
83
+ uploadAction,
84
+ uploadFormAction
85
+ };
@@ -0,0 +1,6 @@
1
+ export declare const domainSetting: {
2
+ baseUrl: string;
3
+ baseParams: {};
4
+ };
5
+ declare const request: import("axios").AxiosInstance;
6
+ export default request;