model-action 1.0.15 → 1.0.16

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.
@@ -28,6 +28,16 @@ export declare class PoiAction extends Action {
28
28
  * @param {*} linkId POI关联的设备ID
29
29
  */
30
30
  static poiAdd(type: PoiType['type'], location: LocationItem, text?: PoiType['text'], place?: PoiType['place'], description?: PoiType['description'], linkId?: PoiType['linkId']): void;
31
+ /**
32
+ * 更新poi
33
+ * @param {*} type 相机type
34
+ * @param {*} location poi点位置
35
+ * @param {*} text POI标题
36
+ * @param {*} place POI所在位置
37
+ * @param {*} description POI描述
38
+ * @param {*} linkId POI关联的设备ID
39
+ */
40
+ static poiUpdate(type: PoiType['type'], location: LocationItem, text?: PoiType['text'], place?: PoiType['place'], description?: PoiType['description'], linkId?: PoiType['linkId']): void;
31
41
  /**
32
42
  * 删除poi
33
43
  * @param {*} id 点ID
@@ -23,7 +23,29 @@ export class PoiAction extends Action {
23
23
  description,
24
24
  linkId
25
25
  };
26
- this.sendParam(param, '删除POI');
26
+ this.sendParam(param, '新增POI');
27
+ }
28
+ /**
29
+ * 更新poi
30
+ * @param {*} type 相机type
31
+ * @param {*} location poi点位置
32
+ * @param {*} text POI标题
33
+ * @param {*} place POI所在位置
34
+ * @param {*} description POI描述
35
+ * @param {*} linkId POI关联的设备ID
36
+ */
37
+ static poiUpdate(type = 'Camera', location, text = '', place = '', description = '', linkId = '') {
38
+ const param = {
39
+ cmd: "POI",
40
+ action: "update",
41
+ type,
42
+ text,
43
+ location,
44
+ place,
45
+ description,
46
+ linkId
47
+ };
48
+ this.sendParam(param, '更新POI');
27
49
  }
28
50
  /**
29
51
  * 删除poi
@@ -83,7 +105,7 @@ export class PoiAction extends Action {
83
105
  action: "status",
84
106
  state
85
107
  };
86
- this.sendParam(param, `恢复至${state}状态`);
108
+ this.sendParam(param, `恢复poi至${state}状态`);
87
109
  }
88
110
  /**
89
111
  * 获取指定POI
@@ -34,7 +34,7 @@ export class VideoFusionAction extends Action {
34
34
  id,
35
35
  fov,
36
36
  };
37
- this.sendParam(param);
37
+ this.sendParam(param, `飞行到视频融合点位【${id}】`);
38
38
  }
39
39
  /**
40
40
  * 开启视频融合
@@ -82,6 +82,6 @@ export class VideoFusionAction extends Action {
82
82
  action: "refresh",
83
83
  token,
84
84
  };
85
- this.sendParam(param);
85
+ this.sendParam(param, '刷新视频融合');
86
86
  }
87
87
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "model-action",
3
- "version": "1.0.15",
3
+ "version": "1.0.16",
4
4
  "description": "与三维交互api",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -41,7 +41,30 @@ export class PoiAction extends Action {
41
41
  description,
42
42
  linkId
43
43
  };
44
- this.sendParam(param, '删除POI')
44
+ this.sendParam(param, '新增POI')
45
+ }
46
+
47
+ /**
48
+ * 更新poi
49
+ * @param {*} type 相机type
50
+ * @param {*} location poi点位置
51
+ * @param {*} text POI标题
52
+ * @param {*} place POI所在位置
53
+ * @param {*} description POI描述
54
+ * @param {*} linkId POI关联的设备ID
55
+ */
56
+ static poiUpdate(type: PoiType['type'] = 'Camera', location: LocationItem, text: PoiType['text'] = '', place: PoiType['place'] = '', description: PoiType['description'] = '', linkId: PoiType['linkId'] = '') {
57
+ const param: RequiredSome<PoiType, 'action' | 'type' | 'location'> = {
58
+ cmd: "POI",
59
+ action: "update",
60
+ type,
61
+ text,
62
+ location,
63
+ place,
64
+ description,
65
+ linkId
66
+ };
67
+ this.sendParam(param, '更新POI')
45
68
  }
46
69
 
47
70
  /**
@@ -107,7 +130,7 @@ export class PoiAction extends Action {
107
130
  action: "status",
108
131
  state
109
132
  };
110
- this.sendParam(param, `恢复至${state}状态`)
133
+ this.sendParam(param, `恢复poi至${state}状态`)
111
134
  }
112
135
 
113
136
  /**
@@ -55,7 +55,7 @@ export class VideoFusionAction extends Action {
55
55
  id,
56
56
  fov,
57
57
  };
58
- this.sendParam(param)
58
+ this.sendParam(param,`飞行到视频融合点位【${id}】`)
59
59
  }
60
60
 
61
61
  /**
@@ -106,6 +106,6 @@ export class VideoFusionAction extends Action {
106
106
  action: "refresh",
107
107
  token,
108
108
  };
109
- this.sendParam(param)
109
+ this.sendParam(param,'刷新视频融合')
110
110
  }
111
111
  }