@ningboyz/types 1.0.102 → 1.0.104

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ningboyz/types",
3
- "version": "1.0.102",
3
+ "version": "1.0.104",
4
4
  "private": false,
5
5
  "description": "宁波甬政类型库",
6
6
  "author": "nbyt-syq",
@@ -67,7 +67,7 @@ export interface ISysMenuWithCoreResponse {
67
67
  /** 单号字段 */
68
68
  billItem: string;
69
69
  /** 参与事前报备 */
70
- todoLock: string;
70
+ todoLock: number;
71
71
  pathType: IDictResponse[];
72
72
  menuParaConv: ISysMenuWithCoreResponseMenuPara;
73
73
  wldyPage: IWldyPageResponse[];
@@ -130,7 +130,7 @@ export class TSysMenuWithCoreResponse implements ISysMenuWithCoreResponse {
130
130
  billTail: string = "";
131
131
  billTabl: string = "";
132
132
  billItem: string = "";
133
- todoLock: string = "";
133
+ todoLock: number = 0;
134
134
  pathType: IDictResponse[] = [];
135
135
  menuParaConv: ISysMenuWithCoreResponseMenuPara = new TSysMenuWithCoreResponseMenuPara(); // menuPara转换成对象
136
136
  wldyPage: IWldyPageResponse[] = [];
@@ -1,4 +1,4 @@
1
- import { construct } from "@aximario/json-tree";
1
+ import { construct, destruct } from "@aximario/json-tree";
2
2
  import type { IPzptItemResponse } from "./IPzptItemResponse";
3
3
  import type { IPzptTypeResponse } from "./IPzptTypeResponse";
4
4
  import { IBaseResponse, TBaseResponse } from "../base/IBaseResponse";
@@ -163,8 +163,20 @@ export class TPzptK8kmResponse extends TBaseResponse<IPzptK8kmResponse> implemen
163
163
  listType: IPzptTypeResponse[] = [];
164
164
 
165
165
  isChecked: boolean = false;
166
-
166
+ /**
167
+ * 将列表转换为树形结构
168
+ * @param listData 列表数据
169
+ * @returns 树形结构数据
170
+ */
167
171
  static toTree(listData: IPzptK8kmResponse[]) {
168
172
  return construct(listData, { id: "k8kmKmid", pid: "parentID", children: "children" }) as IPzptK8kmResponse[];
169
173
  }
174
+ /**
175
+ * 将树形结构转换为列表
176
+ * @param listData 树形结构数据
177
+ * @returns 列表数据
178
+ */
179
+ static toList(listData: IPzptK8kmResponse[]) {
180
+ return destruct(listData, { id: "k8kmKmid", pid: "parentID", children: "children" }) as IPzptK8kmResponse[];
181
+ }
170
182
  }