Browse Source

修改任务列表

dev
刘向辉 3 years ago
parent
commit
b65e1f320e
  1. 2
      src/app/babylon/controller/mode-manager.ts
  2. 12
      src/app/babylon/model/data/mark/mark-plan-data.ts
  3. 2
      src/app/babylon/view/mark-window/mark-window.ts
  4. 95
      src/app/pages/plan/plan.component.ts

2
src/app/babylon/controller/mode-manager.ts

@ -23,7 +23,7 @@ export class ModeManager {
/**
*
*/
public static s_isMakeMode = true;
public static s_isMakeMode = false;
/**
*

12
src/app/babylon/model/data/mark/mark-plan-data.ts

@ -354,6 +354,7 @@ export class MarkNodeData {
/**
*
* 3
*/
getShowTime() {
let textNum = 0;
@ -361,9 +362,16 @@ export class MarkNodeData {
textNum = this.describe.length;
}
let timeScale = 1;
let timeScale = 0.3;
return textNum * timeScale;
let minTime = 3; //最短停留时间
let result = textNum * timeScale;
if (result < minTime) {
result = minTime;
}
return result;
}
}

2
src/app/babylon/view/mark-window/mark-window.ts

@ -9,6 +9,7 @@ import { Event_GetAllMarkPlanData } from "../../controller/event-manager/events/
import { Event_KeyboardInput } from "../../controller/event-manager/events/event-keyboard-input";
import { Event_MarkInfoChange, MarkInfoChangeType } from "../../controller/event-manager/events/event-mark-info-change";
import { InputController } from "../../controller/inputController";
import { ModeManager } from "../../controller/mode-manager";
import { SceneManager } from "../../controller/scene-manager";
import { BuildingStatus } from "../../controller/status/building-status";
import { IndoorStatus } from "../../controller/status/indoor-status";
@ -149,6 +150,7 @@ export class MarkWindow extends UIBase {
instance.onUpdateShow();
})
}

95
src/app/pages/plan/plan.component.ts

@ -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[] = [

Loading…
Cancel
Save