|
|
|
@ -7,7 +7,9 @@ import { ConfigManager } from 'src/app/babylon/controller/config-manager';
|
|
|
|
|
import { FacilityType } from 'src/app/babylon/model/data/model-data/model-data-facility'; |
|
|
|
|
import { EventManager } from 'src/app/babylon/controller/event-manager/event-manager'; |
|
|
|
|
import { Event_GetAllMarkPlanData } from 'src/app/babylon/controller/event-manager/events/event-get-markplandata-success'; |
|
|
|
|
import { AllMarkPlanData } from 'src/app/babylon/model/data/mark/mark-plan-data'; |
|
|
|
|
import { AllMarkPlanData, MarkNodeData, MarkPlanData } from 'src/app/babylon/model/data/mark/mark-plan-data'; |
|
|
|
|
import { MarkWindow } from 'src/app/babylon/view/mark-window/mark-window'; |
|
|
|
|
import { NzMessageService } from 'ng-zorro-antd/message'; |
|
|
|
|
|
|
|
|
|
@Component({ |
|
|
|
|
selector: 'app-left-domain', |
|
|
|
@ -16,7 +18,7 @@ import { AllMarkPlanData } from 'src/app/babylon/model/data/mark/mark-plan-data'
|
|
|
|
|
}) |
|
|
|
|
export class LeftDomainComponent implements OnInit { |
|
|
|
|
|
|
|
|
|
constructor() { } |
|
|
|
|
constructor(private message: NzMessageService) { } |
|
|
|
|
|
|
|
|
|
ngOnInit(): void { |
|
|
|
|
this.initComponent() |
|
|
|
@ -151,6 +153,51 @@ export class LeftDomainComponent implements OnInit {
|
|
|
|
|
allMarkPlanData: AllMarkPlanData; //处置预案节点数据
|
|
|
|
|
selectPlanId: number; |
|
|
|
|
selectNodeId: number; |
|
|
|
|
addDisposalPop: boolean = false; //显示/隐藏 创建预案弹窗
|
|
|
|
|
addNodePop: number = null; //显示/隐藏 创建节点 父节点ID
|
|
|
|
|
|
|
|
|
|
//创建预案/节点
|
|
|
|
|
addDisposal(e) { |
|
|
|
|
if (this.addDisposalPop) { //创建预案
|
|
|
|
|
MarkWindow.instance.createMarkPlaneData(e.name) |
|
|
|
|
this.addDisposalPop = false |
|
|
|
|
} else { //创建节点
|
|
|
|
|
MarkWindow.instance.createMarkNodeData(this.addNodePop,e.name) |
|
|
|
|
this.addNodePop = null |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//删除预案/节点
|
|
|
|
|
deleteDisposal(item: MarkPlanData, e?: MarkNodeData) { |
|
|
|
|
let isTrue = confirm('您确定要删除吗') |
|
|
|
|
if (isTrue) { |
|
|
|
|
if (!e) { |
|
|
|
|
MarkWindow.instance.deleteMarkPlaneData(item.id) |
|
|
|
|
} else { |
|
|
|
|
MarkWindow.instance.deleteMarkNodeData(item.id, e.id) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//保存预案/节点
|
|
|
|
|
saveDisposal(markPlanId: number = null, nodeId: number = null) { |
|
|
|
|
if (!MarkWindow.instance.currentMarkNodeInfo) { //未选中节点
|
|
|
|
|
this.message.info('还没有进行标绘,无法保存'); |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
if (markPlanId === null && nodeId === null) { // 整体弹窗保存
|
|
|
|
|
this.saveDisposalDialog = true |
|
|
|
|
} else { |
|
|
|
|
if (this.selectPlanId === markPlanId && this.selectNodeId === nodeId) { |
|
|
|
|
MarkWindow.instance.saveToOldNode(markPlanId,nodeId) |
|
|
|
|
} else { |
|
|
|
|
let isTrue = confirm('是否覆盖要保存的节点?') |
|
|
|
|
isTrue? MarkWindow.instance.saveToOldNode(markPlanId,nodeId) : null |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
saveDisposalDialog: boolean = false; //整体保存预案 弹窗
|
|
|
|
|
|
|
|
|
|
//编辑信息
|
|
|
|
|
editInfo() { |
|
|
|
|