|
|
|
@ -367,10 +367,10 @@ export class PlanComponent implements OnInit {
|
|
|
|
|
selectChildNode(item: MarkPlanData) { |
|
|
|
|
if (this.isShowChildComponent && this.leftDomain) { |
|
|
|
|
if (item.nodes.length) { |
|
|
|
|
this.updateTimer? window.clearTimeout(this.updateTimer) : null //清除定时器
|
|
|
|
|
this.updateTimer ? window.clearTimeout(this.updateTimer) : null //清除定时器
|
|
|
|
|
this.nzCurrent = 0 |
|
|
|
|
this.beforeEmergencyPlan = item |
|
|
|
|
this.updateProgressList().then(res=>{ |
|
|
|
|
this.updateProgressList().then(res => { |
|
|
|
|
this.publicToggleNode() |
|
|
|
|
}) |
|
|
|
|
} else { |
|
|
|
@ -383,7 +383,7 @@ export class PlanComponent implements OnInit {
|
|
|
|
|
updateProgressList() { |
|
|
|
|
return new Promise((resolve, reject) => { |
|
|
|
|
this.progressList = [] |
|
|
|
|
this.beforeEmergencyPlan.nodes.forEach(item=>{ this.progressList.push(0) }) |
|
|
|
|
this.beforeEmergencyPlan.nodes.forEach(item => { this.progressList.push(0) }) |
|
|
|
|
resolve(true) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
@ -393,14 +393,14 @@ export class PlanComponent implements OnInit {
|
|
|
|
|
if (this.progressList[this.nzCurrent] >= 100) { |
|
|
|
|
this.progressList[this.nzCurrent] = 100 |
|
|
|
|
window.clearTimeout(this.updateTimer) //清除定时器
|
|
|
|
|
!this.isSuspend? this.autoPlay() : null |
|
|
|
|
!this.isSuspend ? this.autoPlay() : null |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
let time: number = this.beforePlanNode.getShowTime() || 1 |
|
|
|
|
this.updateTimer = window.setTimeout(()=>{ |
|
|
|
|
this.updateTimer = window.setTimeout(() => { |
|
|
|
|
this.progressList[this.nzCurrent] = this.progressList[this.nzCurrent] + Number((100 / time).toFixed(2)) / 10 |
|
|
|
|
this.updateProgress() |
|
|
|
|
},100) |
|
|
|
|
}, 100) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//自动播放-切换接点
|
|
|
|
@ -414,14 +414,14 @@ export class PlanComponent implements OnInit {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//切换预案节点
|
|
|
|
|
changePlanNode(event){ |
|
|
|
|
changePlanNode(event) { |
|
|
|
|
if (this.progressList.length != this.beforeEmergencyPlan.nodes.length) { |
|
|
|
|
this.updateProgressList() |
|
|
|
|
} |
|
|
|
|
this.updateTimer? window.clearTimeout(this.updateTimer) : null //清除定时器
|
|
|
|
|
this.updateTimer ? window.clearTimeout(this.updateTimer) : null //清除定时器
|
|
|
|
|
this.isSuspend = true //暂停
|
|
|
|
|
this.nzCurrent = event |
|
|
|
|
this.progressList.forEach((item,index)=>{ index >= this.nzCurrent? this.progressList[index] = 0 : null }) |
|
|
|
|
this.progressList.forEach((item, index) => { index >= this.nzCurrent ? this.progressList[index] = 0 : null }) |
|
|
|
|
this.publicToggleNode() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -438,9 +438,9 @@ export class PlanComponent implements OnInit {
|
|
|
|
|
if (this.progressList.length != this.beforeEmergencyPlan.nodes.length) { |
|
|
|
|
this.updateProgressList() |
|
|
|
|
} |
|
|
|
|
this.updateTimer? window.clearTimeout(this.updateTimer) : null //清除定时器
|
|
|
|
|
this.updateTimer ? window.clearTimeout(this.updateTimer) : null //清除定时器
|
|
|
|
|
this.nzCurrent = this.nzCurrent - 1 |
|
|
|
|
this.progressList.forEach((item,index)=>{ index >= this.nzCurrent? this.progressList[index] = 0 : null }) |
|
|
|
|
this.progressList.forEach((item, index) => { index >= this.nzCurrent ? this.progressList[index] = 0 : null }) |
|
|
|
|
this.publicToggleNode() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -454,13 +454,13 @@ export class PlanComponent implements OnInit {
|
|
|
|
|
this.updateProgressList() |
|
|
|
|
} |
|
|
|
|
this.isSuspend = isSuspend |
|
|
|
|
let msg: string = this.isSuspend? "目前已暂停" : "目前已开始播放" |
|
|
|
|
let msg: string = this.isSuspend ? "目前已暂停" : "目前已开始播放" |
|
|
|
|
this.message.info(msg); |
|
|
|
|
if (this.isSuspend) { //暂停
|
|
|
|
|
window.clearTimeout(this.updateTimer) //清除定时器
|
|
|
|
|
} else { //开启
|
|
|
|
|
this.updateTimer? window.clearTimeout(this.updateTimer) : null //清除定时器
|
|
|
|
|
this.progressList.forEach((item,index)=>{ index > this.nzCurrent? this.progressList[index] = 0 : null }) |
|
|
|
|
this.updateTimer ? window.clearTimeout(this.updateTimer) : null //清除定时器
|
|
|
|
|
this.progressList.forEach((item, index) => { index > this.nzCurrent ? this.progressList[index] = 0 : null }) |
|
|
|
|
this.updateProgress() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -471,8 +471,8 @@ export class PlanComponent implements OnInit {
|
|
|
|
|
this.message.info('请选择节点'); |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
this.updateTimer? window.clearTimeout(this.updateTimer) : null //清除定时器
|
|
|
|
|
this.updateProgressList().then(res=>{ |
|
|
|
|
this.updateTimer ? window.clearTimeout(this.updateTimer) : null //清除定时器
|
|
|
|
|
this.updateProgressList().then(res => { |
|
|
|
|
this.nzCurrent = 0 |
|
|
|
|
this.publicToggleNode() |
|
|
|
|
}) |
|
|
|
@ -491,16 +491,16 @@ export class PlanComponent implements OnInit {
|
|
|
|
|
if (this.progressList.length != this.beforeEmergencyPlan.nodes.length) { |
|
|
|
|
this.updateProgressList() |
|
|
|
|
} |
|
|
|
|
this.updateTimer? window.clearTimeout(this.updateTimer) : null //清除定时器
|
|
|
|
|
this.updateTimer ? window.clearTimeout(this.updateTimer) : null //清除定时器
|
|
|
|
|
this.nzCurrent = this.nzCurrent + 1 |
|
|
|
|
this.progressList.forEach((item,index)=>{ index >= this.nzCurrent? this.progressList[index] = 0 : null }) |
|
|
|
|
this.progressList.forEach((item, index) => { index >= this.nzCurrent ? this.progressList[index] = 0 : null }) |
|
|
|
|
this.publicToggleNode() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//获取进度条 flex分布
|
|
|
|
|
getProgressFlex(e: MarkNodeData):string { |
|
|
|
|
getProgressFlex(e: MarkNodeData): string { |
|
|
|
|
let length: number = 0 |
|
|
|
|
this.beforeEmergencyPlan.nodes.forEach(item=>{ |
|
|
|
|
this.beforeEmergencyPlan.nodes.forEach(item => { |
|
|
|
|
length = length + (item.getShowTime() || 1) |
|
|
|
|
}) |
|
|
|
|
let percentage: number = (e.getShowTime() || 1) / length |
|
|
|
@ -642,42 +642,33 @@ export class taskDialog {
|
|
|
|
|
//设备任务list
|
|
|
|
|
export class taskList { |
|
|
|
|
character: any[] = [ |
|
|
|
|
{ taskName: "外部控火" }, |
|
|
|
|
{ taskName: "内部控火" }, |
|
|
|
|
{ taskName: "外部侦察" }, |
|
|
|
|
{ taskName: "内部侦察" }, |
|
|
|
|
{ taskName: "外部观察" }, |
|
|
|
|
{ taskName: "外部疏散救生" }, |
|
|
|
|
{ taskName: "询问知情人" }, |
|
|
|
|
{ taskName: "占领消控室" }, |
|
|
|
|
{ taskName: "水源引导" }, |
|
|
|
|
{ taskName: "断电气" }, |
|
|
|
|
{ taskName: "加油" }, |
|
|
|
|
{ taskName: "卸油" }, |
|
|
|
|
{ taskName: "按下紧急切断按钮" }, |
|
|
|
|
{ taskName: "呼喊示警" }, |
|
|
|
|
{ taskName: "停止加油" }, |
|
|
|
|
{ taskName: "关闭泄油阀" }, |
|
|
|
|
{ taskName: "指挥疏通撤离" }, |
|
|
|
|
{ taskName: "向运营、QHSE报告" }, |
|
|
|
|
{ taskName: "撤离" }, |
|
|
|
|
{ taskName: "119报警" }, |
|
|
|
|
{ taskName: "110报警" }, |
|
|
|
|
{ taskName: "120报警" }, |
|
|
|
|
{ taskName: "使用灭火毯" }, |
|
|
|
|
{ taskName: "使用灭火器" }, |
|
|
|
|
{ taskName: "灭火" }, |
|
|
|
|
{ taskName: "掩护" }, |
|
|
|
|
{ taskName: "警戒" }, |
|
|
|
|
{ taskName: "破拆" }, |
|
|
|
|
{ taskName: "排烟" }, |
|
|
|
|
{ taskName: "照明" }, |
|
|
|
|
{ taskName: "通信" }, |
|
|
|
|
{ taskName: "协助灭火" }, |
|
|
|
|
{ taskName: "确认安全" }, |
|
|
|
|
{ taskName: "保持冷静" }, |
|
|
|
|
{ taskName: "待命" }, |
|
|
|
|
]; |
|
|
|
|
car: any[] = [ |
|
|
|
|
{ taskName: "内攻" }, |
|
|
|
|
{ taskName: "出枪掩护" }, |
|
|
|
|
{ taskName: "出枪冷却" }, |
|
|
|
|
{ taskName: "出枪灭火" }, |
|
|
|
|
{ taskName: "供水" }, |
|
|
|
|
{ taskName: "供泡沫" }, |
|
|
|
|
{ taskName: "连接消火栓" }, |
|
|
|
|
{ taskName: "遥控水炮冷却" }, |
|
|
|
|
{ taskName: "遥控水炮灭火" }, |
|
|
|
|
{ taskName: "抢险救援" }, |
|
|
|
|
{ taskName: "救人" }, |
|
|
|
|
{ taskName: "指挥" }, |
|
|
|
|
{ taskName: "排烟" }, |
|
|
|
|
{ taskName: "提供器材" }, |
|
|
|
|
{ taskName: "照明" }, |
|
|
|
|
{ taskName: "供电" }, |
|
|
|
|
{ taskName: "加油" }, |
|
|
|
|
{ taskName: "停止加油" }, |
|
|
|
|
{ taskName: "灭火" }, |
|
|
|
|
{ taskName: "逃逸" }, |
|
|
|
|
{ taskName: "撤离" }, |
|
|
|
|
{ taskName: "损毁" }, |
|
|
|
|
{ taskName: "待命" }, |
|
|
|
|
] |
|
|
|
|
firemonitor: any[] = [ |
|
|
|
|