|
|
|
@ -210,40 +210,19 @@ export class LeftDomainComponent implements OnInit {
|
|
|
|
|
//选中 数据节点
|
|
|
|
|
selectNode(item: MarkPlanData, e: MarkNodeData) { |
|
|
|
|
if (this.selectPlanId != item.id || this.selectNodeId != e.id) { //选中
|
|
|
|
|
if (!MarkWindow.instance.currentMarkNodeInfo) { //未选中节点
|
|
|
|
|
this.updateFatherData() //更新/初始化父组件 数据
|
|
|
|
|
this.selectPlanId = item.id |
|
|
|
|
this.selectNodeId = e.id |
|
|
|
|
MarkWindow.instance.selectMarkNode(item.id, e.id) |
|
|
|
|
PlanComponent.instance.beforeEmergencyPlan = item |
|
|
|
|
PlanComponent.instance.beforePlanNode = MarkWindow.instance.currentMarkNodeInfo.nodeData |
|
|
|
|
} else { //已选中节点
|
|
|
|
|
let isTrue = true; |
|
|
|
|
if (ModeManager.currentMode == ModeType.Edit) { |
|
|
|
|
isTrue = confirm('切换节点后,没保存的信息将会丢失!') |
|
|
|
|
} |
|
|
|
|
if (isTrue) { |
|
|
|
|
this.updateFatherData() //更新/初始化父组件 数据
|
|
|
|
|
this.selectPlanId = item.id |
|
|
|
|
this.selectNodeId = e.id |
|
|
|
|
MarkWindow.instance.selectMarkNode(item.id, e.id) |
|
|
|
|
PlanComponent.instance.beforeEmergencyPlan = item |
|
|
|
|
PlanComponent.instance.beforePlanNode = MarkWindow.instance.currentMarkNodeInfo.nodeData |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
this.updateFatherData() //更新/初始化父组件 数据
|
|
|
|
|
this.selectPlanId = item.id |
|
|
|
|
this.selectNodeId = e.id |
|
|
|
|
MarkWindow.instance.selectMarkNode(item.id, e.id) |
|
|
|
|
PlanComponent.instance.beforeEmergencyPlan = item |
|
|
|
|
PlanComponent.instance.beforePlanNode = MarkWindow.instance.currentMarkNodeInfo.nodeData |
|
|
|
|
} else if (this.selectPlanId === item.id && this.selectNodeId === e.id) { //取消选中
|
|
|
|
|
let isTrue = true; |
|
|
|
|
if (ModeManager.currentMode == ModeType.Edit) { |
|
|
|
|
isTrue = confirm('切换节点后,没保存的信息将会丢失!') |
|
|
|
|
} |
|
|
|
|
if (isTrue) { |
|
|
|
|
PlanComponent.instance.beforeEmergencyPlan = new MarkPlanData(-99, "请选择节点") |
|
|
|
|
PlanComponent.instance.beforePlanNode = new MarkNodeData(-99, "请选择节点") |
|
|
|
|
this.updateFatherData() //更新/初始化父组件 数据
|
|
|
|
|
this.selectPlanId = null |
|
|
|
|
this.selectNodeId = null |
|
|
|
|
MarkWindow.instance.selectMarkNode(null, null) |
|
|
|
|
} |
|
|
|
|
PlanComponent.instance.beforeEmergencyPlan = new MarkPlanData(-99, "请选择节点") |
|
|
|
|
PlanComponent.instance.beforePlanNode = new MarkNodeData(-99, "请选择节点") |
|
|
|
|
this.updateFatherData() //更新/初始化父组件 数据
|
|
|
|
|
this.selectPlanId = null |
|
|
|
|
this.selectNodeId = null |
|
|
|
|
MarkWindow.instance.selectMarkNode(null, null) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|