|
|
|
import { Type } from "class-transformer";
|
|
|
|
import { ConfigManager } from "src/app/babylon/controller/config-manager";
|
|
|
|
|
|
|
|
|
|
|
|
import { ModelData } from "../model-data/model-data";
|
|
|
|
import { TransformData } from "../transform-data";
|
|
|
|
import { MarkProperty } from "./mark-property";
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 标绘数据
|
|
|
|
*/
|
|
|
|
export class MarkData extends ModelData {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 名称类型,标志其具体是什么
|
|
|
|
*/
|
|
|
|
type: MarkType = MarkType.SY;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 所属标签的tag
|
|
|
|
*/
|
|
|
|
tagPos: MarkTagPos = MarkTagPos.Disaster;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 标记的类型划分
|
|
|
|
* 包括:人、车、物、虚拟物、特效
|
|
|
|
*/
|
|
|
|
markKindType: MarkKindType = MarkKindType.Persion;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 图标地址
|
|
|
|
*/
|
|
|
|
iconURL: string;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 所属建筑
|
|
|
|
*/
|
|
|
|
belongtoBuildingId: string;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 属性
|
|
|
|
*/
|
|
|
|
@Type(() => MarkProperty)
|
|
|
|
property: MarkProperty;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 子节点信息(用于保存子节点变换信息,完成举臂等功能)
|
|
|
|
*/
|
|
|
|
@Type(() => ChildNodeData)
|
|
|
|
childrenNodeData: ChildNodeData[] = [];
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 水枪特效强度
|
|
|
|
*/
|
|
|
|
waterPower: number = 20;
|
|
|
|
|
|
|
|
|
|
|
|
constructor(id: string, type: MarkType, tagPos: MarkTagPos, markKindType: MarkKindType, iconURL: string, resPath: string, resName: string, taskType: MarkTask, isModel: boolean) {
|
|
|
|
super(id, ConfigManager.getMarkName(type), resPath, resName, undefined, isModel)
|
|
|
|
this.name = ConfigManager.getMarkName(type);
|
|
|
|
this.type = type;
|
|
|
|
this.tagPos = tagPos;
|
|
|
|
this.markKindType = markKindType;
|
|
|
|
this.iconURL = iconURL;
|
|
|
|
|
|
|
|
let defaultTask: string = undefined;
|
|
|
|
if (type == MarkType.WZ) {
|
|
|
|
defaultTask = "文字信息";
|
|
|
|
}
|
|
|
|
|
|
|
|
this.property = new MarkProperty(taskType, this.name, undefined, defaultTask);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 子节点数据
|
|
|
|
*/
|
|
|
|
export class ChildNodeData {
|
|
|
|
/**
|
|
|
|
* 子节点名称
|
|
|
|
*/
|
|
|
|
name: string;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 变换信息
|
|
|
|
*/
|
|
|
|
@Type(() => TransformData)
|
|
|
|
transformData: TransformData = new TransformData();
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 所属标签的tag
|
|
|
|
*/
|
|
|
|
export enum MarkTagPos {
|
|
|
|
/**
|
|
|
|
* 灾情
|
|
|
|
*/
|
|
|
|
Disaster = "Disaster",
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 内部力量
|
|
|
|
*/
|
|
|
|
Inside = "Inside",
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 外部力量
|
|
|
|
*/
|
|
|
|
Outside = "Outside",
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 标绘工具
|
|
|
|
*/
|
|
|
|
Other = "Other",
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 标绘的分类类型
|
|
|
|
*/
|
|
|
|
export enum MarkKindType {
|
|
|
|
/**
|
|
|
|
* 人
|
|
|
|
*/
|
|
|
|
Persion = "Persion",
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 车
|
|
|
|
*/
|
|
|
|
Car = "Car",
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 物品
|
|
|
|
*/
|
|
|
|
Goods = "Goods",
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 虚拟物,如: 箭头、文字标记类
|
|
|
|
*/
|
|
|
|
Virtual = "Virtual",
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 特效
|
|
|
|
*/
|
|
|
|
Effect = "Effect",
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 标绘的名称类型
|
|
|
|
* 每个标会类型id
|
|
|
|
*/
|
|
|
|
export enum MarkType {
|
|
|
|
|
|
|
|
//============灾情设定===============
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 伤员D
|
|
|
|
*/
|
|
|
|
SY = "SY",
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 歹徒
|
|
|
|
*/
|
|
|
|
DT = "DT",
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 漏油(大)
|
|
|
|
*/
|
|
|
|
LYD = "LYD",
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 漏油(小)
|
|
|
|
*/
|
|
|
|
LYX = "LYX",
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 火(大)
|
|
|
|
*/
|
|
|
|
H = "H",
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 火(小)
|
|
|
|
*/
|
|
|
|
SNH = "SNH",
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 烟雾A(大)
|
|
|
|
*/
|
|
|
|
YWA = "YWA",
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 烟雾(小)
|
|
|
|
*/
|
|
|
|
YWB = "YWB",
|
|
|
|
|
|
|
|
//==================外部力量================
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 消防员
|
|
|
|
*/
|
|
|
|
XFY = "XFY",
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 消防车
|
|
|
|
*/
|
|
|
|
XFC = "XFC",
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 警车
|
|
|
|
*/
|
|
|
|
JC = "JC",
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 交警
|
|
|
|
*/
|
|
|
|
JJ = "JJ",
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 公安
|
|
|
|
*/
|
|
|
|
GA = "GA",
|
|
|
|
/**
|
|
|
|
* 救护车
|
|
|
|
*/
|
|
|
|
JHC = "JHC",
|
|
|
|
/**
|
|
|
|
* 医生
|
|
|
|
*/
|
|
|
|
YS = "YS",
|
|
|
|
|
|
|
|
//===============内部力量=================
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 经理
|
|
|
|
*/
|
|
|
|
JL = "JL",
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 主管
|
|
|
|
*/
|
|
|
|
YZZG = "YZZG",
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 收银员
|
|
|
|
*/
|
|
|
|
SYY = "SYY",
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 加油员
|
|
|
|
*/
|
|
|
|
JYY = "JYY",
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 卸油员
|
|
|
|
*/
|
|
|
|
XYY = "XYY",
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 油罐车
|
|
|
|
*/
|
|
|
|
YGC = "YGC",
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 输油管
|
|
|
|
*/
|
|
|
|
SYG = "SYG",
|
|
|
|
/**
|
|
|
|
* 油罐车司机
|
|
|
|
*/
|
|
|
|
YGCSJ = "YGCSJ",
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 消防沙(堆)
|
|
|
|
*/
|
|
|
|
XFSD = "XFSD",
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 消防沙(圈)
|
|
|
|
*/
|
|
|
|
XFSQ = "XFSQ",
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 专用密闭容器
|
|
|
|
*/
|
|
|
|
ZYMBRQ = "ZYMBRQ",
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 普通灭火器
|
|
|
|
*/
|
|
|
|
PTMHQ = "PTMHQ",
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 干粉灭火器
|
|
|
|
*/
|
|
|
|
GFMHQ = "GFMHQ",
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 推车灭火器
|
|
|
|
*/
|
|
|
|
TCMHQ = "TCMHQ",
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 灭火毯(开)
|
|
|
|
*/
|
|
|
|
MHTK = "MHTK",
|
|
|
|
|
|
|
|
|
|
|
|
//===================其他===================
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 顾客
|
|
|
|
*/
|
|
|
|
GK = "GK",
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 轿车
|
|
|
|
*/
|
|
|
|
JCA = "JCA",
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 警戒线
|
|
|
|
*/
|
|
|
|
JJX = "JJX",
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 进攻路线
|
|
|
|
*/
|
|
|
|
JGLX = "JGLX",
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 撤退
|
|
|
|
*/
|
|
|
|
CT = "CT",
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 文字
|
|
|
|
*/
|
|
|
|
WZ = "WZ",
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 区域设定
|
|
|
|
*/
|
|
|
|
QYSDA = "QYSDA",
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 区域设定
|
|
|
|
*/
|
|
|
|
QYSDB = "QYSDB",
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 标记的任务类型
|
|
|
|
*/
|
|
|
|
export enum MarkTask {
|
|
|
|
/**
|
|
|
|
* 无任务(不打开任务界面)
|
|
|
|
*/
|
|
|
|
None,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 未知(打开界面,但没有任务列表)
|
|
|
|
*/
|
|
|
|
Unknown,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 人员
|
|
|
|
*/
|
|
|
|
Person,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 车辆
|
|
|
|
*/
|
|
|
|
Car,
|
|
|
|
}
|
|
|
|
|