Browse Source

模板对接

dev
陈鹏飞 3 years ago
parent
commit
f0a0717dec
  1. 9
      src/app/pages/left-domain/left-domain.component.html
  2. 11
      src/app/pages/left-domain/left-domain.component.ts
  3. 1
      src/app/pages/plan/plan.component.ts

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

@ -217,6 +217,15 @@
<input nz-input #nodeName='ngModel' ngModel name="name" required/>
</nz-form-control>
</nz-form-item>
<nz-form-item *ngIf="addDisposalPop">
<nz-form-label [nzSpan]="6">选取模板</nz-form-label>
<nz-form-control>
<nz-select ngModel name="selectMould">
<nz-option nzValue="" nzLabel="无"></nz-option>
<nz-option [nzValue]="item.id" [nzLabel]="item.name" *ngFor="let item of allSandBoxTemplate"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</form>
</nz-modal>
<nz-modal [(nzVisible)]="editSelectDisposal" nzTitle="编辑预案名称" [nzOkDisabled]='name.invalid'>

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

@ -16,6 +16,7 @@ import { ServeManager } from 'src/app/babylon/controller/serve-manager';
import { ObjectsService } from 'src/app/service/objects.service';
import Viewer from 'viewerjs';
import { HttpClient } from '@angular/common/http';
import { MarkTemplate } from 'src/app/babylon/model/data/mark/mark-template-data';
@Component({
selector: 'app-left-domain',
@ -239,6 +240,7 @@ export class LeftDomainComponent implements OnInit {
}
allMarkPlanData: AllMarkPlanData; //处置预案节点数据
allSandBoxTemplate: MarkTemplate[] = []; //所有模板
selectPlanId: number;
selectNodeId: number;
addDisposalPop: boolean = false; //显示/隐藏 创建预案 弹窗
@ -247,8 +249,13 @@ export class LeftDomainComponent implements OnInit {
//创建预案/节点
addDisposal(e) {
if (this.addDisposalPop) { //创建预案
MarkWindow.instance.createMarkPlaneData(e.name)
this.addDisposalPop = false
if (e.selectMould) {
MarkWindow.instance.addMarkPlanByTemplate(e.selectMould)
this.addDisposalPop = false
} else {
MarkWindow.instance.createMarkPlaneData(e.name)
this.addDisposalPop = false
}
} else { //创建节点
MarkWindow.instance.createMarkNodeData(this.addNodePop, e.name)
this.addNodePop = null

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

@ -261,6 +261,7 @@ export class PlanComponent implements OnInit {
if (this.isShowChildComponent && this.leftDomain) {
if (type) { //创建预案
this.leftDomain.addDisposalPop = true
this.leftDomain.allSandBoxTemplate = MarkWindow.instance.allSandBoxTemplate
} else { //整体保存
this.leftDomain.saveDisposal()
}

Loading…
Cancel
Save