model-action 1.0.19 → 1.0.20

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