Browse Source

[完善] 消防设施统计完善

zhuzhou
陈鹏飞 4 years ago
parent
commit
6d9c3ccc3b
  1. 1
      src/app/key-unit/basicinfo-look/basicinfo.component.html
  2. 9
      src/app/key-unit/basicinfo-look/basicinfo.component.ts
  3. 1
      src/app/key-unit/basicinfo/basicinfo.component.html
  4. 30
      src/app/key-unit/basicinfo/basicinfo.component.ts
  5. 4
      src/app/key-unit/basicinfo/statisticsOfFireFightingFacilities.html
  6. 4
      src/app/key-unit/key-unit.module.ts

1
src/app/key-unit/basicinfo-look/basicinfo.component.html

@ -6,6 +6,7 @@
<mat-panel-title>
单位信息
</mat-panel-title>
<button type="button" color="primary" mat-button mat-raised-button style="height: 35px; margin-right: 25px;" (click)="seeFirfightingDevice($event)">查看消防设施统计</button>
</mat-expansion-panel-header>
<div class="topbox">
<form (ngSubmit)="onSubmit(form.value,form.invalid,form)" #form="ngForm" class="example-container">

9
src/app/key-unit/basicinfo-look/basicinfo.component.ts

@ -18,6 +18,7 @@ import * as _ from 'lodash';
import Swiper from 'swiper';
import { LookMaster2 } from './lookmaster.component'
import { ActivatedRoute } from '@angular/router';
import { StatisticsOfFireFightingFacilities } from '../basicinfo/basicinfo.component';
declare var AMap: any;
@Component({
@ -26,6 +27,14 @@ declare var AMap: any;
styleUrls: ['./basicinfo.component.scss']
})
export class BasicinfoLookComponent implements OnInit {
//查看消防设施统计
seeFirfightingDevice (e) {
e.stopPropagation()
let dialogRef = this.dialog.open(StatisticsOfFireFightingFacilities);
dialogRef.afterClosed().subscribe();
}
unitinfo:any={
id: '',
name: '', //单位信息名字

1
src/app/key-unit/basicinfo/basicinfo.component.html

@ -6,6 +6,7 @@
<mat-panel-title>
单位信息
</mat-panel-title>
<button type="button" color="primary" mat-button mat-raised-button style="height: 35px; margin-right: 25px;" (click)="seeFirfightingDevice($event)">查看消防设施统计</button>
</mat-expansion-panel-header>
<div class="topbox">
<form (ngSubmit)="onSubmit(form.value,form.invalid,form)" #form="ngForm" class="example-container">

30
src/app/key-unit/basicinfo/basicinfo.component.ts

@ -28,6 +28,14 @@ declare var AMap: any;
styleUrls: ['./basicinfo.component.scss']
})
export class BasicinfoComponent implements OnInit {
//查看消防设施统计
seeFirfightingDevice (e) {
e.stopPropagation()
let dialogRef = this.dialog.open(StatisticsOfFireFightingFacilities);
dialogRef.afterClosed().subscribe();
}
unitinfo:any={
id: '',
name: '', //单位信息名字
@ -1155,3 +1163,25 @@ export class BasicinfoComponent implements OnInit {
})
}
}
//消防设施统计
@Component({
selector: 'app-StatisticsOfFireFightingFacilities',
templateUrl: './statisticsOfFireFightingFacilities.html',
styleUrls: ['./basicinfo.component.scss']
})
export class StatisticsOfFireFightingFacilities implements OnInit {
constructor(private http: HttpClient, public dialog: MatDialog,public snackBar: MatSnackBar) { }
ngOnInit(): void {
let params = { companyId: sessionStorage.getItem('companyId'),buildingType: sessionStorage.getItem('buildingTypeId') }
this.http.get(`/api/CompanyFacilities/GetAllFacilities`,{params}).subscribe(data=>{
Object.keys(data).forEach(key => { this.allFireList.push(`${key} ${data[key]}`) })
})
}
allFireList = []
}

4
src/app/key-unit/basicinfo/statisticsOfFireFightingFacilities.html

@ -0,0 +1,4 @@
<div mat-dialog-title>消防设施统计</div>
<div>
<p style="margin: 5px 0; font-size: 14px;" *ngFor="let item of allFireList">{{item}}</p>
</div>

4
src/app/key-unit/key-unit.module.ts

@ -48,7 +48,7 @@ import { ViewUnitDetailsComponent } from './view-unit-details/view-unit-details.
import { ReactiveFormsModule, FormsModule } from '@angular/forms';
import { AddHouseInfo } from './basicinfo/addhouseinfo.component';
import { LookMaster } from './basicinfo/lookmaster.component';
import { BasicinfoComponent } from './basicinfo/basicinfo.component';
import { BasicinfoComponent, StatisticsOfFireFightingFacilities } from './basicinfo/basicinfo.component';
import { EditPlanInfoComponent } from './edit-plan-info/edit-plan-info.component';
import { CountdownModule } from 'ngx-countdown';
import { BasicinfoLookComponent } from './basicinfo-look/basicinfo.component';
@ -88,7 +88,7 @@ import { upname } from './key-unit-management/key-unit-management.component';
import { companyAuditResult } from './key-unit-management/key-unit-management.component'
@NgModule({
declarations: [KeyUnitManagementComponent, EditUnitInfoComponent, ViewUnitDetailsComponent,CreateUnit,BasicinfoComponent,LookMaster,AddHouseInfo, EditPlanInfoComponent,BasicinfoLookComponent, ViewUnitDetailsPlanComponent,FunctionDivisionComponent,addPartition,addPartitionAttribute,AllaroundComponent,ImgDetails,RealisticPictureComponent,previewImg,addRealPicture,editRealPicture,KeySiteComponent,KeyImgDetail,KeySiteImgs,UploadingCADComponent,readFile,editFile,KeySiteLookComponent,KeySiteImgs2,FunctionDivisionLookComponent,RealisticPictureLookComponent,previewImg3,UploadingCADLookComponent,FireFightingDeviceComponent,ImagesData,previewBigImg,ImgsDataDetail,FireFightingDeviceLookComponent,ImagesData2,ImgsDataDetail2,previewBigImg2,LookMaster2,addPartitionAttribute2, SixFamiliarityComponent, ActualCombatDrillComponent,routerMapComponent, SixFamiliarListComponent,TrainingRecordinfoComponent,RouterGISComponent,WaterRoadComponent,PhotoofthesceneComponent,KnowRouteComponent,FindProblemComponent,upname,companyAuditResult],
declarations: [KeyUnitManagementComponent, EditUnitInfoComponent, ViewUnitDetailsComponent,CreateUnit,BasicinfoComponent,LookMaster,AddHouseInfo, EditPlanInfoComponent,BasicinfoLookComponent, ViewUnitDetailsPlanComponent,FunctionDivisionComponent,addPartition,addPartitionAttribute,AllaroundComponent,ImgDetails,RealisticPictureComponent,previewImg,addRealPicture,editRealPicture,KeySiteComponent,KeyImgDetail,KeySiteImgs,UploadingCADComponent,readFile,editFile,KeySiteLookComponent,KeySiteImgs2,FunctionDivisionLookComponent,RealisticPictureLookComponent,previewImg3,UploadingCADLookComponent,FireFightingDeviceComponent,ImagesData,previewBigImg,ImgsDataDetail,FireFightingDeviceLookComponent,ImagesData2,ImgsDataDetail2,previewBigImg2,LookMaster2,addPartitionAttribute2, SixFamiliarityComponent, ActualCombatDrillComponent,routerMapComponent, SixFamiliarListComponent,TrainingRecordinfoComponent,RouterGISComponent,WaterRoadComponent,PhotoofthesceneComponent,KnowRouteComponent,FindProblemComponent,upname,companyAuditResult,StatisticsOfFireFightingFacilities],
exports:[ViewUnitDetailsPlanComponent],
imports: [
CommonModule,

Loading…
Cancel
Save