@ningboyz/types 1.4.27 → 1.4.29
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 +1 -1
- package/src/core/IPartResponse.ts +15 -0
- package/src/core/IPathResponsePartPara.ts +17 -0
- package/src/index.ts +2 -0
- package/src/talk/index.ts +3 -0
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { TCore } from "../index.ts";
|
|
2
2
|
import _ from "lodash";
|
|
3
3
|
import { TWithEXPDS, TWithMYOA, WithEXPDS, WithMYOA } from "./IUserResponse.ts";
|
|
4
|
+
import { IPathResponsePathPara, TPathResponsePathPara } from "./IPathResponsePartPara.ts";
|
|
4
5
|
|
|
5
6
|
export interface IPartResponse {
|
|
6
7
|
whoBuild: number;
|
|
@@ -30,6 +31,7 @@ export interface IPartResponse {
|
|
|
30
31
|
entityID: string;
|
|
31
32
|
partMemo: string;
|
|
32
33
|
withPara: string;
|
|
34
|
+
withParaConv: IPathResponsePathPara;
|
|
33
35
|
usesBbhz: number;
|
|
34
36
|
usesSxhx: number;
|
|
35
37
|
queuesBy: number;
|
|
@@ -77,6 +79,7 @@ export class TPartResponse implements IPartResponse {
|
|
|
77
79
|
entityID: string = "";
|
|
78
80
|
partMemo: string = "";
|
|
79
81
|
withPara: string = "";
|
|
82
|
+
withParaConv: IPathResponsePathPara = new TPathResponsePathPara();
|
|
80
83
|
usesBbhz: number = 0;
|
|
81
84
|
usesSxhx: number = 0;
|
|
82
85
|
queuesBy: number = 0;
|
|
@@ -91,6 +94,18 @@ export class TPartResponse implements IPartResponse {
|
|
|
91
94
|
listUserWhenExpd: number = 0;
|
|
92
95
|
asLeaderWhenMYOA: number = 0;
|
|
93
96
|
|
|
97
|
+
static parseJson(partPara: string) {
|
|
98
|
+
const defaultPathPara = new TPathResponsePathPara();
|
|
99
|
+
if (_.isEmpty(partPara)) {
|
|
100
|
+
return defaultPathPara;
|
|
101
|
+
}
|
|
102
|
+
try {
|
|
103
|
+
const obj = JSON.parse(partPara) as TPathResponsePathPara;
|
|
104
|
+
return _.merge(defaultPathPara, obj);
|
|
105
|
+
} catch (e) {}
|
|
106
|
+
return defaultPathPara;
|
|
107
|
+
}
|
|
108
|
+
|
|
94
109
|
static toTravel(part: IPartResponse, buttonType: string): TCore.ISysTravelResponse {
|
|
95
110
|
const travel = new TCore.TSysTravelResponse();
|
|
96
111
|
travel.whoBuild = part.whoBuild;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface IPathResponsePathPara {
|
|
2
|
+
//会议室预定-统计查询,增加管理员权限,可以看到全部会议室统计情况。
|
|
3
|
+
asLeaderWhenMeetRoom: number;
|
|
4
|
+
//用车管理-用车统计配置增加管理员权限,可以查看全部用车情况。
|
|
5
|
+
asLeaderWhenUseCar: number;
|
|
6
|
+
//用印统计,配置增加管理员权限,可以看到全部用印情况。
|
|
7
|
+
asLeaderWhenSeal: number;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export class TPathResponsePathPara {
|
|
11
|
+
//会议室预定-统计查询,增加管理员权限,可以看到全部会议室统计情况。
|
|
12
|
+
asLeaderWhenMeetRoom: number = 0;
|
|
13
|
+
//用车管理-用车统计配置增加管理员权限,可以查看全部用车情况。
|
|
14
|
+
asLeaderWhenUseCar: number = 0;
|
|
15
|
+
//用印统计,配置增加管理员权限,可以看到全部用印情况。
|
|
16
|
+
asLeaderWhenSeal: number = 0;
|
|
17
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -48,6 +48,7 @@ import * as TVary from "./vary";
|
|
|
48
48
|
import * as TResp from "./response";
|
|
49
49
|
import * as TAxios from "./axios";
|
|
50
50
|
import * as TFind from "./find";
|
|
51
|
+
import * as TTalk from "./talk";
|
|
51
52
|
|
|
52
53
|
export {
|
|
53
54
|
Const,
|
|
@@ -98,6 +99,7 @@ export {
|
|
|
98
99
|
TResp,
|
|
99
100
|
TAxios,
|
|
100
101
|
TFind,
|
|
102
|
+
TTalk,
|
|
101
103
|
type IAboutConfig,
|
|
102
104
|
type IBaseConfig,
|
|
103
105
|
type IBaseResponse,
|