@ningboyz/types 1.1.166 → 1.1.168
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/index.ts
CHANGED
|
@@ -39,6 +39,7 @@ import * as TZbhd from "./src/zbhd";
|
|
|
39
39
|
import * as TZbzd from "./src/zbzd";
|
|
40
40
|
import * as TZfht from "./src/zfht";
|
|
41
41
|
import * as TZfsq from "./src/zfsq";
|
|
42
|
+
import * as Decorators from "./src/decorators"
|
|
42
43
|
|
|
43
44
|
export {
|
|
44
45
|
Const,
|
|
@@ -66,11 +67,13 @@ export {
|
|
|
66
67
|
TWtui, TWzpz, TYzcb,
|
|
67
68
|
TYzcg,
|
|
68
69
|
TYzht, TYzpz, TZbhd, TZbzd, TZfht,
|
|
69
|
-
TZfsq,
|
|
70
|
+
TZfsq,
|
|
71
|
+
type IAboutConfig,
|
|
70
72
|
type IBaseConfig,
|
|
71
73
|
type IBaseResponse,
|
|
72
74
|
type IConfig,
|
|
73
75
|
type IPathConfig,
|
|
74
|
-
type IResponse
|
|
76
|
+
type IResponse,
|
|
77
|
+
Decorators
|
|
75
78
|
};
|
|
76
79
|
|
package/package.json
CHANGED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export enum DFormType {
|
|
2
|
+
select = "select",
|
|
3
|
+
input = "input"
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export interface IConfigDataSource {
|
|
7
|
+
id: number;
|
|
8
|
+
label: string;
|
|
9
|
+
pid?: number;
|
|
10
|
+
children?: IConfigDataSource[];
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface IConfigProperty {
|
|
14
|
+
//配置名称
|
|
15
|
+
cnfgName: string;
|
|
16
|
+
//配置字段
|
|
17
|
+
cnfgField: string;
|
|
18
|
+
//配置字段类型
|
|
19
|
+
formType: DFormType;
|
|
20
|
+
//是否多选, 默认单选
|
|
21
|
+
multiple?: boolean;
|
|
22
|
+
//本地数据源
|
|
23
|
+
dataSource: IConfigDataSource[];
|
|
24
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import _ from "lodash";
|
|
2
|
+
import { DConfigProperty, DFormType, IConfigProperty } from "../decorators";
|
|
3
|
+
|
|
4
|
+
export interface IYzpzTypeResponseConf {
|
|
5
|
+
usesManualMode: number;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export class TYzpzTypeResponseConf implements IYzpzTypeResponseConf {
|
|
9
|
+
private static map: WeakMap<String, IConfigProperty[]> = new WeakMap<String, IConfigProperty[]>();
|
|
10
|
+
constructor(id: string, typePara?: string) {
|
|
11
|
+
const instance = TYzpzTypeResponseConf.map.get(id);
|
|
12
|
+
if (_.isNil(instance)) {
|
|
13
|
+
TYzpzTypeResponseConf.map.set(id, []);
|
|
14
|
+
}
|
|
15
|
+
if (!_.isNil(typePara) && !_.isEmpty(typePara)) {
|
|
16
|
+
try {
|
|
17
|
+
const obj = JSON.parse(typePara) as TYzpzTypeResponseConf;
|
|
18
|
+
Object.assign(this, obj);
|
|
19
|
+
} catch (e) {}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@DConfigProperty({
|
|
24
|
+
cnfgName: "开启手动模式",
|
|
25
|
+
cnfgField: "usesManualMode",
|
|
26
|
+
formType: DFormType.select,
|
|
27
|
+
dataSource: [
|
|
28
|
+
{ id: 0, label: "关闭" },
|
|
29
|
+
{ id: 1, label: "开启" }
|
|
30
|
+
]
|
|
31
|
+
})
|
|
32
|
+
usesManualMode: number = 0;
|
|
33
|
+
}
|
package/src/yzpz/index.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { IYzpzK0kmResponse, TYzpzK0kmResponse } from "./IYzpzK0kmResponse";
|
|
|
4
4
|
import { IYzpzK8kmResponse, TYzpzK8kmResponse } from "./IYzpzK8kmResponse";
|
|
5
5
|
import { IYzpzKbkmResponse, TYzpzKbkmResponse } from "./IYzpzKbkmResponse";
|
|
6
6
|
import { IYzpzTypeResponse, TYzpzTypeResponse } from "./IYzpzTypeResponse";
|
|
7
|
+
import { IYzpzTypeResponseConf, TYzpzTypeResponseConf } from "./IYzpzTypeResponseConf";
|
|
7
8
|
|
|
8
9
|
export {
|
|
9
10
|
TYzpzCnfgResponse,
|
|
@@ -12,11 +13,13 @@ export {
|
|
|
12
13
|
TYzpzK8kmResponse,
|
|
13
14
|
TYzpzKbkmResponse,
|
|
14
15
|
TYzpzTypeResponse,
|
|
16
|
+
TYzpzTypeResponseConf,
|
|
15
17
|
type IYzpzCnfgResponse,
|
|
16
18
|
type IYzpzItemResponse,
|
|
17
19
|
type IYzpzK0kmResponse,
|
|
18
20
|
type IYzpzK8kmResponse,
|
|
19
21
|
type IYzpzKbkmResponse,
|
|
20
|
-
type IYzpzTypeResponse
|
|
22
|
+
type IYzpzTypeResponse,
|
|
23
|
+
type IYzpzTypeResponseConf
|
|
21
24
|
};
|
|
22
25
|
|