Browse Source

设备任务弹窗完善

dev
陈鹏飞 3 years ago
parent
commit
6bbbc3d29b
  1. 2
      src/app/babylon/view/mark-window/mark-window.ts
  2. 29
      src/app/pages/plan/plan.component.html
  3. 90
      src/app/pages/plan/plan.component.ts
  4. 10
      src/styles.scss

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

@ -527,7 +527,7 @@ export class MarkWindow extends UIBase {
*/
openProperty(markInfo: ModelInfo_mark) {
if (markInfo != null) {
//ThreeDimensionalHomeComponent.instance.getSandTableNature(markInfo.markData);
PlanComponent.instance.getSandTableNature(markInfo.markData);
}
}

29
src/app/pages/plan/plan.component.html

@ -204,6 +204,35 @@
</form>
</nz-modal>
<!-- 新增/编辑左侧建筑弹窗 -->
<!-- 应急预案设备任务弹窗 -->
<nz-modal nzClassName="taskDialog" [(nzVisible)]="contingencyPlanTask" nzTitle="设备任务栏" (nzOnCancel)="contingencyPlanTask = null;" (nzOnOk)="submitTaskForm(taskForm.value)" [nzOkDisabled]='companyName.invalid'>
<form nz-form #taskForm='ngForm'>
<nz-form-item>
<nz-form-label [nzSpan]="6">名称</nz-form-label>
<nz-form-control [nzSpan]="18" nzErrorTip="请输入必填项">
<input nz-input #companyName='ngModel' [(ngModel)]="taskDialog.institution" name="companyName" required/>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSpan]="6">任务</nz-form-label>
<nz-form-control [nzSpan]="18" nzErrorTip="请输入必填项">
<input nz-input #taskName='ngModel' [(ngModel)]="taskDialog.task" name="taskName" autocomplete="off" nz-dropdown [nzDropdownMenu]="taskList"/>
<nz-dropdown-menu #taskList="nzDropdownMenu">
<ul nz-menu>
<li nz-menu-item *ngFor="let item of allTaskList" (click)="taskDialog.task = item.taskName;">{{item.taskName}}</li>
</ul>
</nz-dropdown-menu>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSpan]="6">备注</nz-form-label>
<nz-form-control [nzSpan]="18" nzErrorTip="请输入必填项">
<textarea nz-input #description='ngModel' [(ngModel)]="taskDialog.description" name="description"></textarea>
</nz-form-control>
</nz-form-item>
</form>
</nz-modal>
<!-- 应急预案设备任务弹窗 -->
</div>
</div>

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

@ -20,7 +20,7 @@ import { NzMessageService } from 'ng-zorro-antd/message';
import { LeftDomainComponent } from '../left-domain/left-domain.component';
import { JYZInfoMoudleType } from 'src/app/babylon/model/data/institution/jyz-show-data';
import { AllMarkData } from 'src/app/babylon/model/data/mark/all-mark-data';
import { MarkData } from 'src/app/babylon/model/data/mark/mark-data';
import { MarkData, MarkTask } from 'src/app/babylon/model/data/mark/mark-data';
import { MarkWindow } from 'src/app/babylon/view/mark-window/mark-window';
import { AllMarkPlanData, MarkNodeData, MarkPlanData } from 'src/app/babylon/model/data/mark/mark-plan-data';
@ -534,11 +534,41 @@ export class PlanComponent implements OnInit {
return `${percentage * 100}%`
}
contingencyPlanTask: MarkData = null; //应急预案选中 设备
taskDialog: taskDialog = new taskDialog("", "", ""); //设备任务 深拷贝数据
allTaskList: any[] = []; //所有任务 List
//选中应急预案 设备
selectSandTableMark(markData: MarkData, select: boolean) {
MarkWindow.instance.selectMarkData(markData, select)
}
//选中应急预案 设备任务窗口
getSandTableNature(markData: MarkData) {
if (markData.property.taskType != MarkTask.None) {
this.contingencyPlanTask = markData
this.taskDialog.institution = JSON.parse(JSON.stringify(markData.property.institution || ""))
this.taskDialog.description = JSON.parse(JSON.stringify(markData.property.description || ""))
this.taskDialog.task = JSON.parse(JSON.stringify(markData.property.task || ""))
if (markData.property.taskType === MarkTask.Person) {
this.allTaskList = (new taskList()).character
} else if (markData.property.taskType === MarkTask.Car) {
this.allTaskList = (new taskList()).car
} else {
this.allTaskList = []
}
}
}
//提交 设备任务窗口表单
submitTaskForm(e) {
this.contingencyPlanTask.property.institution = e.companyName
this.contingencyPlanTask.property.description = e.description
this.contingencyPlanTask.property.task = e.taskName
MarkWindow.instance.updateProperty()
this.contingencyPlanTask = null //关闭弹窗
}
selectRightTopFast: number = 0; //当前选择功能 快捷栏
selectAdsorb: boolean = false; //吸附状态
topLevelView: boolean = false; //顶视图状态
@ -614,6 +644,64 @@ export class PlanComponent implements OnInit {
}
//设备任务窗口 数据类型
export class taskDialog {
institution: string; //单位
task: string; //任务
description: string; //备注
constructor(institution: string, task: string, description: string) {
this.institution = institution
this.task = task
this.description = description
}
}
//设备任务list
export class taskList {
character: any[] = [
{ taskName: "外部控火" },
{ taskName: "内部控火" },
{ taskName: "外部侦察" },
{ taskName: "内部侦察" },
{ taskName: "外部观察" },
{ 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: "待命" },
]
firemonitor: any[] = [
{ taskName: "遥控水炮冷却" },
{ taskName: "遥控水炮灭火" },
{ taskName: "待命" },
]
}
//属性栏 定位
export class naturePosition {
top: string = "1%"

10
src/styles.scss

@ -115,6 +115,16 @@ h1 {
box-shadow: 0px 0px 6px #2399FF;
li { color: #fff; }
}
//任务弹窗
.taskDialog{
.ant-modal-header,.ant-modal-content { background: radial-gradient(circle, #004988 0%, #00122D 100%); }
.ant-modal-header,.ant-modal-footer { border: none; }
.ant-modal-title,.ant-form-item-label > label,.ant-input { color: #C4E2FC; }
.ant-modal-footer .ant-btn:first-child { color: #C4E2FC; background: #000D21; border: 1px solid #C4E2FC; }
.ant-modal-footer .ant-btn:last-child { color: #C4E2FC; background: rgba(0, 129, 255, 0.6); border: 1px solid #36A2FF; }
.ant-input { background: rgba(145, 204, 255, 0.41); border: 1px solid #91CCFF; }
textarea { resize: none; outline: none; }
}
#threeDimensional {
.ant-tree{ color: #C4E2FC; } //tree
.ant-tree,.ant-tree-node-content-wrapper:hover,.ant-tree-node-content-wrapper.ant-tree-node-selected { background-color: transparent; } //tree

Loading…
Cancel
Save