@ningboyz/types 1.1.112 → 1.1.113

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.1.112",
3
+ "version": "1.1.113",
4
4
  "private": false,
5
5
  "description": "宁波甬政类型库",
6
6
  "author": "nbyt-syq",
@@ -2,7 +2,8 @@
2
2
  科目分类
3
3
  /gams/tk0km/
4
4
  */
5
-
5
+ import { construct, destruct } from "@aximario/json-tree";
6
+ import _ from "lodash";
6
7
  import { IDictResponse } from "../core";
7
8
 
8
9
  export interface IGamsK0kmResponse {
@@ -85,4 +86,12 @@ export class TGamsK0kmResponse implements IGamsK0kmResponse {
85
86
 
86
87
  /** 系统字典.列表 */
87
88
  listDict: IDictResponse[] = [];
89
+
90
+ public static toTree(listK0km: IGamsK0kmResponse[]) {
91
+ return construct(_.cloneDeep(listK0km), { id: "k0kmKmid", pid: "parentID", children: "children" }) as IGamsK0kmResponse[];
92
+ }
93
+
94
+ public static toList(treeK0km: IGamsK0kmResponse[]) {
95
+ return destruct(_.cloneDeep(treeK0km), { id: "k0kmKmid", pid: "parentID", children: "children" }) as IGamsK0kmResponse[];
96
+ }
88
97
  }
@@ -75,6 +75,9 @@ export interface IYzpzK8kmResponse {
75
75
  listDept: IDeptResponse[];
76
76
  listITDT: IYzpzItemResponse[];
77
77
 
78
+ /**
79
+ * 公用经费动态字段名称
80
+ */
78
81
  [key: `k8km${number}`]: string[];
79
82
  }
80
83