szld-libs 0.3.30 → 0.3.32

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.
@@ -209,7 +209,7 @@ function useUniversalTable() {
209
209
  dataIndex: (item == null ? void 0 : item["header-attribute-id"]) || "",
210
210
  width: isDefaultWidth ? (item == null ? void 0 : item["header-width"]) || 180 : void 0,
211
211
  render: (text) => {
212
- if (text && (text == null ? void 0 : text.includes("FileName")) && (text == null ? void 0 : text.includes("FilePath"))) {
212
+ if (text && text && typeof text === "string" && (text == null ? void 0 : text.includes("FileName")) && (text == null ? void 0 : text.includes("FilePath"))) {
213
213
  try {
214
214
  const items = JSON.parse(text);
215
215
  if (items == null ? void 0 : items.length) {
@@ -21,6 +21,22 @@ export declare const handleGetAttrDetail: (params: {
21
21
  asid: string;
22
22
  tname?: string;
23
23
  }, commonRequest: (InterfaceType: string, data?: any) => Promise<AxiosResponse<any, any>>, interfaceType?: string) => Promise<any>;
24
+ /**
25
+ * 获取通用表格数据
26
+ * @param params 请求参数
27
+ * @param commonRequestWidthParams 通用请求函数
28
+ * @param requestParams 接口参数PageName Controlname InterfaceType
29
+ */
30
+ export declare const handleGetList: (params: {
31
+ [key: string]: any;
32
+ pageSize: number;
33
+ pageNum: number;
34
+ 'source-number': string | number;
35
+ }, commonRequestWidthParams: (params: object, data?: any) => Promise<AxiosResponse<any, any>>, requestParams?: {
36
+ PageName: string;
37
+ Controlname: string;
38
+ InterfaceType: string;
39
+ }) => Promise<any>;
24
40
  /**
25
41
  * 单层详情数据对应到单个属性集
26
42
  * @param attrList 属性集列表
@@ -20,6 +20,22 @@ const handleGetAttrDetail = async (params, commonRequest, interfaceType) => {
20
20
  } catch (error) {
21
21
  }
22
22
  };
23
+ const handleGetList = async (params, commonRequestWidthParams, requestParams) => {
24
+ var _a;
25
+ const defaultRequestParams = {
26
+ PageName: "PCInstanceData",
27
+ Controlname: "List",
28
+ InterfaceType: "YLFWLRDataList"
29
+ };
30
+ try {
31
+ const res = await commonRequestWidthParams(requestParams || defaultRequestParams, params);
32
+ if ((res == null ? void 0 : res.ReturnValue) === 1) {
33
+ return ((_a = res == null ? void 0 : res.data) == null ? void 0 : _a.list) || [];
34
+ }
35
+ return [];
36
+ } catch (error) {
37
+ }
38
+ };
23
39
  const handleObjDetailToSignleAttrList = (attrList, detail) => {
24
40
  return attrList.map((item) => ({
25
41
  ...item,
@@ -34,6 +50,7 @@ const handleSetTableRowColor = (record, index, ngColor) => ({
34
50
  export {
35
51
  handleGetAttrDetail,
36
52
  handleGetAttrList,
53
+ handleGetList,
37
54
  handleObjDetailToSignleAttrList,
38
55
  handleSetTableRowColor
39
56
  };
@@ -210,7 +210,7 @@ function useUniversalTable() {
210
210
  dataIndex: (item == null ? void 0 : item["header-attribute-id"]) || "",
211
211
  width: isDefaultWidth ? (item == null ? void 0 : item["header-width"]) || 180 : void 0,
212
212
  render: (text) => {
213
- if (text && (text == null ? void 0 : text.includes("FileName")) && (text == null ? void 0 : text.includes("FilePath"))) {
213
+ if (text && text && typeof text === "string" && (text == null ? void 0 : text.includes("FileName")) && (text == null ? void 0 : text.includes("FilePath"))) {
214
214
  try {
215
215
  const items = JSON.parse(text);
216
216
  if (items == null ? void 0 : items.length) {
@@ -21,6 +21,22 @@ export declare const handleGetAttrDetail: (params: {
21
21
  asid: string;
22
22
  tname?: string;
23
23
  }, commonRequest: (InterfaceType: string, data?: any) => Promise<AxiosResponse<any, any>>, interfaceType?: string) => Promise<any>;
24
+ /**
25
+ * 获取通用表格数据
26
+ * @param params 请求参数
27
+ * @param commonRequestWidthParams 通用请求函数
28
+ * @param requestParams 接口参数PageName Controlname InterfaceType
29
+ */
30
+ export declare const handleGetList: (params: {
31
+ [key: string]: any;
32
+ pageSize: number;
33
+ pageNum: number;
34
+ 'source-number': string | number;
35
+ }, commonRequestWidthParams: (params: object, data?: any) => Promise<AxiosResponse<any, any>>, requestParams?: {
36
+ PageName: string;
37
+ Controlname: string;
38
+ InterfaceType: string;
39
+ }) => Promise<any>;
24
40
  /**
25
41
  * 单层详情数据对应到单个属性集
26
42
  * @param attrList 属性集列表
@@ -22,6 +22,22 @@ const handleGetAttrDetail = async (params, commonRequest, interfaceType) => {
22
22
  } catch (error) {
23
23
  }
24
24
  };
25
+ const handleGetList = async (params, commonRequestWidthParams, requestParams) => {
26
+ var _a;
27
+ const defaultRequestParams = {
28
+ PageName: "PCInstanceData",
29
+ Controlname: "List",
30
+ InterfaceType: "YLFWLRDataList"
31
+ };
32
+ try {
33
+ const res = await commonRequestWidthParams(requestParams || defaultRequestParams, params);
34
+ if ((res == null ? void 0 : res.ReturnValue) === 1) {
35
+ return ((_a = res == null ? void 0 : res.data) == null ? void 0 : _a.list) || [];
36
+ }
37
+ return [];
38
+ } catch (error) {
39
+ }
40
+ };
25
41
  const handleObjDetailToSignleAttrList = (attrList, detail) => {
26
42
  return attrList.map((item) => ({
27
43
  ...item,
@@ -35,5 +51,6 @@ const handleSetTableRowColor = (record, index, ngColor) => ({
35
51
  });
36
52
  exports.handleGetAttrDetail = handleGetAttrDetail;
37
53
  exports.handleGetAttrList = handleGetAttrList;
54
+ exports.handleGetList = handleGetList;
38
55
  exports.handleObjDetailToSignleAttrList = handleObjDetailToSignleAttrList;
39
56
  exports.handleSetTableRowColor = handleSetTableRowColor;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "szld-libs",
3
3
  "private": false,
4
- "version": "0.3.30",
4
+ "version": "0.3.32",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",