model-action 1.0.21 → 1.0.22

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.
@@ -10,35 +10,35 @@ export declare class RoutingAction extends Action {
10
10
  * videoPatrol => 视频巡更
11
11
  * cameraRoute => 视角跟随样条线
12
12
  */
13
- static videoPatrolStart(id: string, type?: string): void;
13
+ static videoPatrolStart(id: string, type?: string, extendParams?: {}): void;
14
14
  /**
15
15
  * 巡检结束
16
16
  * @param {*} id (必须)巡检的唯一ID)
17
17
  * @param {*} type (必须)巡检的类型)
18
18
  */
19
- static videoPatrolStop(id: string, type?: string): void;
19
+ static videoPatrolStop(id: string, type?: string, extendParams?: {}): void;
20
20
  /**
21
21
  * 巡检暂停
22
22
  * @param {*} id (必须)巡检的唯一ID)
23
23
  * @param {*} type (必须)巡检的类型)
24
24
  */
25
- static videoPatrolPause(id: string, type?: string): void;
25
+ static videoPatrolPause(id: string, type?: string, extendParams?: {}): void;
26
26
  /**
27
27
  * 巡检下一步
28
28
  * @param {*} id (必须)巡检的唯一ID)
29
29
  * @param {*} type (必须)巡检的类型)
30
30
  */
31
- static videoPatrolNext(id: string, type?: string): void;
31
+ static videoPatrolNext(id: string, type?: string, extendParams?: {}): void;
32
32
  /**
33
33
  * 巡更上一步
34
34
  * @param {*} id (必须)巡检的唯一ID)
35
35
  * @param {*} type (必须)巡检的类型)
36
36
  */
37
- static videoPatrolPrev(id: string, type?: string): void;
37
+ static videoPatrolPrev(id: string, type?: string, extendParams?: {}): void;
38
38
  /**
39
39
  * 巡更重新开始,从暂停点开始
40
40
  * @param {*} id (必须)巡检的唯一ID)
41
41
  * @param {*} type (必须)巡检的类型)
42
42
  */
43
- static videoPatrolRestart(id: string, type?: string): void;
43
+ static videoPatrolRestart(id: string, type?: string, extendParams?: {}): void;
44
44
  }
@@ -10,13 +10,9 @@ export class RoutingAction extends Action {
10
10
  * videoPatrol => 视频巡更
11
11
  * cameraRoute => 视角跟随样条线
12
12
  */
13
- static videoPatrolStart(id, type = "videoPatrol") {
14
- const param = {
15
- cmd: "routing",
16
- action: "start",
17
- type,
18
- id,
19
- };
13
+ static videoPatrolStart(id, type = "videoPatrol", extendParams = {}) {
14
+ const param = Object.assign({ cmd: "routing", action: "start", type,
15
+ id }, extendParams);
20
16
  this.sendParam(param, '巡更开始');
21
17
  }
22
18
  /**
@@ -24,13 +20,9 @@ export class RoutingAction extends Action {
24
20
  * @param {*} id (必须)巡检的唯一ID)
25
21
  * @param {*} type (必须)巡检的类型)
26
22
  */
27
- static videoPatrolStop(id, type = "videoPatrol") {
28
- const param = {
29
- cmd: "routing",
30
- action: "stop",
31
- type,
32
- id,
33
- };
23
+ static videoPatrolStop(id, type = "videoPatrol", extendParams = {}) {
24
+ const param = Object.assign({ cmd: "routing", action: "stop", type,
25
+ id }, extendParams);
34
26
  this.sendParam(param, '巡更结束');
35
27
  }
36
28
  /**
@@ -38,13 +30,9 @@ export class RoutingAction extends Action {
38
30
  * @param {*} id (必须)巡检的唯一ID)
39
31
  * @param {*} type (必须)巡检的类型)
40
32
  */
41
- static videoPatrolPause(id, type = "videoPatrol") {
42
- const param = {
43
- cmd: "routing",
44
- action: "pause",
45
- type,
46
- id,
47
- };
33
+ static videoPatrolPause(id, type = "videoPatrol", extendParams = {}) {
34
+ const param = Object.assign({ cmd: "routing", action: "pause", type,
35
+ id }, extendParams);
48
36
  this.sendParam(param, '巡更暂停');
49
37
  }
50
38
  /**
@@ -52,13 +40,9 @@ export class RoutingAction extends Action {
52
40
  * @param {*} id (必须)巡检的唯一ID)
53
41
  * @param {*} type (必须)巡检的类型)
54
42
  */
55
- static videoPatrolNext(id, type = "videoPatrol") {
56
- const param = {
57
- cmd: "routing",
58
- action: "next",
59
- type,
60
- id,
61
- };
43
+ static videoPatrolNext(id, type = "videoPatrol", extendParams = {}) {
44
+ const param = Object.assign({ cmd: "routing", action: "next", type,
45
+ id }, extendParams);
62
46
  this.sendParam(param, '巡更下一步');
63
47
  }
64
48
  /**
@@ -66,13 +50,9 @@ export class RoutingAction extends Action {
66
50
  * @param {*} id (必须)巡检的唯一ID)
67
51
  * @param {*} type (必须)巡检的类型)
68
52
  */
69
- static videoPatrolPrev(id, type = "videoPatrol") {
70
- const param = {
71
- cmd: "routing",
72
- action: "last",
73
- type,
74
- id,
75
- };
53
+ static videoPatrolPrev(id, type = "videoPatrol", extendParams = {}) {
54
+ const param = Object.assign({ cmd: "routing", action: "last", type,
55
+ id }, extendParams);
76
56
  this.sendParam(param, '巡更上一步');
77
57
  }
78
58
  /**
@@ -80,13 +60,9 @@ export class RoutingAction extends Action {
80
60
  * @param {*} id (必须)巡检的唯一ID)
81
61
  * @param {*} type (必须)巡检的类型)
82
62
  */
83
- static videoPatrolRestart(id, type = "videoPatrol") {
84
- const param = {
85
- cmd: "routing",
86
- action: "restart",
87
- type,
88
- id,
89
- };
63
+ static videoPatrolRestart(id, type = "videoPatrol", extendParams = {}) {
64
+ const param = Object.assign({ cmd: "routing", action: "restart", type,
65
+ id }, extendParams);
90
66
  this.sendParam(param, '巡更重新开始,从暂停点开始');
91
67
  }
92
68
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "model-action",
3
- "version": "1.0.21",
3
+ "version": "1.0.22",
4
4
  "description": "与三维交互api",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -12,12 +12,13 @@ export class RoutingAction extends Action {
12
12
  * videoPatrol => 视频巡更
13
13
  * cameraRoute => 视角跟随样条线
14
14
  */
15
- static videoPatrolStart(id: string, type: string = "videoPatrol") {
15
+ static videoPatrolStart(id: string, type: string = "videoPatrol", extendParams = {}) {
16
16
  const param: any = {
17
17
  cmd: "routing",
18
18
  action: "start",
19
19
  type,
20
20
  id,
21
+ ...extendParams,
21
22
  };
22
23
  this.sendParam(param, '巡更开始')
23
24
  }
@@ -27,12 +28,13 @@ export class RoutingAction extends Action {
27
28
  * @param {*} id (必须)巡检的唯一ID)
28
29
  * @param {*} type (必须)巡检的类型)
29
30
  */
30
- static videoPatrolStop(id: string, type: string = "videoPatrol") {
31
+ static videoPatrolStop(id: string, type: string = "videoPatrol", extendParams = {}) {
31
32
  const param: any = {
32
33
  cmd: "routing",
33
34
  action: "stop",
34
35
  type,
35
36
  id,
37
+ ...extendParams,
36
38
  };
37
39
  this.sendParam(param, '巡更结束')
38
40
  }
@@ -42,12 +44,13 @@ export class RoutingAction extends Action {
42
44
  * @param {*} id (必须)巡检的唯一ID)
43
45
  * @param {*} type (必须)巡检的类型)
44
46
  */
45
- static videoPatrolPause(id: string, type: string = "videoPatrol") {
47
+ static videoPatrolPause(id: string, type: string = "videoPatrol", extendParams = {}) {
46
48
  const param: any = {
47
49
  cmd: "routing",
48
50
  action: "pause",
49
51
  type,
50
52
  id,
53
+ ...extendParams,
51
54
  };
52
55
  this.sendParam(param, '巡更暂停')
53
56
  }
@@ -57,12 +60,13 @@ export class RoutingAction extends Action {
57
60
  * @param {*} id (必须)巡检的唯一ID)
58
61
  * @param {*} type (必须)巡检的类型)
59
62
  */
60
- static videoPatrolNext(id: string, type: string = "videoPatrol") {
63
+ static videoPatrolNext(id: string, type: string = "videoPatrol", extendParams = {}) {
61
64
  const param: any = {
62
65
  cmd: "routing",
63
66
  action: "next",
64
67
  type,
65
68
  id,
69
+ ...extendParams,
66
70
  };
67
71
  this.sendParam(param, '巡更下一步')
68
72
  }
@@ -72,12 +76,13 @@ export class RoutingAction extends Action {
72
76
  * @param {*} id (必须)巡检的唯一ID)
73
77
  * @param {*} type (必须)巡检的类型)
74
78
  */
75
- static videoPatrolPrev(id: string, type: string = "videoPatrol") {
79
+ static videoPatrolPrev(id: string, type: string = "videoPatrol", extendParams = {}) {
76
80
  const param: any = {
77
81
  cmd: "routing",
78
82
  action: "last",
79
83
  type,
80
84
  id,
85
+ ...extendParams,
81
86
  };
82
87
  this.sendParam(param, '巡更上一步')
83
88
  }
@@ -87,12 +92,13 @@ export class RoutingAction extends Action {
87
92
  * @param {*} id (必须)巡检的唯一ID)
88
93
  * @param {*} type (必须)巡检的类型)
89
94
  */
90
- static videoPatrolRestart(id: string, type: string = "videoPatrol") {
95
+ static videoPatrolRestart(id: string, type: string = "videoPatrol", extendParams = {}) {
91
96
  const param: any = {
92
97
  cmd: "routing",
93
98
  action: "restart",
94
99
  type,
95
100
  id,
101
+ ...extendParams,
96
102
  };
97
103
  this.sendParam(param, '巡更重新开始,从暂停点开始')
98
104
  }