@ningboyz/types 1.1.81 → 1.1.82
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
|
@@ -2,6 +2,7 @@ import _ from "lodash";
|
|
|
2
2
|
import type { IGzjgGzlmResponseGzlmPara } from "./IGzjgGzlmResponseGzlmPara";
|
|
3
3
|
import { TGzjgGzlmResponseGzlmPara } from "./IGzjgGzlmResponseGzlmPara";
|
|
4
4
|
import { IElemElemResponse } from "../elem/IElemElemResponse";
|
|
5
|
+
import { construct, destruct } from "@aximario/json-tree";
|
|
5
6
|
|
|
6
7
|
// #工资栏目
|
|
7
8
|
export interface IGzjgGzlmResponse {
|
|
@@ -161,4 +162,12 @@ export class TGzjgGzlmResponse implements IGzjgGzlmResponse {
|
|
|
161
162
|
} catch (_e) {}
|
|
162
163
|
return defaultGzlmPara;
|
|
163
164
|
}
|
|
165
|
+
|
|
166
|
+
public static toTree(listGzlm: IGzjgGzlmResponse[]) {
|
|
167
|
+
return construct(_.cloneDeep(listGzlm), { id: "gzlmFlid", pid: "parentID", children: "children" }) as IGzjgGzlmResponse[];
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
public static toList(listGzlm: IGzjgGzlmResponse[]) {
|
|
171
|
+
return destruct(_.cloneDeep(listGzlm), { id: "gzlmFlid", pid: "parentID", children: "children" }) as IGzjgGzlmResponse[];
|
|
172
|
+
}
|
|
164
173
|
}
|