@ningboyz/types 1.1.105 → 1.1.107

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.105",
3
+ "version": "1.1.107",
4
4
  "private": false,
5
5
  "description": "宁波甬政类型库",
6
6
  "author": "nbyt-syq",
@@ -7,6 +7,15 @@ export interface IDictResponseDictPara {
7
7
  gdzc: boolean; //字典-部门类型是否是固定资产
8
8
  unused: number; //字典-资产状态_固定资产是否是闲置状态
9
9
  used: number; //字典-资产状态_固定资产是否是在用状态
10
+ /**
11
+ * 变动方式改变,改变对应配置。
12
+ * 配置: 系统字典 变动方式-固定资产 约定参数
13
+ * 1. change: string[] 字段title数组, 配置后只有这些可以变动
14
+ * 2. noChange: string[] 字段title数组, 配置后只有这些不可以变动
15
+ * 以上配置只能配置一个
16
+ * */
17
+ change: string[];
18
+ noChange: string[];
10
19
  zcdbType: number; ///字典-资产调拨-单据类型 配置0, 为单位内,调拨只在同一个单位下进行,调拨到其他部门。配置1,为跨单位调拨。配置2,为跨部门调拨
11
20
  /** 是否附件类型不判断必填 */
12
21
  notRequiredPath: boolean;
@@ -19,6 +28,8 @@ export class TDictResponseDictPara implements IDictResponseDictPara {
19
28
  hidden: boolean = false;
20
29
  show: boolean = false;
21
30
  gdzc: boolean = false;
31
+ change: string[] = [];
32
+ noChange: string[] = [];
22
33
  unused: number = 0;
23
34
  used: number = 0;
24
35
  zcdbType: number = 0;
@@ -1,3 +1,6 @@
1
+ import { construct, destruct } from "@aximario/json-tree";
2
+ import _ from "lodash";
3
+
1
4
  export interface IYzpzItemResponse {
2
5
  whoBuild: number;
3
6
  userIndx: number;
@@ -51,21 +54,29 @@ export class TYzpzItemResponse implements IYzpzItemResponse {
51
54
  dataDate: number = 0;
52
55
  dataTime: number = 0;
53
56
  dataHide: number = 0;
54
- dataGUID: string = '';
55
- mastName: string = '';
56
- mastGUID: string = '';
57
- createBy: string = '';
57
+ dataGUID: string = "";
58
+ mastName: string = "";
59
+ mastGUID: string = "";
60
+ createBy: string = "";
58
61
  createAt: number = 0;
59
- updateBy: string = '';
62
+ updateBy: string = "";
60
63
  updateAt: number = 0;
61
- deleteBy: string = '';
64
+ deleteBy: string = "";
62
65
  deleteAt: number = 0;
63
66
  queuesBy: number = 0;
64
- entityID: string = '';
65
- itemCode: string = '';
66
- itemName: string = '';
67
- itemMemo: string = '';
68
- basisTxt: string = '';
67
+ entityID: string = "";
68
+ itemCode: string = "";
69
+ itemName: string = "";
70
+ itemMemo: string = "";
71
+ basisTxt: string = "";
69
72
  deptSize: number = 0;
70
- deptText: string = '';
73
+ deptText: string = "";
74
+
75
+ public static toTree(listItem: IYzpzItemResponse[]) {
76
+ return construct(_.cloneDeep(listItem), { id: "itemIndx", pid: "parentID", children: "children" }) as IYzpzItemResponse[];
77
+ }
78
+
79
+ public static toList(treeItem: IYzpzItemResponse[]) {
80
+ return destruct(_.cloneDeep(treeItem), { id: "itemIndx", pid: "parentID", children: "children" }) as IYzpzItemResponse[];
81
+ }
71
82
  }
@@ -1,3 +1,6 @@
1
+ import { construct, destruct } from "@aximario/json-tree";
2
+ import _ from "lodash";
3
+
1
4
  export interface IYzpzK8kmResponse {
2
5
  whoBuild: number;
3
6
  userIndx: number;
@@ -73,35 +76,35 @@ export class TYzpzK8kmResponse implements IYzpzK8kmResponse {
73
76
  dataDate: number = 0;
74
77
  dataTime: number = 0;
75
78
  dataHide: number = 0;
76
- dataGUID: string = '';
77
- mastName: string = '';
78
- mastGUID: string = '';
79
- createBy: string = '';
79
+ dataGUID: string = "";
80
+ mastName: string = "";
81
+ mastGUID: string = "";
82
+ createBy: string = "";
80
83
  createAt: number = 0;
81
- updateBy: string = '';
84
+ updateBy: string = "";
82
85
  updateAt: number = 0;
83
- deleteBy: string = '';
86
+ deleteBy: string = "";
84
87
  deleteAt: number = 0;
85
88
  queuesBy: number = 0;
86
- entityID: string = '';
89
+ entityID: string = "";
87
90
  typeSize: number = 0;
88
91
  isLasted: number = 0;
89
- typeText: string = '';
90
- k8kmKmbm: string = '';
91
- k8kmKmmc: string = '';
92
- k8kmJldw: string = '';
92
+ typeText: string = "";
93
+ k8kmKmbm: string = "";
94
+ k8kmKmmc: string = "";
95
+ k8kmJldw: string = "";
93
96
  onNumber: number = 0;
94
97
  onBubble: number = 0;
95
98
  k8kmKmdq: number = 0;
96
99
  k8kmKmlx: number = 0;
97
- k0kmText: string = '';
100
+ k0kmText: string = "";
98
101
  deptSize: number = 0;
99
- deptText: string = '';
102
+ deptText: string = "";
100
103
  itemSize: number = 0;
101
- itemText: string = '';
104
+ itemText: string = "";
102
105
  sumLevel: number = 0;
103
- bkColour: string = '';
104
- parentCd: string = '';
106
+ bkColour: string = "";
107
+ parentCd: string = "";
105
108
  onEnable: number = 0;
106
109
  dataType: number = 0;
107
110
  usesKmhz: number = 0;
@@ -110,4 +113,12 @@ export class TYzpzK8kmResponse implements IYzpzK8kmResponse {
110
113
 
111
114
  sourceQJ: number = 0;
112
115
  k8kmQcje: number = 0;
116
+
117
+ public static toTree(listK8km: IYzpzK8kmResponse[]) {
118
+ return construct(_.cloneDeep(listK8km), { id: "k8kmKmid", pid: "parentID", children: "children" }) as IYzpzK8kmResponse[];
119
+ }
120
+
121
+ public static toList(treeK8km: IYzpzK8kmResponse[]) {
122
+ return destruct(_.cloneDeep(treeK8km), { id: "k8kmKmid", pid: "parentID", children: "children" }) as IYzpzK8kmResponse[];
123
+ }
113
124
  }