|
|
|
<div class="box">
|
|
|
|
<form nz-form [formGroup]="validateForm">
|
|
|
|
<nz-form-item>
|
|
|
|
<nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="名称">名称</nz-form-label>
|
|
|
|
<nz-form-control nzErrorTip="请输入名称">
|
|
|
|
<nz-input-group>
|
|
|
|
<input nz-input type="text" formControlName="name" placeholder="请输入名称" />
|
|
|
|
</nz-input-group>
|
|
|
|
</nz-form-control>
|
|
|
|
</nz-form-item>
|
|
|
|
<nz-form-item>
|
|
|
|
<nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="权限">权限</nz-form-label>
|
|
|
|
<nz-form-control>
|
|
|
|
<nz-select formControlName="power" nzPlaceHolder="请选择权限" nzMode="multiple">
|
|
|
|
<nz-option *ngFor="let o of optionList" [nzValue]="o" [nzLabel]="o.displayName"></nz-option>
|
|
|
|
</nz-select>
|
|
|
|
<ng-template #renderTemplate>
|
|
|
|
<nz-spin *ngIf="isLoading"></nz-spin>
|
|
|
|
</ng-template>
|
|
|
|
</nz-form-control>
|
|
|
|
</nz-form-item>
|
|
|
|
<nz-form-item>
|
|
|
|
<nz-form-label [nzSm]="6" [nzXs]="24" nzFor="菜单">菜单</nz-form-label>
|
|
|
|
<nz-form-control>
|
|
|
|
<nz-tree-select [nzDropdownClassName]="'maxHeightTreeSelect'" [nzCheckStrictly]="true" #nzTreeComponent formControlName="menus" [nzNodes]="nodes" nzShowSearch nzCheckable nzPlaceHolder="请选择菜单"
|
|
|
|
[nzExpandedIcon]="multiExpandedIconTpl">
|
|
|
|
</nz-tree-select>
|
|
|
|
</nz-form-control>
|
|
|
|
<ng-template #multiExpandedIconTpl let-node let-origin="origin">
|
|
|
|
<ng-container *ngIf="node.children.length == 0; else elseTemplate">
|
|
|
|
</ng-container>
|
|
|
|
<ng-template #elseTemplate>
|
|
|
|
<i nz-icon [nzType]="node.isExpanded ? 'caret-down' : 'caret-right'"
|
|
|
|
class="ant-tree-switcher-line-icon"></i>
|
|
|
|
</ng-template>
|
|
|
|
</ng-template>
|
|
|
|
</nz-form-item>
|
|
|
|
</form>
|
|
|
|
</div>
|