szld-libs 0.3.57 → 0.3.59

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -16,6 +16,7 @@ export declare const handleSubmitForm: (originalData: {
16
16
  guid?: string;
17
17
  isListToObj?: boolean;
18
18
  isAutoFill?: boolean;
19
+ onlyNumber?: string;
19
20
  }, allValues: any) => {
20
21
  updatedData: any;
21
22
  uploadedFiles: any[];
@@ -31,7 +31,7 @@ const handleSubmitForm = (originalData, allValues) => {
31
31
  var _a;
32
32
  let updatedData = _.cloneDeep(originalData);
33
33
  const { attr_list = [] } = updatedData;
34
- const { isMobile = false, guid, isListToObj = false, isAutoFill = true } = originalData;
34
+ const { isMobile = false, guid, isListToObj = false, isAutoFill = true, onlyNumber = "" } = originalData;
35
35
  let uploadedFiles = [];
36
36
  if (isAutoFill) {
37
37
  (_a = updatedData == null ? void 0 : updatedData.attr_list) == null ? void 0 : _a.forEach((v) => {
@@ -41,7 +41,7 @@ const handleSubmitForm = (originalData, allValues) => {
41
41
  v.attrvalue = dayjs().format("YYYY-MM-DD HH:mm:ss");
42
42
  }
43
43
  if (((_d = v == null ? void 0 : v.json) == null ? void 0 : _d["auto-generate-type"]) === "guid") {
44
- v.attrvalue = guid || "";
44
+ v.attrvalue = onlyNumber || guid || "";
45
45
  }
46
46
  }
47
47
  if ((_e = v == null ? void 0 : v.json) == null ? void 0 : _e["default"]) {
@@ -37,6 +37,17 @@ export declare const handleGetList: (params: {
37
37
  Controlname: string;
38
38
  InterfaceType: string;
39
39
  }) => Promise<any>;
40
+ /**
41
+ * 调用通用支持代码接口
42
+ */
43
+ export declare const handleCallSupportCode: ({ params, commonRequestWidthParams, requestParams, }: {
44
+ params: Record<string, any>;
45
+ commonRequestWidthParams: (params: object, data?: any) => Promise<AxiosResponse<any, any>>;
46
+ requestParams?: {
47
+ PageName: string;
48
+ Controlname: string;
49
+ } | undefined;
50
+ }) => Promise<void>;
40
51
  /**
41
52
  * 单层详情数据对应到单个属性集
42
53
  * @param attrList 属性集列表
@@ -36,6 +36,20 @@ const handleGetList = async (params, commonRequestWidthParams, requestParams) =>
36
36
  } catch (error) {
37
37
  }
38
38
  };
39
+ const handleCallSupportCode = async ({
40
+ params,
41
+ commonRequestWidthParams,
42
+ requestParams
43
+ }) => {
44
+ const defaultRequestParams = {
45
+ PageName: "PCInstanceData",
46
+ Controlname: "DataProcess"
47
+ };
48
+ try {
49
+ const res = await commonRequestWidthParams(requestParams || defaultRequestParams || {}, params);
50
+ } catch (error) {
51
+ }
52
+ };
39
53
  const handleObjDetailToSignleAttrList = (attrList, detail) => {
40
54
  return attrList.map((item) => ({
41
55
  ...item,
@@ -48,6 +62,7 @@ const handleSetTableRowColor = (record, index, ngColor) => ({
48
62
  }
49
63
  });
50
64
  export {
65
+ handleCallSupportCode,
51
66
  handleGetAttrDetail,
52
67
  handleGetAttrList,
53
68
  handleGetList,
@@ -16,6 +16,7 @@ export declare const handleSubmitForm: (originalData: {
16
16
  guid?: string;
17
17
  isListToObj?: boolean;
18
18
  isAutoFill?: boolean;
19
+ onlyNumber?: string;
19
20
  }, allValues: any) => {
20
21
  updatedData: any;
21
22
  uploadedFiles: any[];
@@ -33,7 +33,7 @@ const handleSubmitForm = (originalData, allValues) => {
33
33
  var _a;
34
34
  let updatedData = _.cloneDeep(originalData);
35
35
  const { attr_list = [] } = updatedData;
36
- const { isMobile = false, guid, isListToObj = false, isAutoFill = true } = originalData;
36
+ const { isMobile = false, guid, isListToObj = false, isAutoFill = true, onlyNumber = "" } = originalData;
37
37
  let uploadedFiles = [];
38
38
  if (isAutoFill) {
39
39
  (_a = updatedData == null ? void 0 : updatedData.attr_list) == null ? void 0 : _a.forEach((v) => {
@@ -43,7 +43,7 @@ const handleSubmitForm = (originalData, allValues) => {
43
43
  v.attrvalue = dayjs().format("YYYY-MM-DD HH:mm:ss");
44
44
  }
45
45
  if (((_d = v == null ? void 0 : v.json) == null ? void 0 : _d["auto-generate-type"]) === "guid") {
46
- v.attrvalue = guid || "";
46
+ v.attrvalue = onlyNumber || guid || "";
47
47
  }
48
48
  }
49
49
  if ((_e = v == null ? void 0 : v.json) == null ? void 0 : _e["default"]) {
@@ -37,6 +37,17 @@ export declare const handleGetList: (params: {
37
37
  Controlname: string;
38
38
  InterfaceType: string;
39
39
  }) => Promise<any>;
40
+ /**
41
+ * 调用通用支持代码接口
42
+ */
43
+ export declare const handleCallSupportCode: ({ params, commonRequestWidthParams, requestParams, }: {
44
+ params: Record<string, any>;
45
+ commonRequestWidthParams: (params: object, data?: any) => Promise<AxiosResponse<any, any>>;
46
+ requestParams?: {
47
+ PageName: string;
48
+ Controlname: string;
49
+ } | undefined;
50
+ }) => Promise<void>;
40
51
  /**
41
52
  * 单层详情数据对应到单个属性集
42
53
  * @param attrList 属性集列表
@@ -38,6 +38,20 @@ const handleGetList = async (params, commonRequestWidthParams, requestParams) =>
38
38
  } catch (error) {
39
39
  }
40
40
  };
41
+ const handleCallSupportCode = async ({
42
+ params,
43
+ commonRequestWidthParams,
44
+ requestParams
45
+ }) => {
46
+ const defaultRequestParams = {
47
+ PageName: "PCInstanceData",
48
+ Controlname: "DataProcess"
49
+ };
50
+ try {
51
+ const res = await commonRequestWidthParams(requestParams || defaultRequestParams || {}, params);
52
+ } catch (error) {
53
+ }
54
+ };
41
55
  const handleObjDetailToSignleAttrList = (attrList, detail) => {
42
56
  return attrList.map((item) => ({
43
57
  ...item,
@@ -49,6 +63,7 @@ const handleSetTableRowColor = (record, index, ngColor) => ({
49
63
  backgroundColor: index !== void 0 && index % 2 === 1 ? (ngColor == null ? void 0 : ngColor[0]) || "var(--bg-color-2)" : (ngColor == null ? void 0 : ngColor[1]) || "var(--bg-color-3)"
50
64
  }
51
65
  });
66
+ exports.handleCallSupportCode = handleCallSupportCode;
52
67
  exports.handleGetAttrDetail = handleGetAttrDetail;
53
68
  exports.handleGetAttrList = handleGetAttrList;
54
69
  exports.handleGetList = handleGetList;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "szld-libs",
3
3
  "private": false,
4
- "version": "0.3.57",
4
+ "version": "0.3.59",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",