model-action 1.0.9 → 1.0.10
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/modules/Poi.d.ts +7 -1
- package/dist/modules/Poi.js +14 -2
- package/package.json +1 -1
package/dist/modules/Poi.d.ts
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
* POI点方法
|
3
3
|
*/
|
4
4
|
import { Action, LocationItem, SendParam } from "./Action";
|
5
|
-
type PoiActionType = 'show' | 'hide' | 'add' | 'delete' | 'update' | 'getInfo';
|
5
|
+
type PoiActionType = 'show' | 'hide' | 'add' | 'delete' | 'update' | 'getInfo' | 'status';
|
6
6
|
type PoiType = {
|
7
7
|
action: PoiActionType;
|
8
8
|
id?: string;
|
@@ -15,6 +15,7 @@ type PoiType = {
|
|
15
15
|
linkId?: string;
|
16
16
|
floorNum?: string;
|
17
17
|
lowestFloor?: string;
|
18
|
+
state?: 'normal' | 'alarm';
|
18
19
|
} & SendParam;
|
19
20
|
export declare class PoiAction extends Action {
|
20
21
|
/**
|
@@ -46,6 +47,11 @@ export declare class PoiAction extends Action {
|
|
46
47
|
* @param {*} place POI所在位置
|
47
48
|
*/
|
48
49
|
static poiHide(id: PoiType['id'], type: PoiType['type'], place: PoiType['place']): void;
|
50
|
+
/**
|
51
|
+
* 把所有的POI恢复到Normal状态
|
52
|
+
* @param {*} state normal一般状态 alarm 告警状态
|
53
|
+
*/
|
54
|
+
static poiNormal(state: 'normal' | 'alarm'): void;
|
49
55
|
/**
|
50
56
|
* 获取指定POI
|
51
57
|
* @param {*} type 相机type
|
package/dist/modules/Poi.js
CHANGED
@@ -43,7 +43,7 @@ export class PoiAction extends Action {
|
|
43
43
|
* @param {*} type 相机type
|
44
44
|
* @param {*} place POI所在位置
|
45
45
|
*/
|
46
|
-
static poiShow(id, type
|
46
|
+
static poiShow(id, type, place) {
|
47
47
|
const param = {
|
48
48
|
cmd: "POI",
|
49
49
|
action: "show",
|
@@ -61,7 +61,7 @@ export class PoiAction extends Action {
|
|
61
61
|
* @param {*} type 相机type
|
62
62
|
* @param {*} place POI所在位置
|
63
63
|
*/
|
64
|
-
static poiHide(id, type
|
64
|
+
static poiHide(id, type, place) {
|
65
65
|
const param = {
|
66
66
|
cmd: "POI",
|
67
67
|
action: "hide",
|
@@ -73,6 +73,18 @@ export class PoiAction extends Action {
|
|
73
73
|
}
|
74
74
|
this.sendParam(param, '隐藏POI');
|
75
75
|
}
|
76
|
+
/**
|
77
|
+
* 把所有的POI恢复到Normal状态
|
78
|
+
* @param {*} state normal一般状态 alarm 告警状态
|
79
|
+
*/
|
80
|
+
static poiNormal(state) {
|
81
|
+
const param = {
|
82
|
+
cmd: "POI",
|
83
|
+
action: "status",
|
84
|
+
state
|
85
|
+
};
|
86
|
+
this.sendParam(param, `恢复至${state}状态`);
|
87
|
+
}
|
76
88
|
/**
|
77
89
|
* 获取指定POI
|
78
90
|
* @param {*} type 相机type
|