<!--添加资源-->
<nz-modal [nzWidth]="780" [(nzVisible)]="isValiaible" [nzTitle]="title"
          (nzOnCancel)="handleEditCancel()" (nzOnOk)="handEditleOk()">
  <div nz-form class="ant-advanced-search-form form-select">

    <nz-form-item>
      <nz-form-label [nzSpan]="4" nzRequired nzFor="host1">选择设备</nz-form-label>
      <nz-form-control [nzSpan]="14">
        <div class="tree-div" style="height: 300px">
          <nz-tree #nzTree
                   [(ngModel)]="nodes"
                   [nzAsyncData]="true"
                   [nzCheckStrictly]="true"
                   (nzClick)="mouseAction('expand',$event)"
                   (nzExpandChange)="mouseAction('expand',$event)" >
            <ng-template #nzTreeTemplate let-node>
                <span class="custom-node" draggable="true" aria-grabbed="true" [class.active]="node.isSelected">
                    <label *ngIf="node.level == 0"> {{node.title}}</label>
                    <label nz-radio [ngModel]="true" [nzDisabled]="node.origin.disabled" (click)="selectTreeItem($event,node)" *ngIf="node.level == 1 && selectItem == node.origin.id" > {{node.title}}</label>
                    <label nz-radio [ngModel]="false" [nzDisabled]="node.origin.disabled" (click)="selectTreeItem($event,node)" *ngIf="node.level == 1 && selectItem != node.origin.id" > {{node.title}}</label>
                </span>
            </ng-template>

          </nz-tree>
        </div>
      </nz-form-control>
    </nz-form-item>
  </div>
</nz-modal>
