邵佳豪
2 years ago
8 changed files with 278 additions and 241 deletions
@ -1,73 +1,90 @@
|
||||
<div class="box"> |
||||
<form nz-form [formGroup]="validateForm"> |
||||
<nz-form-item> |
||||
<nz-form-label [nzSm]="7" [nzXs]="24" nzRequired nzFor="单位名称">单位名称</nz-form-label> |
||||
<form nz-form [formGroup]="validateForm"> |
||||
<nz-form-item> |
||||
<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-input-group> |
||||
<input nz-input type="text" formControlName="unit" placeholder="请输入单位名称" /> |
||||
<input nz-input type="text" formControlName="addr" 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="name" 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="iphone" 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-input-group> |
||||
<input nz-input type="text" formControlName="addr" placeholder="请输入单位地址" /> |
||||
</nz-input-group> |
||||
</nz-form-control> |
||||
</nz-form-control> |
||||
</nz-form-item> |
||||
<nz-form-item> |
||||
<nz-form-label nzRequired [nzSm]="7" [nzXs]="24" nzFor="所属救援站">所属救援站</nz-form-label> |
||||
<nz-form-control> |
||||
<nz-select formControlName="role" nzPlaceHolder="请选择所属救援站"> |
||||
<nz-option *ngFor="let item of jiuyuanzhan" [nzValue]="item.id" [nzLabel]="item.name"> |
||||
</nz-option> |
||||
</nz-select> |
||||
</nz-form-control> |
||||
</nz-form-item> |
||||
<nz-form-item > |
||||
<nz-form-label [nzSm]="7" [nzXs]="24" nzFor="所属大队">所属大队</nz-form-label> |
||||
<nz-form-control> |
||||
<nz-select formControlName="role2" nzPlaceHolder="请选择所属大队" > |
||||
<nz-option *ngFor="let item of dadui" [nzValue]="item.id" [nzLabel]="item.name"> |
||||
</nz-option> |
||||
</nz-select> |
||||
</nz-form-control> |
||||
</nz-form-item> |
||||
<nz-form-item> |
||||
<nz-form-label nzRequired [nzSm]="7" [nzXs]="24" nzFor="使用性质">使用性质</nz-form-label> |
||||
<nz-form-control> |
||||
<nz-input-group> |
||||
<input nz-input type="text" formControlName="nature" 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-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> |
||||
</nz-form-control> |
||||
</nz-form-item> |
||||
<nz-form-item> |
||||
<nz-form-label nzRequired [nzSm]="7" [nzXs]="24" nzFor="所属救援站">所属救援站</nz-form-label> |
||||
<nz-form-control> |
||||
<nz-tree-select [nzNodes]="nodes" nzShowSearch nzPlaceHolder="所属机构" formControlName="orStation" |
||||
[nzExpandedIcon]="multiExpandedIconTpl" [nzDropdownClassName]="'maxHeightTreeSelect'" [nzAllowClear]="false"> |
||||
</nz-tree-select> |
||||
<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-control> |
||||
</nz-form-item> |
||||
<nz-form-item> |
||||
<nz-form-label [nzSm]="7" [nzXs]="24" nzFor="所属大队">所属大队</nz-form-label> |
||||
<nz-form-control> |
||||
<nz-tree-select [nzNodes]="nodes" nzShowSearch nzPlaceHolder="所属机构" formControlName="orDa" |
||||
[nzExpandedIcon]="multiExpandedIconTpl" [nzDropdownClassName]="'maxHeightTreeSelect'" [nzAllowClear]="false"> |
||||
</nz-tree-select> |
||||
<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-control> |
||||
</nz-form-item> |
||||
<nz-form-item> |
||||
<nz-form-label nzRequired [nzSm]="7" [nzXs]="24" nzFor="使用性质">使用性质</nz-form-label> |
||||
<nz-form-control> |
||||
<nz-select formControlName="nature" nzAllowClear nzPlaceHolder="请选择使用性质"> |
||||
<nz-option nzValue="一般单位" nzLabel="一般单位"></nz-option> |
||||
<nz-option nzValue="重点单位" nzLabel="重点单位"></nz-option> |
||||
</nz-select> |
||||
</nz-form-control> |
||||
</nz-form-item> |
||||
<nz-form-item> |
||||
<nz-form-label [nzSm]="7" [nzXs]="24" nzFor="单位类型">单位类型</nz-form-label> |
||||
<nz-form-control> |
||||
<nz-select formControlName="unittype" nzPlaceHolder="请选择单位类型"> |
||||
<nz-option *ngFor="let item of BuildingTypes" [nzValue]="item.id" [nzLabel]="item.buildingTypeName"> |
||||
</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