8 changed files with 278 additions and 241 deletions
@ -1,73 +1,90 @@ |
|||||||
<div class="box"> |
<div class="box"> |
||||||
<form nz-form [formGroup]="validateForm"> |
<form nz-form [formGroup]="validateForm"> |
||||||
<nz-form-item> |
<nz-form-item> |
||||||
<nz-form-label [nzSm]="7" [nzXs]="24" nzRequired nzFor="单位名称">单位名称</nz-form-label> |
<nz-form-label [nzSm]="7" [nzXs]="24" nzRequired nzFor="单位名称">单位名称</nz-form-label> |
||||||
|
<nz-form-control> |
||||||
|
<nz-input-group> |
||||||
|
<input nz-input type="text" formControlName="unitname" placeholder="请输入单位名称" /> |
||||||
|
</nz-input-group> |
||||||
|
</nz-form-control> |
||||||
|
</nz-form-item> |
||||||
|
<nz-form-item> |
||||||
|
<nz-form-label [nzSm]="7" [nzXs]="24" nzFor="消防安全责任人">消防安全责任人</nz-form-label> |
||||||
|
<nz-form-control> |
||||||
|
<nz-input-group> |
||||||
|
<input nz-input type="text" formControlName="person" placeholder="请输入消防安全责任人" /> |
||||||
|
</nz-input-group> |
||||||
|
</nz-form-control> |
||||||
|
</nz-form-item> |
||||||
|
<nz-form-item> |
||||||
|
<nz-form-label [nzSm]="7" [nzXs]="24" nzFor="联系方式">联系方式</nz-form-label> |
||||||
|
<nz-form-control> |
||||||
|
<nz-input-group> |
||||||
|
<input nz-input type="text" formControlName="phone" placeholder="请输入联系方式" /> |
||||||
|
</nz-input-group> |
||||||
|
</nz-form-control> |
||||||
|
</nz-form-item> |
||||||
|
<nz-form-item> |
||||||
|
<nz-form-label [nzSm]="7" [nzXs]="24" nzFor="单位地址">单位地址</nz-form-label> |
||||||
|
<nz-form-control> |
||||||
<nz-form-control> |
<nz-form-control> |
||||||
<nz-input-group> |
<nz-input-group> |
||||||
<input nz-input type="text" formControlName="unit" placeholder="请输入单位名称" /> |
<input nz-input type="text" formControlName="addr" placeholder="请输入单位地址" /> |
||||||
</nz-input-group> |
</nz-input-group> |
||||||
</nz-form-control> |
</nz-form-control> |
||||||
</nz-form-item> |
</nz-form-control> |
||||||
<nz-form-item> |
</nz-form-item> |
||||||
<nz-form-label [nzSm]="7" [nzXs]="24" nzFor="消防安全责任人">消防安全责任人</nz-form-label> |
<nz-form-item> |
||||||
<nz-form-control> |
<nz-form-label nzRequired [nzSm]="7" [nzXs]="24" nzFor="所属救援站">所属救援站</nz-form-label> |
||||||
<nz-input-group> |
<nz-form-control> |
||||||
<input nz-input type="text" formControlName="name" placeholder="请输入消防安全责任人" /> |
<nz-tree-select [nzNodes]="nodes" nzShowSearch nzPlaceHolder="所属机构" formControlName="orStation" |
||||||
</nz-input-group> |
[nzExpandedIcon]="multiExpandedIconTpl" [nzDropdownClassName]="'maxHeightTreeSelect'" [nzAllowClear]="false"> |
||||||
</nz-form-control> |
</nz-tree-select> |
||||||
</nz-form-item> |
<ng-template #multiExpandedIconTpl let-node let-origin="origin"> |
||||||
<nz-form-item> |
<ng-container *ngIf="node.children.length == 0; else elseTemplate"> |
||||||
<nz-form-label [nzSm]="7" [nzXs]="24" nzFor="联系方式">联系方式</nz-form-label> |
|
||||||
<nz-form-control> |
</ng-container> |
||||||
<nz-input-group> |
<ng-template #elseTemplate> |
||||||
<input nz-input type="text" formControlName="iphone" placeholder="请输入联系方式" /> |
<i nz-icon [nzType]="node.isExpanded ? 'caret-down' : 'caret-right'" |
||||||
</nz-input-group> |
class="ant-tree-switcher-line-icon"></i> |
||||||
</nz-form-control> |
</ng-template> |
||||||
</nz-form-item> |
</ng-template> |
||||||
<nz-form-item> |
</nz-form-control> |
||||||
<nz-form-label [nzSm]="7" [nzXs]="24" nzFor="单位地址">单位地址</nz-form-label> |
</nz-form-item> |
||||||
<nz-form-control> |
<nz-form-item> |
||||||
<nz-form-control> |
<nz-form-label [nzSm]="7" [nzXs]="24" nzFor="所属大队">所属大队</nz-form-label> |
||||||
<nz-input-group> |
<nz-form-control> |
||||||
<input nz-input type="text" formControlName="addr" placeholder="请输入单位地址" /> |
<nz-tree-select [nzNodes]="nodes" nzShowSearch nzPlaceHolder="所属机构" formControlName="orDa" |
||||||
</nz-input-group> |
[nzExpandedIcon]="multiExpandedIconTpl" [nzDropdownClassName]="'maxHeightTreeSelect'" [nzAllowClear]="false"> |
||||||
</nz-form-control> |
</nz-tree-select> |
||||||
</nz-form-control> |
<ng-template #multiExpandedIconTpl let-node let-origin="origin"> |
||||||
</nz-form-item> |
<ng-container *ngIf="node.children.length == 0; else elseTemplate"> |
||||||
<nz-form-item> |
|
||||||
<nz-form-label nzRequired [nzSm]="7" [nzXs]="24" nzFor="所属救援站">所属救援站</nz-form-label> |
</ng-container> |
||||||
<nz-form-control> |
<ng-template #elseTemplate> |
||||||
<nz-select formControlName="role" nzPlaceHolder="请选择所属救援站"> |
<i nz-icon [nzType]="node.isExpanded ? 'caret-down' : 'caret-right'" |
||||||
<nz-option *ngFor="let item of jiuyuanzhan" [nzValue]="item.id" [nzLabel]="item.name"> |
class="ant-tree-switcher-line-icon"></i> |
||||||
</nz-option> |
</ng-template> |
||||||
</nz-select> |
</ng-template> |
||||||
</nz-form-control> |
</nz-form-control> |
||||||
</nz-form-item> |
</nz-form-item> |
||||||
<nz-form-item > |
<nz-form-item> |
||||||
<nz-form-label [nzSm]="7" [nzXs]="24" nzFor="所属大队">所属大队</nz-form-label> |
<nz-form-label nzRequired [nzSm]="7" [nzXs]="24" nzFor="使用性质">使用性质</nz-form-label> |
||||||
<nz-form-control> |
<nz-form-control> |
||||||
<nz-select formControlName="role2" nzPlaceHolder="请选择所属大队" > |
<nz-select formControlName="nature" nzAllowClear nzPlaceHolder="请选择使用性质"> |
||||||
<nz-option *ngFor="let item of dadui" [nzValue]="item.id" [nzLabel]="item.name"> |
<nz-option nzValue="一般单位" nzLabel="一般单位"></nz-option> |
||||||
</nz-option> |
<nz-option nzValue="重点单位" nzLabel="重点单位"></nz-option> |
||||||
</nz-select> |
</nz-select> |
||||||
</nz-form-control> |
</nz-form-control> |
||||||
</nz-form-item> |
</nz-form-item> |
||||||
<nz-form-item> |
<nz-form-item> |
||||||
<nz-form-label nzRequired [nzSm]="7" [nzXs]="24" nzFor="使用性质">使用性质</nz-form-label> |
<nz-form-label [nzSm]="7" [nzXs]="24" nzFor="单位类型">单位类型</nz-form-label> |
||||||
<nz-form-control> |
<nz-form-control> |
||||||
<nz-input-group> |
<nz-select formControlName="unittype" nzPlaceHolder="请选择单位类型"> |
||||||
<input nz-input type="text" formControlName="nature" placeholder="请输入使用性质" /> |
<nz-option *ngFor="let item of BuildingTypes" [nzValue]="item.id" [nzLabel]="item.buildingTypeName"> |
||||||
</nz-input-group> |
</nz-option> |
||||||
</nz-form-control> |
</nz-select> |
||||||
</nz-form-item> |
</nz-form-control> |
||||||
<nz-form-item> |
</nz-form-item> |
||||||
<nz-form-label [nzSm]="7" [nzXs]="24" nzFor="建筑类型">建筑类型</nz-form-label> |
</form> |
||||||
<nz-form-control> |
</div> |
||||||
<nz-select formControlName="role4" nzPlaceHolder="请选择建筑类型"> |
|
||||||
<nz-option *ngFor="let item of listOfData2" [nzValue]="item.id" [nzLabel]="item.name"> |
|
||||||
</nz-option> |
|
||||||
</nz-select> |
|
||||||
</nz-form-control> |
|
||||||
</nz-form-item> |
|
||||||
</form> |
|
||||||
</div> |
|
@ -1,25 +0,0 @@ |
|||||||
import { ComponentFixture, TestBed } from '@angular/core/testing'; |
|
||||||
|
|
||||||
import { AddUnitComponent } from './add-unit.component'; |
|
||||||
|
|
||||||
describe('AddUnitComponent', () => { |
|
||||||
let component: AddUnitComponent; |
|
||||||
let fixture: ComponentFixture<AddUnitComponent>; |
|
||||||
|
|
||||||
beforeEach(async () => { |
|
||||||
await TestBed.configureTestingModule({ |
|
||||||
declarations: [ AddUnitComponent ] |
|
||||||
}) |
|
||||||
.compileComponents(); |
|
||||||
}); |
|
||||||
|
|
||||||
beforeEach(() => { |
|
||||||
fixture = TestBed.createComponent(AddUnitComponent); |
|
||||||
component = fixture.componentInstance; |
|
||||||
fixture.detectChanges(); |
|
||||||
}); |
|
||||||
|
|
||||||
it('should create', () => { |
|
||||||
expect(component).toBeTruthy(); |
|
||||||
}); |
|
||||||
}); |
|
Loading…
Reference in new issue