@ningboyz/types 1.0.29 → 1.0.30
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 +5 -4
- package/src/const/const_type_name.ts +2 -0
- package/src/core/IUserResponse.ts +7 -0
- package/src/store/dateState.ts +1 -0
- package/src/wtui/IViewCtrlResponse.ts +0 -14
- package/src/wtui/IWtuiMainResponse.ts +4 -3
- package/src/wtui/IWtuiOperateResponse.ts +80 -0
- package/src/wtui/IWtuiViewResponse.ts +8 -2
- package/src/wtui/index.ts +11 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ningboyz/types",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.30",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "宁波甬政类型库",
|
|
6
6
|
"author": "nbyt-syq",
|
|
@@ -16,8 +16,9 @@
|
|
|
16
16
|
"registry": "https://registry.npmjs.org/"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@aximario/json-tree": "2.2.4"
|
|
19
|
+
"@aximario/json-tree": "2.2.4",
|
|
20
|
+
"@types/lodash": "^4.17.16",
|
|
21
|
+
"lodash": "^4.17.21"
|
|
20
22
|
},
|
|
21
|
-
"devDependencies": {
|
|
22
|
-
}
|
|
23
|
+
"devDependencies": {}
|
|
23
24
|
}
|
|
@@ -266,6 +266,13 @@ export class TUserResponse extends TBaseResponse<IUserResponse[]> implements IUs
|
|
|
266
266
|
listWlzfEnvr: any[] = [];
|
|
267
267
|
listUserAcno: IUserAcnoResponse[] = [];
|
|
268
268
|
|
|
269
|
+
constructor(response?: any) {
|
|
270
|
+
super();
|
|
271
|
+
if (response) {
|
|
272
|
+
_.merge(this, _.pick(response, Object.keys(this)));
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
|
|
269
276
|
public static toTree(listUser: IUserResponse[]) {
|
|
270
277
|
return construct(listUser, { id: "userIndx", pid: "parentID", children: "children" }) as IUserResponse[];
|
|
271
278
|
}
|
package/src/store/dateState.ts
CHANGED
|
@@ -28,10 +28,6 @@ export interface IViewCtrlResponse extends IBaseResponse<IViewCtrlResponse> {
|
|
|
28
28
|
wtuiMain: number;
|
|
29
29
|
labelVal: string;
|
|
30
30
|
viewIndx: number;
|
|
31
|
-
//虚拟字段
|
|
32
|
-
title: string;
|
|
33
|
-
name: string;
|
|
34
|
-
icon: string;
|
|
35
31
|
}
|
|
36
32
|
|
|
37
33
|
export class TViewCtrlResponse extends TBaseResponse<IViewCtrlResponse> implements IViewCtrlResponse {
|
|
@@ -61,17 +57,7 @@ export class TViewCtrlResponse extends TBaseResponse<IViewCtrlResponse> implemen
|
|
|
61
57
|
wtuiMain: number = 0;
|
|
62
58
|
labelVal: string = "";
|
|
63
59
|
viewIndx: number = 0;
|
|
64
|
-
title: string = "";
|
|
65
|
-
name: string = "";
|
|
66
|
-
icon: string = "";
|
|
67
|
-
|
|
68
60
|
static toTree(listView: IViewCtrlResponse[]) {
|
|
69
|
-
listView.forEach((element) => {
|
|
70
|
-
element.title = element.viewName;
|
|
71
|
-
element.name = element.view4url;
|
|
72
|
-
element.icon = `iconfont ${element.viewIcon}`;
|
|
73
|
-
element.children = [];
|
|
74
|
-
});
|
|
75
61
|
return construct(listView, { id: "uniqueID", pid: "parentID", children: "children" }) as IViewCtrlResponse[];
|
|
76
62
|
}
|
|
77
63
|
}
|
|
@@ -8,7 +8,7 @@ export interface IWtuiMainResponse {
|
|
|
8
8
|
userIndx: number;
|
|
9
9
|
wtuiIndx: number; // #唯一标识
|
|
10
10
|
wtuiMain: number;
|
|
11
|
-
|
|
11
|
+
asFormer: number;
|
|
12
12
|
createAt: number;
|
|
13
13
|
createBy: string;
|
|
14
14
|
dataDate: number;
|
|
@@ -48,7 +48,7 @@ export interface IWtuiMainResponse {
|
|
|
48
48
|
updateBy: string;
|
|
49
49
|
wtuiMemo: string; // #界面备注
|
|
50
50
|
wtuiName: string; // #界面名称
|
|
51
|
-
|
|
51
|
+
microTab: string;
|
|
52
52
|
unitTypeSize: number;
|
|
53
53
|
unitTypeText: string; // #单位类型
|
|
54
54
|
|
|
@@ -63,7 +63,7 @@ export class TWtuiMainResponse implements IWtuiMainResponse {
|
|
|
63
63
|
userIndx: number = 0;
|
|
64
64
|
wtuiIndx: number = 0;
|
|
65
65
|
wtuiMain: number = 0;
|
|
66
|
-
|
|
66
|
+
asFormer: number = 0;
|
|
67
67
|
entityID: string = "";
|
|
68
68
|
parentID: number = 0;
|
|
69
69
|
queuesBy: number = 0;
|
|
@@ -90,6 +90,7 @@ export class TWtuiMainResponse implements IWtuiMainResponse {
|
|
|
90
90
|
mastName: string = "";
|
|
91
91
|
microApp: string = "";
|
|
92
92
|
microURL: string = "";
|
|
93
|
+
microTab: string = "";
|
|
93
94
|
name4Map: string = "";
|
|
94
95
|
outLogo1: string = "";
|
|
95
96
|
outLogo2: string = "";
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { construct } from "@aximario/json-tree";
|
|
2
|
+
|
|
3
|
+
export interface IWtuiOperateResponse {
|
|
4
|
+
createAt: number; // 创建时间戳
|
|
5
|
+
createBy: string; // 创建者
|
|
6
|
+
ctrlCode: string; // 控件代码
|
|
7
|
+
ctrlIndx: number; // 控件索引
|
|
8
|
+
ctrlMemo: string; // 控件备注
|
|
9
|
+
ctrlName: string; // 控件名称
|
|
10
|
+
ctrlPara: string; // 控件参数
|
|
11
|
+
dataDate: number; // 数据日期
|
|
12
|
+
dataFrom: number; // 数据来源
|
|
13
|
+
dataHide: number; // 是否隐藏(0 表示显示,1 表示隐藏)
|
|
14
|
+
dataOrdr: number; // 数据排序
|
|
15
|
+
dataStat: number; // 数据状态
|
|
16
|
+
dataTime: number; // 数据时间戳
|
|
17
|
+
deleteAt: number; // 删除时间戳
|
|
18
|
+
deleteBy: string; // 删除者
|
|
19
|
+
dictMain: number; // 字典主表标识
|
|
20
|
+
entityID: string; // 实体 ID
|
|
21
|
+
jsMethod: string; // JS 方法
|
|
22
|
+
mastGUID: string; // 主表 GUID
|
|
23
|
+
mastName: string; // 主表名称
|
|
24
|
+
metaData: string; // 元数据信息
|
|
25
|
+
parentID: number; // 父级 ID
|
|
26
|
+
queuesBy: number; // 队列标识
|
|
27
|
+
updateAt: number; // 更新时间戳
|
|
28
|
+
updateBy: string; // 更新者
|
|
29
|
+
userIndx: number; // 用户索引
|
|
30
|
+
whoBuild: number; // 构建者
|
|
31
|
+
withPara: string; // 是否带参数
|
|
32
|
+
wtuiMain: number; // WTUI 主表标识
|
|
33
|
+
wtuiView: number; // WTUI 视图标识
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export class TWtuiOperateResponse implements IWtuiOperateResponse {
|
|
37
|
+
createAt: number = 0;
|
|
38
|
+
createBy: string = "";
|
|
39
|
+
ctrlCode: string = "";
|
|
40
|
+
ctrlIndx: number = 0; // 控件索引
|
|
41
|
+
ctrlMemo: string = ""; // 控件备注
|
|
42
|
+
ctrlName: string = ""; // 控件名称
|
|
43
|
+
ctrlPara: string = ""; // 控件参数
|
|
44
|
+
dataDate: number = 0;
|
|
45
|
+
dataFrom: number = 0;
|
|
46
|
+
dataHide: number = 0;
|
|
47
|
+
dataOrdr: number = 0;
|
|
48
|
+
dataStat: number = 0;
|
|
49
|
+
dataTime: number = 0;
|
|
50
|
+
deleteAt: number = 0;
|
|
51
|
+
deleteBy: string = "";
|
|
52
|
+
dictMain: number = 0;
|
|
53
|
+
entityID: string = "";
|
|
54
|
+
jsMethod: string = "";
|
|
55
|
+
mastGUID: string = "";
|
|
56
|
+
mastName: string = "";
|
|
57
|
+
metaData: string = "";
|
|
58
|
+
parentID: number = 0;
|
|
59
|
+
queuesBy: number = 0;
|
|
60
|
+
updateAt: number = 0;
|
|
61
|
+
updateBy: string = "";
|
|
62
|
+
userIndx: number = 0;
|
|
63
|
+
whoBuild: number = 0;
|
|
64
|
+
withPara: string = "";
|
|
65
|
+
wtuiMain: number = 0;
|
|
66
|
+
wtuiView: number = 0;
|
|
67
|
+
|
|
68
|
+
static toTree(listView: IWtuiOperateResponse[]): IWtuiOperateResponse[] {
|
|
69
|
+
// 遍历列表,为每个元素添加树形结构所需的字段
|
|
70
|
+
// listView.forEach((element) => {
|
|
71
|
+
// element.title = element.ctrlName || ""; // 使用控件名称作为标题
|
|
72
|
+
// element.name = element.mastGUID || ""; // 使用主表 GUID 作为唯一标识
|
|
73
|
+
// element.icon = element.ctrlIcon || ""; // 如果有控件图标,则使用控件图标
|
|
74
|
+
// element.children = []; // 初始化子节点数组
|
|
75
|
+
// });
|
|
76
|
+
|
|
77
|
+
// 使用 construct 方法构建树形结构
|
|
78
|
+
return construct(listView, { id: "entityID", pid: "parentID", children: "children" }) as IWtuiOperateResponse[];
|
|
79
|
+
}
|
|
80
|
+
}
|
|
@@ -2,8 +2,9 @@ export interface IWtuiViewResponse {
|
|
|
2
2
|
whoBuild: number;
|
|
3
3
|
userIndx: number;
|
|
4
4
|
viewIndx: number;
|
|
5
|
-
|
|
5
|
+
sysClasc: number;
|
|
6
6
|
wtuiMain: number;
|
|
7
|
+
wtuiView: number;
|
|
7
8
|
parentID: number;
|
|
8
9
|
dataStat: number;
|
|
9
10
|
dataHide: number;
|
|
@@ -21,7 +22,7 @@ export interface IWtuiViewResponse {
|
|
|
21
22
|
deleteAt: number;
|
|
22
23
|
queuesBy: number;
|
|
23
24
|
entityID: string;
|
|
24
|
-
|
|
25
|
+
parentMC: string;
|
|
25
26
|
listDict: IWtuiViewResponse[];
|
|
26
27
|
|
|
27
28
|
view4url: string; // #页面链接
|
|
@@ -35,15 +36,19 @@ export interface IWtuiViewResponse {
|
|
|
35
36
|
formType: string; // #表单形式
|
|
36
37
|
microApp: string; // #microApp
|
|
37
38
|
microURL: string; // #microURL
|
|
39
|
+
microTab: string;
|
|
38
40
|
expandOn: number; // #默认展开
|
|
39
41
|
|
|
40
42
|
labelVal: string;
|
|
41
43
|
}
|
|
42
44
|
|
|
43
45
|
export class TWtuiViewResponse implements IWtuiViewResponse {
|
|
46
|
+
parentMC: string = "";
|
|
47
|
+
wtuiView: number = 0;
|
|
44
48
|
whoBuild: number = 0;
|
|
45
49
|
userIndx: number = 0;
|
|
46
50
|
viewIndx: number = 0;
|
|
51
|
+
sysClasc: number = 0;
|
|
47
52
|
wtuiMain: number = 0;
|
|
48
53
|
parentID: number = 0;
|
|
49
54
|
dataStat: number = 0;
|
|
@@ -73,6 +78,7 @@ export class TWtuiViewResponse implements IWtuiViewResponse {
|
|
|
73
78
|
formType: string = "";
|
|
74
79
|
microApp: string = "";
|
|
75
80
|
microURL: string = "";
|
|
81
|
+
microTab: string = "";
|
|
76
82
|
expandOn: number = 0;
|
|
77
83
|
listDict: IWtuiViewResponse[] = [];
|
|
78
84
|
labelVal: string = "";
|
package/src/wtui/index.ts
CHANGED
|
@@ -13,6 +13,7 @@ import { IWtuiTodoResponseWithPara, TWtuiTodoResponseWithPara } from "./IWtuiTod
|
|
|
13
13
|
import { IWtuiNodeResponse, TWtuiNodeResponse } from "./IWtuiNodeResponse";
|
|
14
14
|
import { IWtuiUserCnfgResponse, TWtuiUserCnfgResponse } from "./IWtuiUserCnfgResponse";
|
|
15
15
|
import { IWtuiColWidthResponse, TWtuiColWidthResponse } from "./IWtuiColWidthResponse";
|
|
16
|
+
import { IWtuiOperateResponse, TWtuiOperateResponse } from "./IWtuiOperateResponse";
|
|
16
17
|
import { IWtuiRootResponse, TWtuiRootResponse } from "./IWtuiRootResponse";
|
|
17
18
|
|
|
18
19
|
export {
|
|
@@ -27,13 +28,14 @@ export {
|
|
|
27
28
|
type IWtuiItemResponse,
|
|
28
29
|
type IWtuiMainResponse,
|
|
29
30
|
type IWtuiNodeResponse,
|
|
30
|
-
type IWtuiRootResponse,
|
|
31
31
|
type IWtuiTodoResponse,
|
|
32
32
|
type IWtuiTodoResponseTodoPara,
|
|
33
|
-
type IWtuiTodoResponseWithPara,
|
|
34
|
-
type IWtuiUserCnfgResponse,
|
|
35
|
-
type IWtuiViewResponse,
|
|
36
|
-
type IWtuiZoneResponse,
|
|
33
|
+
type IWtuiTodoResponseWithPara,
|
|
34
|
+
type IWtuiUserCnfgResponse, // 位置调整 :ml-citation{ref="1,2" data="citationList"}
|
|
35
|
+
type IWtuiViewResponse,
|
|
36
|
+
type IWtuiZoneResponse, // 位置调整 :ml-citation{ref="1,2" data="citationList"}
|
|
37
|
+
type IWtuiOperateResponse,
|
|
38
|
+
type IWtuiRootResponse,
|
|
37
39
|
TDictEffect,
|
|
38
40
|
TDictEffectData,
|
|
39
41
|
TDictEffectField,
|
|
@@ -44,11 +46,12 @@ export {
|
|
|
44
46
|
TWtuiItemResponse,
|
|
45
47
|
TWtuiMainResponse,
|
|
46
48
|
TWtuiNodeResponse,
|
|
47
|
-
TWtuiRootResponse,
|
|
48
49
|
TWtuiTodoResponse,
|
|
49
50
|
TWtuiTodoResponseTodoPara,
|
|
50
51
|
TWtuiTodoResponseWithPara,
|
|
51
|
-
TWtuiUserCnfgResponse,
|
|
52
|
+
TWtuiUserCnfgResponse, // 位置调整 :ml-citation{ref="1,2" data="citationList"}
|
|
52
53
|
TWtuiViewResponse,
|
|
53
|
-
TWtuiZoneResponse
|
|
54
|
+
TWtuiZoneResponse, // 位置调整 :ml-citation{ref="1,2" data="citationList"}
|
|
55
|
+
TWtuiOperateResponse,
|
|
56
|
+
TWtuiRootResponse
|
|
54
57
|
};
|