<div mat-dialog-title>编辑建筑</div>
<div>
    <form (ngSubmit)="onSubmit(form.value)" #form="ngForm" class="example-container" style="font-size: 16px;">
        <div mat-dialog-content>
            <mat-form-field>
                <input type="text" matInput [(ngModel)]="defaultName" required name="propertyName" placeholder="建筑名称" autocomplete="off">
            </mat-form-field>
        </div>
        <div mat-dialog-content>
            <mat-form-field>
                <mat-select required [(ngModel)]="defaultBuildingType" name="buildingId" placeholder="建筑类型">
                    <mat-option *ngFor="let item of allBuildingType" [value]="item.id">
                        {{item.name}}
                    </mat-option>
                </mat-select>
            </mat-form-field>
        </div>  
        <div mat-dialog-actions>
            <button mat-raised-button color="primary" type="submit" [disabled]="!form.form.valid">确定</button>
            <button mat-raised-button mat-dialog-close>取消</button>
        </div>
    </form>
</div>