陈鹏飞 3 years ago
parent
commit
1889410c01
  1. 5
      src/app/pages/left-domain/left-domain.component.html
  2. 19
      src/app/pages/left-domain/left-domain.component.ts

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

@ -209,12 +209,12 @@
<nz-modal nzClassName="baseInfoDialog" [(nzVisible)]="isShowBaseDialog" nzFooter="null" (nzOnCancel)="closeBaseInfoDialog()" nzWidth="70%"> <nz-modal nzClassName="baseInfoDialog" [(nzVisible)]="isShowBaseDialog" nzFooter="null" (nzOnCancel)="closeBaseInfoDialog()" nzWidth="70%">
<app-oil-station-info *ngIf="isShowBaseDialog"></app-oil-station-info> <app-oil-station-info *ngIf="isShowBaseDialog"></app-oil-station-info>
</nz-modal> </nz-modal>
<nz-modal [(nzVisible)]="addDisposalPop || addNodePop" nzTitle="创建预案/节点" (nzOnCancel)="addDisposalPop = false; addNodePop = null;" (nzOnOk)="addDisposal(form.value)" [nzOkDisabled]='nodeName.invalid'> <nz-modal [(nzVisible)]="addDisposalPop || addNodePop" nzTitle="创建预案/节点" (nzOnCancel)="addDisposalPop = false; addNodePop = null;" (nzOnOk)="addDisposal(form.value)">
<form nz-form #form='ngForm'> <form nz-form #form='ngForm'>
<nz-form-item> <nz-form-item>
<nz-form-label [nzSpan]="6">预案/节点名称</nz-form-label> <nz-form-label [nzSpan]="6">预案/节点名称</nz-form-label>
<nz-form-control [nzSpan]="18" nzErrorTip="请输入必填项"> <nz-form-control [nzSpan]="18" nzErrorTip="请输入必填项">
<input nz-input #nodeName='ngModel' ngModel name="name" required/> <input nz-input #nodeName='ngModel' ngModel name="name"/>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
<nz-form-item *ngIf="addDisposalPop"> <nz-form-item *ngIf="addDisposalPop">
@ -224,6 +224,7 @@
<nz-option nzValue="" nzLabel="无"></nz-option> <nz-option nzValue="" nzLabel="无"></nz-option>
<nz-option [nzValue]="item.id" [nzLabel]="item.name" *ngFor="let item of allSandBoxTemplate"></nz-option> <nz-option [nzValue]="item.id" [nzLabel]="item.name" *ngFor="let item of allSandBoxTemplate"></nz-option>
</nz-select> </nz-select>
<button nz-button style="margin-top: 5px;" (click)="deleteMould(form.value)">删除模板</button>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</form> </form>

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

@ -253,10 +253,18 @@ export class LeftDomainComponent implements OnInit {
MarkWindow.instance.addMarkPlanByTemplate(e.selectMould) MarkWindow.instance.addMarkPlanByTemplate(e.selectMould)
this.addDisposalPop = false this.addDisposalPop = false
} else { } else {
if (!e.name) {
this.message.info('请填写名称!');
return
}
MarkWindow.instance.createMarkPlaneData(e.name) MarkWindow.instance.createMarkPlaneData(e.name)
this.addDisposalPop = false this.addDisposalPop = false
} }
} else { //创建节点 } else { //创建节点
if (!e.name) {
this.message.info('请填写名称!');
return
}
MarkWindow.instance.createMarkNodeData(this.addNodePop, e.name) MarkWindow.instance.createMarkNodeData(this.addNodePop, e.name)
this.addNodePop = null this.addNodePop = null
} }
@ -271,6 +279,17 @@ export class LeftDomainComponent implements OnInit {
this.addNodePop = id this.addNodePop = id
} }
//删除模板
deleteMould(e) {
if (e.selectMould) {
let isTrue = confirm('您确定要删除当前选中模板吗')
if (isTrue) {
// MarkWindow.instance.
}
}
console.log(e)
}
//保存为模板 //保存为模板
saveMould() { saveMould() {
MarkWindow.instance.saveToSandBoxTemplate(this.editSelectDisposal) MarkWindow.instance.saveToSandBoxTemplate(this.editSelectDisposal)

Loading…
Cancel
Save