Browse Source

[修改]修改统计分析页面

非煤矿山灾害智能感知和预警系统
邵佳豪 2 years ago
parent
commit
53d55e172d
  1. 6
      src/app/home/home.module.ts
  2. 21
      src/app/home/statistic-analysis/home/home.component.html
  3. 34
      src/app/home/statistic-analysis/home/home.component.scss
  4. 775
      src/app/home/statistic-analysis/home/home.component.ts
  5. 8
      src/app/home/statistic-analysis/home/task-list/task-list.component.html
  6. 74
      src/app/home/statistic-analysis/home/task-list/task-list.component.ts
  7. 34
      src/app/home/statistic-analysis/home/unit-list/unit-list.component.html
  8. 0
      src/app/home/statistic-analysis/home/unit-list/unit-list.component.scss
  9. 25
      src/app/home/statistic-analysis/home/unit-list/unit-list.component.spec.ts
  10. 55
      src/app/home/statistic-analysis/home/unit-list/unit-list.component.ts
  11. 30
      src/app/home/task/station-task-execution/task-details/task-details.component.html
  12. 405
      src/app/home/task/station-task-execution/task-details/task-details.component.ts

6
src/app/home/home.module.ts

@ -80,7 +80,8 @@ import { CheckagainComponent } from './task/da-oneself-plan/checkagain/checkagai
import { TaskListComponent } from './statistic-analysis/home/task-list/task-list.component';
import { FormComponent } from './statistic-analysis/form/form.component';
import { ExamineComponent } from './statistic-analysis/form/examine/examine.component';
import { ReviewComponent } from './statistic-analysis/form/review/review.component';
import { ReviewComponent } from './statistic-analysis/form/review/review.component';
import { UnitListComponent } from './statistic-analysis/home/unit-list/unit-list.component';
@NgModule({
declarations: [
NavComponent,
@ -130,7 +131,8 @@ import { ReviewComponent } from './statistic-analysis/form/review/review.compone
TaskListComponent,
FormComponent,
ExamineComponent,
ReviewComponent
ReviewComponent,
UnitListComponent
],
imports: [
CommonModule,

21
src/app/home/statistic-analysis/home/home.component.html

@ -16,9 +16,12 @@
</div>
</div>
<!-- <div style="height: 18px;width: 100%;">
</div> -->
<div class="top1-1item flexcolumn">
<div class="title">
协助任务数量排名TOP5
申领任务数量排名TOP5
</div>
<div class="assistTaskRanking">
<div class="taskRankingItem" *ngFor="let item of assistTaskRankingData">
@ -42,7 +45,7 @@
<span [ngClass]="{'selectedtop1-2title': selectedLeft=='yinhuan'}" style="margin-left: 6px;"
(click)="echartsSetData_buhege('yinhuan')">隐患单位趋势图</span>
</div>
<div class="disqualificationUnit ">
<div class="disqualificationUnit disqualificationUnitEcharts">
<div class="searchbox">
<div class="searchitem1">
<div class="titleblue">
@ -68,9 +71,9 @@
<nz-spin nzSimple></nz-spin>
</div>
<div class="mapcardbox">
<div class="mapcarditem" *ngFor="let item of mapcard">
<div class="mapcarditem" *ngFor="let item of mapcard" (click)="clickCard(item)">
<div class="mapcarditemname">
<span class="mapcarditemname1">
<span class="mapcarditemname1" [title]="item.name">
{{item.name}}
</span>
<span class="mapcarditemname2">
@ -114,16 +117,6 @@
</div>
<div class="num">
<span>{{item.num}}%</span>
<!-- <ng-container *ngIf="item.type == 'up'; else elseTemplate">
<img src="../../../../assets/statistic-analysis/up.png" alt="">
</ng-container>
<ng-template #elseTemplate>
<img src="../../../../assets/statistic-analysis/down.png" alt="">
</ng-template>
<span class="numchange"
[ngClass]="{'numchangered': item.type == 'down','invariant': item.type == 'invariant','numchangegreen': item.type == 'up'}">
{{item.changeNum}}
</span> -->
</div>
</div>
</div>

34
src/app/home/statistic-analysis/home/home.component.scss

@ -211,17 +211,17 @@
flex: 2;
display: flex;
justify-content: space-between;
margin-bottom: 18px;
overflow: hidden;
.top1 {
flex: 1;
display: flex;
flex-direction: column;
overflow: hidden;
.top1-1 {
flex: 1;
margin-bottom: 18px;
height: 230px;
min-height: 205px;
display: flex;
position: relative;
@ -231,8 +231,15 @@
}
.top1-2 {
margin-top: 18px;
position: relative;
flex: 1.3;
flex: 1;
display: flex;
flex-direction: column;
.disqualificationUnitEcharts {
box-sizing: border-box;
}
.top1-2titlebox {
span {
@ -273,6 +280,7 @@
box-sizing: border-box;
padding: 16px;
display: flex;
cursor: pointer;
.mapcarditemname {
flex: 1;
@ -282,6 +290,11 @@
.mapcarditemname1 {
font-size: 16px;
max-width: 112px;
display: inline-block;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.mapcarditemname2 {
@ -363,6 +376,19 @@
}
.bottombox {
margin-top: 18px;
position: relative;
flex: 0.9;
}
// 适配125%
@media screen and (max-height: 750px) {
.topbox {
.top1 {
.top1-1 {
height: 180px;
}
}
}
}

775
src/app/home/statistic-analysis/home/home.component.ts

File diff suppressed because it is too large Load Diff

8
src/app/home/statistic-analysis/home/task-list/task-list.component.html

@ -1,14 +1,14 @@
<nz-table #basicTable [nzData]="listOfData" [nzShowPagination]="false" [nzLoading]="isloading">
<thead>
<tr>
<th>任务名称</th>
<th [nzWidth]="'10%'">任务名称</th>
<th>时间</th>
<th>单位名称</th>
<th>单位级别</th>
<th [nzWidth]="'10%'">单位级别</th>
<th>主负责人</th>
<th [nzWidth]="'25%'">协助机构/人员</th>
<th [nzWidth]="'20%'">协助机构/人员</th>
<th>检查结果</th>
<th>操作</th>
<th [nzWidth]="'8%'">操作</th>
</tr>
</thead>
<tbody>

74
src/app/home/statistic-analysis/home/task-list/task-list.component.ts

@ -7,62 +7,62 @@ import { NzModalRef } from 'ng-zorro-antd/modal';
@Component({
selector: 'app-task-list',
templateUrl: './task-list.component.html',
styleUrls: ['./task-list.component.scss']
styleUrls: ['./task-list.component.scss'],
})
export class TaskListComponent implements OnInit {
@Input() data?: any;
constructor(private router: Router, private http: HttpClient, private message: NzMessageService, private modalRef: NzModalRef) { }
@Input() type?: any;
constructor(private http: HttpClient, private message: NzMessageService) {}
ngOnInit(): void {
console.log(this.data)
this.getTaskList()
this.getTaskList();
}
listOfData: any = [];
isloading = false
totalCount
PageNumber = 1
PageSize = 10
isloading = false;
totalCount;
PageNumber = 1;
PageSize = 10;
getTaskList() {
this.isloading = true
this.isloading = true;
let params = {
// Month: selectedTime,
// OrganizationId: this.OrganizationId,
TaskTypes: ['熟悉演练'],
// TaskName: this.searchForm.taskname,
// CompanyName: this.searchForm.unitname,
AssistantOrganizationId: this.data.id,
approvalStatuses: ['待检查', '已检查'],
// TaskTypes: ['熟悉演练'],
OrganizationId: this.data.id,
// approvalStatuses: ['待检查', '已检查'],
PageNumber: this.PageNumber,
PageSize: this.PageSize
}
this.http.get('/api/PlanTasks', {
params: params
}).subscribe((data: any) => {
this.isloading = false
console.log('任务列表', data);
this.totalCount = data.totalCount
this.listOfData = [...data.items]
})
PageSize: this.PageSize,
PlanStartTime: '1999-01-01',
CreationTypes: this.type ? ['申领任务'] : null,
};
this.http
.get('/api/PlanTasks', {
params: params,
})
.subscribe((data: any) => {
this.isloading = false;
console.log('任务列表', data);
this.totalCount = data.totalCount;
this.listOfData = [...data.items];
});
}
pageChange($event) {
this.PageNumber = $event
this.getTaskList()
this.PageNumber = $event;
this.getTaskList();
}
look(item) {
console.log(item)
console.log(item);
if (item.approvalStatus == '待检查') {
this.message.create('warning', '该单位未检查');
return
return;
}
// this.modalRef.close()
// this.router.navigate(['/statistic/taskdetails'], { queryParams: { id: item.id, company: item.company.companyName, organization: item.organization.name, legalPersonName: item.company.legalPersonName ? item.company.legalPersonName : '' } })
window.open(`/statistic/taskdetails?id=${item.id}&company=${item.company.companyName}&organization=${item.organization.name}&legalPersonName=${item.company.legalPersonName ? item.company.legalPersonName : ''}`)
window.open(
`/statistic/taskdetails?id=${item.id}&company=${
item.company.companyName
}&organization=${item.organization.name}&legalPersonName=${
item.company.legalPersonName ? item.company.legalPersonName : ''
}`
);
}
}

34
src/app/home/statistic-analysis/home/unit-list/unit-list.component.html

@ -0,0 +1,34 @@
<nz-table #basicTable [nzData]="listOfData" [nzShowPagination]="false" [nzLoading]="isloading">
<thead>
<tr>
<th [nzWidth]="'10%'">单位名称</th>
<th>所属机构</th>
<th>单位类型</th>
<th [nzWidth]="'10%'">使用性质</th>
<th>单位级别</th>
<th [nzWidth]="'20%'">单位地址</th>
<th [nzWidth]="'8%'">操作</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let item of basicTable.data">
<td>{{ item.companyName }}</td>
<td>{{ item.organization.name }}</td>
<td>{{ item.buildingType?.buildingTypeName || ''}}</td>
<td>{{ item.useNature }}</td>
<td>{{item.companyLevel}}</td>
<td>
{{item.address}}
</td>
<td>
<span class="blue" (click)="look(item)">查看</span>
</td>
</tr>
</tbody>
</nz-table>
<div class="pagination">
<nz-pagination [nzHideOnSinglePage]="false" [nzPageIndex]="1" [nzTotal]="totalCount" [nzPageSize]="10"
[nzShowTotal]="totalTemplate" nzShowQuickJumper (nzPageIndexChange)="pageChange($event)">
</nz-pagination>
<ng-template #totalTemplate let-total> 10条/页,共{{totalCount}}条 </ng-template>
</div>

0
src/app/home/statistic-analysis/home/unit-list/unit-list.component.scss

25
src/app/home/statistic-analysis/home/unit-list/unit-list.component.spec.ts

@ -0,0 +1,25 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { UnitListComponent } from './unit-list.component';
describe('UnitListComponent', () => {
let component: UnitListComponent;
let fixture: ComponentFixture<UnitListComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ UnitListComponent ]
})
.compileComponents();
});
beforeEach(() => {
fixture = TestBed.createComponent(UnitListComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

55
src/app/home/statistic-analysis/home/unit-list/unit-list.component.ts

@ -0,0 +1,55 @@
import { HttpClient } from '@angular/common/http';
import { Component, Input, OnInit } from '@angular/core';
import { NzMessageService } from 'ng-zorro-antd/message';
@Component({
selector: 'app-unit-list',
templateUrl: './unit-list.component.html',
styleUrls: ['./unit-list.component.scss'],
})
export class UnitListComponent implements OnInit {
@Input() name?: any;
@Input() data?: any;
constructor(private http: HttpClient, private message: NzMessageService) {}
ngOnInit(): void {
if (this.data.length !== 0) {
this.getUnitList();
}
}
listOfData: any = [];
isloading = false;
totalCount;
PageNumber = 1;
PageSize = 10;
getUnitList() {
this.isloading = true;
let params = {
CompanyIds: this.data,
PageNumber: this.PageNumber,
PageSize: this.PageSize,
};
this.http
.get('/api/Companies', {
params: params,
})
.subscribe((data: any) => {
this.isloading = false;
console.log('单位列表', data);
this.totalCount = data.totalCount;
this.listOfData = [...data.items];
});
}
pageChange($event) {
this.PageNumber = $event;
this.getUnitList();
}
look(item) {
window.open(`/basicInfo/unit/details?id=${item.id}&pattern=look`);
}
}

30
src/app/home/task/station-task-execution/task-details/task-details.component.html

@ -58,7 +58,7 @@
style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.03pt; padding-right:5.03pt; vertical-align:top; width:130.95pt">
<p style="font-size:9pt; line-height:150%; margin:0pt; orphans:0; widows:0"><span
style="font-family:宋体; font-size:9pt">
{{taskAlldataOfcompany.address}}</span>
{{taskAlldataOfcompany?.address || ''}}</span>
</p>
</td>
<td colspan="2"
@ -69,7 +69,7 @@
<td
style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.03pt; padding-right:5.03pt; vertical-align:top; width:128.25pt">
<p style="font-size:10.5pt; line-height:150%; margin:0pt; orphans:0; widows:0"><span
style="font-family:宋体; font-size:10.5pt">{{taskAlldataOfcompany.datas.basicInfo.structure}}</span>
style="font-family:宋体; font-size:10.5pt">{{taskAlldataOfcompany?.datas.basicInfo.structure}}</span>
</p>
</td>
</tr>
@ -82,7 +82,7 @@
<td colspan="2"
style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.03pt; padding-right:5.03pt; vertical-align:top; width:130.95pt">
<p style="font-size:9pt; line-height:150%; margin:0pt; orphans:0; widows:0"><span
style="font-family:宋体; font-size:9pt">{{taskAlldataOfcompany.datas.basicInfo.height}}</span></p>
style="font-family:宋体; font-size:9pt">{{taskAlldataOfcompany?.datas.basicInfo.height}}</span></p>
</td>
<td colspan="2"
style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.03pt; padding-right:5.03pt; vertical-align:top; width:84.05pt">
@ -92,7 +92,7 @@
<td
style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.03pt; padding-right:5.03pt; vertical-align:top; width:128.25pt">
<p style="font-size:10.5pt; line-height:150%; margin:0pt; orphans:0; widows:0"><span
style="font-family:宋体; font-size:10.5pt">{{taskAlldataOfcompany.datas.basicInfo.layer}}</span></p>
style="font-family:宋体; font-size:10.5pt">{{taskAlldataOfcompany?.datas.basicInfo.layer}}</span></p>
</td>
</tr>
<tr style="height:21.25pt">
@ -104,7 +104,7 @@
<td colspan="2"
style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.03pt; padding-right:5.03pt; vertical-align:top; width:130.95pt">
<p style="font-size:9pt; line-height:150%; margin:0pt; orphans:0; widows:0"><span
style="font-family:宋体; font-size:9pt">{{taskAlldataOfcompany.directorName}}</span></p>
style="font-family:宋体; font-size:9pt">{{taskAlldataOfcompany?.directorName}}</span></p>
</td>
<td colspan="2"
style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.03pt; padding-right:5.03pt; vertical-align:top; width:84.05pt">
@ -114,7 +114,7 @@
<td
style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.03pt; padding-right:5.03pt; vertical-align:top; width:128.25pt">
<p style="font-size:10.5pt; line-height:150%; margin:0pt; orphans:0; widows:0"><span
style="font-family:宋体; font-size:10.5pt">{{taskAlldataOfcompany.directorPhone}}</span></p>
style="font-family:宋体; font-size:10.5pt">{{taskAlldataOfcompany?.directorPhone}}</span></p>
</td>
</tr>
<tr style="height:22.95pt">
@ -126,7 +126,7 @@
<td colspan="2"
style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.03pt; padding-right:5.03pt; vertical-align:top; width:130.95pt">
<p style="font-size:9pt; line-height:150%; margin:0pt; orphans:0; widows:0"><span
style="font-family:宋体; font-size:9pt">{{taskAlldataOfcompany.useNature}}</span></p>
style="font-family:宋体; font-size:9pt">{{taskAlldataOfcompany?.useNature}}</span></p>
</td>
<td colspan="2"
style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.03pt; padding-right:5.03pt; vertical-align:top; width:84.05pt">
@ -136,7 +136,7 @@
<td
style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.03pt; padding-right:5.03pt; vertical-align:top; width:128.25pt">
<p style="font-size:10.5pt; line-height:150%; margin:0pt; orphans:0; widows:0"><span
style="font-family:宋体; font-size:10.5pt">{{taskAlldataOfcompany.datas.facilities.controlPosition}}</span>
style="font-family:宋体; font-size:10.5pt">{{taskAlldataOfcompany?.datas.facilities.controlPosition}}</span>
</p>
</td>
</tr>
@ -149,7 +149,7 @@
<td colspan="5"
style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.03pt; padding-right:5.03pt; vertical-align:top; width:364.85pt">
<p style="font-size:9pt; line-height:150%; margin:0pt; orphans:0; widows:0"><span
style="font-family:宋体; font-size:9pt">{{taskAlldataOfcompany.datas.basicInfo.nature}}</span></p>
style="font-family:宋体; font-size:9pt">{{taskAlldataOfcompany?.datas.basicInfo.nature}}</span></p>
</td>
</tr>
<tr style="height:25.5pt">
@ -162,7 +162,7 @@
style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.03pt; padding-right:5.03pt; vertical-align:top; width:364.85pt">
<p style="font-size:9pt; line-height:150%; margin:0pt; orphans:0; widows:0">
<span style="font-family:宋体; font-size:9pt"
*ngFor="let item of taskAlldataOfcompany.zhuyaosheshi.data">
*ngFor="let item of taskAlldataOfcompany?.zhuyaosheshi.data">
{{item.check ? item.name : ''}}
</span>
</p>
@ -177,19 +177,19 @@
<td
style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.03pt; padding-right:5.03pt; vertical-align:top; width:111.05pt">
<p style="font-size:9pt; line-height:150%; margin:0pt; orphans:0; widows:0"><span
style="font-family:宋体; font-size:9pt">室内消火栓数量:{{taskAlldataOfcompany.datas.facilities.fireFightingFacilities.shineishuliang}}</span>
style="font-family:宋体; font-size:9pt">室内消火栓数量:{{taskAlldataOfcompany?.datas.facilities.fireFightingFacilities.shineishuliang}}</span>
</p>
</td>
<td colspan="3"
style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.03pt; padding-right:5.03pt; vertical-align:top; width:103.95pt">
<p style="font-size:9pt; line-height:150%; margin:0pt; orphans:0; widows:0"><span
style="font-family:宋体; font-size:9pt">室外消火栓数量:{{taskAlldataOfcompany.datas.facilities.fireFightingFacilities.shiwaishuliang}}</span>
style="font-family:宋体; font-size:9pt">室外消火栓数量:{{taskAlldataOfcompany?.datas.facilities.fireFightingFacilities.shiwaishuliang}}</span>
</p>
</td>
<td
style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.03pt; padding-right:5.03pt; vertical-align:top; width:128.25pt">
<p style="font-size:9pt; line-height:150%; margin:0pt; orphans:0; widows:0"><span
style="font-family:宋体; font-size:9pt">消防泵数量:{{taskAlldataOfcompany.datas.facilities.fireFightingFacilities.xiaofangshuanshuliang}}</span>
style="font-family:宋体; font-size:9pt">消防泵数量:{{taskAlldataOfcompany?.datas.facilities.fireFightingFacilities.xiaofangshuanshuliang}}</span>
</p>
</td>
</tr>
@ -1311,7 +1311,7 @@
style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; padding-left:5.4pt; padding-right:5.03pt; vertical-align:middle; width:130.4pt">
<p style="line-height:12pt; margin:0pt; orphans:0; text-align:center; widows:0">
<span style="font-family:'Times New Roman'; font-size:9pt">
{{taskAlldataOfcompany.datas.facilities.fireFightingFacilities.shiwaishuliang}}
{{taskAlldataOfcompany?.datas.facilities.fireFightingFacilities.shiwaishuliang}}
</span>
</p>
</td>
@ -1482,7 +1482,7 @@
style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.4pt; padding-right:5.03pt; vertical-align:middle; width:101.05pt">
<p style="margin:0pt; text-align:center">
<span style="font-family:'Times New Roman'; font-size:9pt">
{{taskAlldataOfcompany.datas.facilities.fireFightingFacilities.shineishuliang}}</span>
{{taskAlldataOfcompany?.datas.facilities.fireFightingFacilities.shineishuliang}}</span>
</p>
</td>
<td colspan="4"

405
src/app/home/task/station-task-execution/task-details/task-details.component.ts

@ -2,117 +2,129 @@ import { HttpClient } from '@angular/common/http';
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { MethodService } from 'src/app/service/method.service';
declare var $: any
declare var Print: any
declare var $: any;
declare var Print: any;
import Viewer from 'viewerjs';
@Component({
selector: 'app-task-details',
templateUrl: './task-details.component.html',
styleUrls: ['./task-details.component.scss']
styleUrls: ['./task-details.component.scss'],
})
export class TaskDetailsPagesComponent implements OnInit {
constructor(
public methodService: MethodService,
private route: ActivatedRoute,
private http: HttpClient
) {}
constructor(public methodService: MethodService, private route: ActivatedRoute, private http: HttpClient) { }
tabnum = 0
tabnum = 0;
/**
*
*/
exerciseData: any = {
data: {
people: "",
typeAndAmount: "",
time: "请选择时间",
people: '',
typeAndAmount: '',
time: '请选择时间',
add: '',
information: "",
situation: "",//消防设施使用情况
information: '',
situation: '', //消防设施使用情况
data: {
danger: '',
from: [
{
name: '侦查', form: {
name: '侦查',
form: {
// mode: '',
// people: '',
// add: '',
// marshalling: '',
// imgShow: ''
}
},
},
{
name: '警戒', form: {
name: '警戒',
form: {
// mode: '',
// people: '',
// add: '',
// jingshi: '',
// imgShow: ''
}
},
},
{
name: '供水', form: {
name: '供水',
form: {
// mode: '',
// people: '',
// gongshui: '',
// qushuidian: '',
// imgShow: ''
}
},
},
{
name: '搜救', form: {
name: '搜救',
form: {
// mode: '',
// people: '',
// add: '',
// jingshi: '',
// imgShow: ''
}
},
},
{
name: '排烟', form: {
name: '排烟',
form: {
// mode: '',
// people: '',
// add: '',
// paiyan: '',
// imgShow: ''
}
},
},
{
name: '灭火', form: {
name: '灭火',
form: {
// mode: '',
// people: '',
// add: '',
// jingshi: '',
// imgShow: ''
}
},
},
{
name: '照明', form: {
name: '照明',
form: {
// mode: '',
// people: '',
// zhaoming: '',
// imgShow: ''
}
},
},
{
name: '撤离', form: {
name: '撤离',
form: {
// cheliluxian: '',
// chelixinhao: '',
// imgShow: ''
}
},
},
{
name: '讲评', form: {
name: '讲评',
form: {
// jiangpingren: '',
// qingdian: '',
// haode: '',
// buzu: '',
// imgShow: ''
}
}
},
},
],
yanliantime: ''
yanliantime: '',
},
vehicleType: []
}
}
vehicleType: [],
},
};
/**
*
*/
@ -134,99 +146,96 @@ export class TaskDetailsPagesComponent implements OnInit {
dong: '',
xi: '',
nan: '',
bei: ''
bei: '',
},
luxian: '',
time: ''
time: '',
},
other: {
listdata: [{
name: '消防水源',
data: [
{ name: '消防水池数量', velue: '' },
{ name: '消防水池位置', velue: '' },
{ name: '总容量(平方米)', velue: '' },
{ name: '补给方式', velue: '' },
{ name: '室外其他水源', velue: '' },
{ name: '室外其他水源位置', velue: '' }
]
},
{
name: '消防栓泵',
data: [
{ name: '数量', velue: '' },
{ name: '扬程(m)', velue: '' },
{ name: '流量(L/S)', velue: '' },
{ name: '水泵接合器数量', velue: '' },
{ name: '水泵接合器位置', velue: '' }
]
},
{
name: '喷淋泵',
data: [
{ name: '数量', velue: '' },
{ name: '扬程(m)', velue: '' },
{ name: '流量(L/S)', velue: '' },
{ name: '水泵接合器数量', velue: '' },
{ name: '水泵接合器位置', velue: '' },
]
},
{
name: '消防电梯',
data: [
{ name: '数量', velue: '' },
{ name: '位置', velue: '' },
]
},
{
name: '疏散电梯',
data: [
{ name: '数量', velue: '' },
{ name: '位置', velue: '' },
]
},
{
name: '安全出口',
data: [
{ name: '数量', velue: '' },
{ name: '位置', velue: '' },
]
},
{
name: '标准层室内消火栓',
data: [
{ name: '数量', velue: '' },
{ name: '位置', velue: '' },
]
}
listdata: [
{
name: '消防水源',
data: [
{ name: '消防水池数量', velue: '' },
{ name: '消防水池位置', velue: '' },
{ name: '总容量(平方米)', velue: '' },
{ name: '补给方式', velue: '' },
{ name: '室外其他水源', velue: '' },
{ name: '室外其他水源位置', velue: '' },
],
},
{
name: '消防栓泵',
data: [
{ name: '数量', velue: '' },
{ name: '扬程(m)', velue: '' },
{ name: '流量(L/S)', velue: '' },
{ name: '水泵接合器数量', velue: '' },
{ name: '水泵接合器位置', velue: '' },
],
},
{
name: '喷淋泵',
data: [
{ name: '数量', velue: '' },
{ name: '扬程(m)', velue: '' },
{ name: '流量(L/S)', velue: '' },
{ name: '水泵接合器数量', velue: '' },
{ name: '水泵接合器位置', velue: '' },
],
},
{
name: '消防电梯',
data: [
{ name: '数量', velue: '' },
{ name: '位置', velue: '' },
],
},
{
name: '疏散电梯',
data: [
{ name: '数量', velue: '' },
{ name: '位置', velue: '' },
],
},
{
name: '安全出口',
data: [
{ name: '数量', velue: '' },
{ name: '位置', velue: '' },
],
},
{
name: '标准层室内消火栓',
data: [
{ name: '数量', velue: '' },
{ name: '位置', velue: '' },
],
},
],
radiodata: [
{
name: '自动报警系统',
isHave: null,
},
{
name: '自动喷水系统',
isHave: null,
},
{
name: '应急广播系统',
isHave: null,
},
{
name: '放排烟系统',
isHave: null,
},
],
radiodata: [{
name: '自动报警系统',
isHave: null
},
{
name: '自动喷水系统',
isHave: null
},
{
name: '应急广播系统',
isHave: null
},
{
name: '放排烟系统',
isHave: null
}
]
},
key: [
],
zhongdiantishi: ''
}
}
key: [],
zhongdiantishi: '',
},
};
/**
*
@ -234,87 +243,103 @@ export class TaskDetailsPagesComponent implements OnInit {
kongzhishi = {
data: {
addres: ''
}
}
addres: '',
},
};
/**
*
*/
shiwaixiaohuoshuan = {
data: {
addres: ''
}
}
kongzhishiweizhi = ''
shiwaixiaohuoshuanweizhi = ''
addres: '',
},
};
kongzhishiweizhi = '';
shiwaixiaohuoshuanweizhi = '';
company: string
organization: string
legalPersonName: string
checkTime: string
company: string;
organization: string;
legalPersonName: string;
checkTime: string;
taskAlldataOfcompany: any = {
address: '',
datas: {
basicInfo: {
},
basicInfo: {},
facilities: {
fireFightingFacilities: {
}
fireFightingFacilities: {},
},
},
zhuyaosheshi: {
}
}
taskAlldataOfform: any
zhuyaosheshi: {},
};
taskAlldataOfform: any;
ngOnInit(): void {
this.company = this.route.snapshot.queryParams.company
this.legalPersonName = this.route.snapshot.queryParams.legalPersonName
this.company = this.route.snapshot.queryParams.company;
this.legalPersonName = this.route.snapshot.queryParams.legalPersonName;
this.organization = JSON.parse(sessionStorage.getItem('userData')).organizationName
this.organization = JSON.parse(
sessionStorage.getItem('userData')
).organizationName;
let taskId = this.route.snapshot.queryParams.id
let taskId = this.route.snapshot.queryParams.id;
this.methodService.getTaskDetails(taskId).then((data: any) => {
this.checkTime = data.checkTime
let obj = JSON.parse(data.resultData)
this.checkTime = data.checkTime;
let obj = JSON.parse(data.resultData);
// if (!obj) {
// return
// }
console.log('所有数据', obj)
this.taskAlldataOfcompany = obj.company
this.taskAlldataOfform = obj.form
console.log('所有数据', obj);
this.taskAlldataOfcompany = obj.company;
this.taskAlldataOfform = obj.form;
let exerciseData = this.methodService.getTaskDetailsItem('实战演练', obj.form)
let exerciseData = this.methodService.getTaskDetailsItem(
'实战演练',
obj.form
);
if (exerciseData.data.data) {
this.exerciseData = this.methodService.getTaskDetailsItem('实战演练', obj.form)
this.exerciseData = this.methodService.getTaskDetailsItem(
'实战演练',
obj.form
);
}
// console.log('实战演练详情', this.exerciseData)
let planData = this.methodService.getTaskDetailsItem('数字化预案', obj.form)
if (JSON.stringify(planData.data) != "{}") {
if (JSON.stringify(planData.data.basicInfo) != "{}") {
this.planData.data.basicInfo = this.methodService.getTaskDetailsItem('数字化预案', obj.form).data.basicInfo
let planData = this.methodService.getTaskDetailsItem(
'数字化预案',
obj.form
);
if (JSON.stringify(planData.data) != '{}') {
if (JSON.stringify(planData.data.basicInfo) != '{}') {
this.planData.data.basicInfo = this.methodService.getTaskDetailsItem(
'数字化预案',
obj.form
).data.basicInfo;
}
if (JSON.stringify(planData.data.other) != "{}") {
this.planData.data.other = this.methodService.getTaskDetailsItem('数字化预案', obj.form).data.other
if (JSON.stringify(planData.data.other) != '{}') {
this.planData.data.other = this.methodService.getTaskDetailsItem(
'数字化预案',
obj.form
).data.other;
}
if (planData.data.key.lenth != 0) {
this.planData.data.key = this.methodService.getTaskDetailsItem('数字化预案', obj.form).data.key
this.planData.data.key = this.methodService.getTaskDetailsItem(
'数字化预案',
obj.form
).data.key;
}
if (planData.data.zhongdiantishi) {
this.planData.data.zhongdiantishi = this.methodService.getTaskDetailsItem('数字化预案', obj.form).data.zhongdiantishi
this.planData.data.zhongdiantishi =
this.methodService.getTaskDetailsItem(
'数字化预案',
obj.form
).data.zhongdiantishi;
}
}
console.log('数字化预案详情', this.planData)
this.kongzhishiweizhi = obj.company.datas.facilities.controlPosition
this.shiwaixiaohuoshuanweizhi = obj.company.datas.facilities.fireFightingFacilities.shiwaifenbu
console.log('数字化预案详情', this.planData);
this.kongzhishiweizhi =
obj.company?.datas.facilities.controlPosition || '';
this.shiwaixiaohuoshuanweizhi =
obj.company?.datas.facilities.fireFightingFacilities.shiwaifenbu || '';
// let kongzhishi = this.methodService.getTaskDetailsItem('消防控制室', obj.form)
// if (JSON.stringify(kongzhishi.data) != "{}") {
// this.kongzhishi = this.methodService.getTaskDetailsItem('消防控制室', obj.form)
@ -325,10 +350,9 @@ export class TaskDetailsPagesComponent implements OnInit {
// }
// console.log('消防控制室详情', this.kongzhishi)
// console.log('室外消火栓详情', this.shiwaixiaohuoshuan)
})
});
}
olddata: any
olddata: any;
getCompanies() {
// this.http.get('/api/Companies/' + this.id).subscribe((data: any) => {
// console.log('当前单位信息', data);
@ -337,45 +361,46 @@ export class TaskDetailsPagesComponent implements OnInit {
}
goback() {
window.history.back()
window.history.back();
}
download(type) {
type == 1 ? $("#tablebox").wordExport('演练卡') : $("#tablebox2").wordExport('数字化预案');
type == 1
? $('#tablebox').wordExport('演练卡')
: $('#tablebox2').wordExport('数字化预案');
}
isprintLoading = false
isprintLoading = false;
print() {
this.isprintLoading = true
this.isprintLoading = true;
Print('#tablebox3', {
onStart: () => {
console.log('onStart', this)
this.isprintLoading = false
console.log('onStart', this);
this.isprintLoading = false;
},
onEnd: () => {
console.log('onEnd', new Date())
this.isprintLoading = false
}
})
console.log('onEnd', new Date());
this.isprintLoading = false;
},
});
}
//查看图片
viewImg(url) {
let dom = document.getElementById(`viewerjs`)
let dom = document.getElementById(`viewerjs`);
let pObjs = dom.childNodes;
let node = document.createElement("img")
node.style.display = "none";
let node = document.createElement('img');
node.style.display = 'none';
node.src = url;
node.id = 'img'
dom.appendChild(node)
node.id = 'img';
dom.appendChild(node);
setTimeout(() => {
let viewer = new Viewer(document.getElementById(`viewerjs`), {
hidden: () => {
dom.removeChild(pObjs[0]);
viewer.destroy();
}
},
});
node.click();
}, 0);

Loading…
Cancel
Save