@ningboyz/types 1.0.101 → 1.0.103

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.101",
3
+ "version": "1.0.103",
4
4
  "private": false,
5
5
  "description": "宁波甬政类型库",
6
6
  "author": "nbyt-syq",
@@ -54,6 +54,20 @@ export interface ISysMenuWithCoreResponse {
54
54
  usesFlow: number;
55
55
  usesDuty: number;
56
56
  usesBill: number;
57
+ /** 附件类型名称 */
58
+ PathTypeText: string;
59
+ /** 库存初始化 */
60
+ takeInit: number;
61
+ /** 单号前缀 */
62
+ billCode: string;
63
+ /** 单号后缀 */
64
+ billTail: string;
65
+ /** 单号表名 */
66
+ billTabl: string;
67
+ /** 单号字段 */
68
+ billItem: string;
69
+ /** 参与事前报备 */
70
+ todoLock: string;
57
71
  pathType: IDictResponse[];
58
72
  menuParaConv: ISysMenuWithCoreResponseMenuPara;
59
73
  wldyPage: IWldyPageResponse[];
@@ -110,6 +124,13 @@ export class TSysMenuWithCoreResponse implements ISysMenuWithCoreResponse {
110
124
  usesFlow: number = 0;
111
125
  usesDuty: number = 0;
112
126
  usesBill: number = 0;
127
+ PathTypeText: string = "";
128
+ takeInit: number = 0;
129
+ billCode: string = "";
130
+ billTail: string = "";
131
+ billTabl: string = "";
132
+ billItem: string = "";
133
+ todoLock: string = "";
113
134
  pathType: IDictResponse[] = [];
114
135
  menuParaConv: ISysMenuWithCoreResponseMenuPara = new TSysMenuWithCoreResponseMenuPara(); // menuPara转换成对象
115
136
  wldyPage: IWldyPageResponse[] = [];
@@ -146,12 +146,6 @@ export interface ISysMenuWithExpdResponse {
146
146
  viewOnly: number;
147
147
  voidOnly: number;
148
148
  whoBuild: number;
149
- PathTypeText: string;
150
- takeInit: number;
151
- billCode: string;
152
- billTail: string;
153
- billTabl: string;
154
- billItem: string;
155
149
  wldyPage: any[];
156
150
  }
157
151
 
@@ -300,11 +294,5 @@ export class TSysMenuWithExpdResponse implements ISysMenuWithExpdResponse {
300
294
  viewOnly: number = 0;
301
295
  voidOnly: number = 0;
302
296
  whoBuild: number = 0;
303
- PathTypeText: string = "";
304
- takeInit: number = 0;
305
- billCode: string = "";
306
- billTail: string = "";
307
- billTabl: string = "";
308
- billItem: string = "";
309
297
  wldyPage: any[] = [];
310
298
  }
@@ -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
  }