Browse Source

完善index

dev
陈鹏飞 3 years ago
parent
commit
c56087ab39
  1. 2
      src/app/pages/left-domain/left-domain.component.html
  2. 10
      src/app/pages/left-domain/left-domain.component.ts

2
src/app/pages/left-domain/left-domain.component.html

@ -149,7 +149,7 @@
</div>
<ul>
<li class="publicDisposal disposalContent" *ngFor="let items of item.nodes;let keys = index;">
<span nz-popconfirm nzPopconfirmTitle="切换节点后,没保存的信息将会丢失!" [nzCondition]="!editMode" (nzOnConfirm)="selectNode(item,items)" [ngClass]="{'selectNode': selectNodeId == items.id && selectPlanId == item.id}">{{items.name}}</span>
<span nz-popconfirm nzPopconfirmTitle="切换节点后,没保存的信息将会丢失!" [nzCondition]="!editMode" (nzOnConfirm)="selectNode(item,items,keys)" [ngClass]="{'selectNode': selectNodeId == items.id && selectPlanId == item.id}">{{items.name}}</span>
<label *ngIf="editMode"><i nz-icon nzType="save" nzTheme="outline" (click)="saveDisposal(item.id,items.id)"></i><i nz-icon nzType="delete" nzTheme="outline" (click)="deleteDisposal(item,items)"></i></label>
</li>
</ul>

10
src/app/pages/left-domain/left-domain.component.ts

@ -208,9 +208,9 @@ export class LeftDomainComponent implements OnInit {
}
//选中 数据节点
selectNode(item: MarkPlanData, e: MarkNodeData) {
selectNode(item: MarkPlanData, e: MarkNodeData, index: number) {
if (this.selectPlanId != item.id || this.selectNodeId != e.id) { //选中
this.updateFatherData() //更新/初始化父组件 数据
this.updateFatherData(index) //更新/初始化父组件 数据
this.selectPlanId = item.id
this.selectNodeId = e.id
MarkWindow.instance.selectMarkNode(item.id, e.id)
@ -219,7 +219,7 @@ export class LeftDomainComponent implements OnInit {
} else if (this.selectPlanId === item.id && this.selectNodeId === e.id) { //取消选中
PlanComponent.instance.beforeEmergencyPlan = new MarkPlanData(-99, "请选择节点")
PlanComponent.instance.beforePlanNode = new MarkNodeData(-99, "请选择节点")
this.updateFatherData() //更新/初始化父组件 数据
this.updateFatherData(index) //更新/初始化父组件 数据
this.selectPlanId = null
this.selectNodeId = null
MarkWindow.instance.selectMarkNode(null, null)
@ -227,8 +227,8 @@ export class LeftDomainComponent implements OnInit {
}
//更新/初始化父组件 数据
updateFatherData() {
PlanComponent.instance.nzCurrent = -1
updateFatherData(index) {
PlanComponent.instance.nzCurrent = index
PlanComponent.instance.isSuspend = true //暂停
PlanComponent.instance.timer? window.clearTimeout(PlanComponent.instance.timer) : null //清除定时器
PlanComponent.instance.updateTimer? window.clearTimeout(PlanComponent.instance.updateTimer) : null //清除定时器

Loading…
Cancel
Save