Browse Source

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

非煤矿山灾害智能感知和预警系统
邵佳豪 2 years ago
parent
commit
53d55e172d
  1. 4
      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. 773
      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

4
src/app/home/home.module.ts

@ -81,6 +81,7 @@ import { TaskListComponent } from './statistic-analysis/home/task-list/task-list
import { FormComponent } from './statistic-analysis/form/form.component'; import { FormComponent } from './statistic-analysis/form/form.component';
import { ExamineComponent } from './statistic-analysis/form/examine/examine.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({ @NgModule({
declarations: [ declarations: [
NavComponent, NavComponent,
@ -130,7 +131,8 @@ import { ReviewComponent } from './statistic-analysis/form/review/review.compone
TaskListComponent, TaskListComponent,
FormComponent, FormComponent,
ExamineComponent, ExamineComponent,
ReviewComponent ReviewComponent,
UnitListComponent
], ],
imports: [ imports: [
CommonModule, CommonModule,

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

@ -16,9 +16,12 @@
</div> </div>
</div> </div>
<!-- <div style="height: 18px;width: 100%;">
</div> -->
<div class="top1-1item flexcolumn"> <div class="top1-1item flexcolumn">
<div class="title"> <div class="title">
协助任务数量排名TOP5 申领任务数量排名TOP5
</div> </div>
<div class="assistTaskRanking"> <div class="assistTaskRanking">
<div class="taskRankingItem" *ngFor="let item of assistTaskRankingData"> <div class="taskRankingItem" *ngFor="let item of assistTaskRankingData">
@ -42,7 +45,7 @@
<span [ngClass]="{'selectedtop1-2title': selectedLeft=='yinhuan'}" style="margin-left: 6px;" <span [ngClass]="{'selectedtop1-2title': selectedLeft=='yinhuan'}" style="margin-left: 6px;"
(click)="echartsSetData_buhege('yinhuan')">隐患单位趋势图</span> (click)="echartsSetData_buhege('yinhuan')">隐患单位趋势图</span>
</div> </div>
<div class="disqualificationUnit "> <div class="disqualificationUnit disqualificationUnitEcharts">
<div class="searchbox"> <div class="searchbox">
<div class="searchitem1"> <div class="searchitem1">
<div class="titleblue"> <div class="titleblue">
@ -68,9 +71,9 @@
<nz-spin nzSimple></nz-spin> <nz-spin nzSimple></nz-spin>
</div> </div>
<div class="mapcardbox"> <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"> <div class="mapcarditemname">
<span class="mapcarditemname1"> <span class="mapcarditemname1" [title]="item.name">
{{item.name}} {{item.name}}
</span> </span>
<span class="mapcarditemname2"> <span class="mapcarditemname2">
@ -114,16 +117,6 @@
</div> </div>
<div class="num"> <div class="num">
<span>{{item.num}}%</span> <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> </div>
</div> </div>

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

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

773
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"> <nz-table #basicTable [nzData]="listOfData" [nzShowPagination]="false" [nzLoading]="isloading">
<thead> <thead>
<tr> <tr>
<th>任务名称</th> <th [nzWidth]="'10%'">任务名称</th>
<th>时间</th> <th>时间</th>
<th>单位名称</th> <th>单位名称</th>
<th>单位级别</th> <th [nzWidth]="'10%'">单位级别</th>
<th>主负责人</th> <th>主负责人</th>
<th [nzWidth]="'25%'">协助机构/人员</th> <th [nzWidth]="'20%'">协助机构/人员</th>
<th>检查结果</th> <th>检查结果</th>
<th>操作</th> <th [nzWidth]="'8%'">操作</th>
</tr> </tr>
</thead> </thead>
<tbody> <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({ @Component({
selector: 'app-task-list', selector: 'app-task-list',
templateUrl: './task-list.component.html', templateUrl: './task-list.component.html',
styleUrls: ['./task-list.component.scss'] styleUrls: ['./task-list.component.scss'],
}) })
export class TaskListComponent implements OnInit { export class TaskListComponent implements OnInit {
@Input() data?: any; @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 { ngOnInit(): void {
console.log(this.data) this.getTaskList();
this.getTaskList()
} }
listOfData: any = []; listOfData: any = [];
isloading = false isloading = false;
totalCount totalCount;
PageNumber = 1 PageNumber = 1;
PageSize = 10 PageSize = 10;
getTaskList() { getTaskList() {
this.isloading = true this.isloading = true;
let params = { let params = {
// Month: selectedTime, // TaskTypes: ['熟悉演练'],
// OrganizationId: this.OrganizationId, OrganizationId: this.data.id,
TaskTypes: ['熟悉演练'], // approvalStatuses: ['待检查', '已检查'],
// TaskName: this.searchForm.taskname,
// CompanyName: this.searchForm.unitname,
AssistantOrganizationId: this.data.id,
approvalStatuses: ['待检查', '已检查'],
PageNumber: this.PageNumber, PageNumber: this.PageNumber,
PageSize: this.PageSize PageSize: this.PageSize,
} PlanStartTime: '1999-01-01',
this.http.get('/api/PlanTasks', { CreationTypes: this.type ? ['申领任务'] : null,
params: params };
}).subscribe((data: any) => { this.http
this.isloading = false .get('/api/PlanTasks', {
console.log('任务列表', data); params: params,
this.totalCount = data.totalCount })
this.listOfData = [...data.items] .subscribe((data: any) => {
}) this.isloading = false;
console.log('任务列表', data);
this.totalCount = data.totalCount;
this.listOfData = [...data.items];
});
} }
pageChange($event) { pageChange($event) {
this.PageNumber = $event this.PageNumber = $event;
this.getTaskList() this.getTaskList();
} }
look(item) { look(item) {
console.log(item) console.log(item);
if (item.approvalStatus == '待检查') { if (item.approvalStatus == '待检查') {
this.message.create('warning', '该单位未检查'); this.message.create('warning', '该单位未检查');
return return;
} }
// this.modalRef.close() window.open(
// this.router.navigate(['/statistic/taskdetails'], { queryParams: { id: item.id, company: item.company.companyName, organization: item.organization.name, legalPersonName: item.company.legalPersonName ? item.company.legalPersonName : '' } }) `/statistic/taskdetails?id=${item.id}&company=${
item.company.companyName
window.open(`/statistic/taskdetails?id=${item.id}&company=${item.company.companyName}&organization=${item.organization.name}&legalPersonName=${item.company.legalPersonName ? item.company.legalPersonName : ''}`) }&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"> 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 <p style="font-size:9pt; line-height:150%; margin:0pt; orphans:0; widows:0"><span
style="font-family:宋体; font-size:9pt"> style="font-family:宋体; font-size:9pt">
{{taskAlldataOfcompany.address}}</span> {{taskAlldataOfcompany?.address || ''}}</span>
</p> </p>
</td> </td>
<td colspan="2" <td colspan="2"
@ -69,7 +69,7 @@
<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"> 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 <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> </p>
</td> </td>
</tr> </tr>
@ -82,7 +82,7 @@
<td colspan="2" <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"> 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 <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>
<td colspan="2" <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"> 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 <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"> 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 <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> </td>
</tr> </tr>
<tr style="height:21.25pt"> <tr style="height:21.25pt">
@ -104,7 +104,7 @@
<td colspan="2" <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"> 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 <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>
<td colspan="2" <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"> 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 <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"> 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 <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> </td>
</tr> </tr>
<tr style="height:22.95pt"> <tr style="height:22.95pt">
@ -126,7 +126,7 @@
<td colspan="2" <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"> 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 <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>
<td colspan="2" <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"> 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 <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"> 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 <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> </p>
</td> </td>
</tr> </tr>
@ -149,7 +149,7 @@
<td colspan="5" <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"> 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 <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> </td>
</tr> </tr>
<tr style="height:25.5pt"> <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"> 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"> <p style="font-size:9pt; line-height:150%; margin:0pt; orphans:0; widows:0">
<span style="font-family:宋体; font-size:9pt" <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 : ''}} {{item.check ? item.name : ''}}
</span> </span>
</p> </p>
@ -177,19 +177,19 @@
<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:111.05pt"> 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 <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> </p>
</td> </td>
<td colspan="3" <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"> 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 <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> </p>
</td> </td>
<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"> 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 <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> </p>
</td> </td>
</tr> </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"> 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"> <p style="line-height:12pt; margin:0pt; orphans:0; text-align:center; widows:0">
<span style="font-family:'Times New Roman'; font-size:9pt"> <span style="font-family:'Times New Roman'; font-size:9pt">
{{taskAlldataOfcompany.datas.facilities.fireFightingFacilities.shiwaishuliang}} {{taskAlldataOfcompany?.datas.facilities.fireFightingFacilities.shiwaishuliang}}
</span> </span>
</p> </p>
</td> </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"> 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"> <p style="margin:0pt; text-align:center">
<span style="font-family:'Times New Roman'; font-size:9pt"> <span style="font-family:'Times New Roman'; font-size:9pt">
{{taskAlldataOfcompany.datas.facilities.fireFightingFacilities.shineishuliang}}</span> {{taskAlldataOfcompany?.datas.facilities.fireFightingFacilities.shineishuliang}}</span>
</p> </p>
</td> </td>
<td colspan="4" <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 { Component, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router'; import { ActivatedRoute } from '@angular/router';
import { MethodService } from 'src/app/service/method.service'; import { MethodService } from 'src/app/service/method.service';
declare var $: any declare var $: any;
declare var Print: any declare var Print: any;
import Viewer from 'viewerjs'; import Viewer from 'viewerjs';
@Component({ @Component({
selector: 'app-task-details', selector: 'app-task-details',
templateUrl: './task-details.component.html', templateUrl: './task-details.component.html',
styleUrls: ['./task-details.component.scss'] styleUrls: ['./task-details.component.scss'],
}) })
export class TaskDetailsPagesComponent implements OnInit { 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 = { exerciseData: any = {
data: { data: {
people: "", people: '',
typeAndAmount: "", typeAndAmount: '',
time: "请选择时间", time: '请选择时间',
add: '', add: '',
information: "", information: '',
situation: "",//消防设施使用情况 situation: '', //消防设施使用情况
data: { data: {
danger: '', danger: '',
from: [ from: [
{ {
name: '侦查', form: { name: '侦查',
form: {
// mode: '', // mode: '',
// people: '', // people: '',
// add: '', // add: '',
// marshalling: '', // marshalling: '',
// imgShow: '' // imgShow: ''
} },
}, },
{ {
name: '警戒', form: { name: '警戒',
form: {
// mode: '', // mode: '',
// people: '', // people: '',
// add: '', // add: '',
// jingshi: '', // jingshi: '',
// imgShow: '' // imgShow: ''
} },
}, },
{ {
name: '供水', form: { name: '供水',
form: {
// mode: '', // mode: '',
// people: '', // people: '',
// gongshui: '', // gongshui: '',
// qushuidian: '', // qushuidian: '',
// imgShow: '' // imgShow: ''
} },
}, },
{ {
name: '搜救', form: { name: '搜救',
form: {
// mode: '', // mode: '',
// people: '', // people: '',
// add: '', // add: '',
// jingshi: '', // jingshi: '',
// imgShow: '' // imgShow: ''
} },
}, },
{ {
name: '排烟', form: { name: '排烟',
form: {
// mode: '', // mode: '',
// people: '', // people: '',
// add: '', // add: '',
// paiyan: '', // paiyan: '',
// imgShow: '' // imgShow: ''
} },
}, },
{ {
name: '灭火', form: { name: '灭火',
form: {
// mode: '', // mode: '',
// people: '', // people: '',
// add: '', // add: '',
// jingshi: '', // jingshi: '',
// imgShow: '' // imgShow: ''
} },
}, },
{ {
name: '照明', form: { name: '照明',
form: {
// mode: '', // mode: '',
// people: '', // people: '',
// zhaoming: '', // zhaoming: '',
// imgShow: '' // imgShow: ''
} },
}, },
{ {
name: '撤离', form: { name: '撤离',
form: {
// cheliluxian: '', // cheliluxian: '',
// chelixinhao: '', // chelixinhao: '',
// imgShow: '' // imgShow: ''
} },
}, },
{ {
name: '讲评', form: { name: '讲评',
form: {
// jiangpingren: '', // jiangpingren: '',
// qingdian: '', // qingdian: '',
// haode: '', // haode: '',
// buzu: '', // buzu: '',
// imgShow: '' // imgShow: ''
} },
} },
], ],
yanliantime: '' yanliantime: '',
}, },
vehicleType: [] vehicleType: [],
} },
} };
/** /**
* *
*/ */
@ -134,99 +146,96 @@ export class TaskDetailsPagesComponent implements OnInit {
dong: '', dong: '',
xi: '', xi: '',
nan: '', nan: '',
bei: '' bei: '',
}, },
luxian: '', luxian: '',
time: '' time: '',
}, },
other: { other: {
listdata: [{ listdata: [
name: '消防水源', {
data: [ name: '消防水源',
{ name: '消防水池数量', velue: '' }, data: [
{ name: '消防水池位置', velue: '' }, { name: '消防水池数量', velue: '' },
{ name: '总容量(平方米)', velue: '' }, { name: '消防水池位置', velue: '' },
{ name: '补给方式', velue: '' }, { name: '总容量(平方米)', velue: '' },
{ name: '室外其他水源', velue: '' }, { name: '补给方式', velue: '' },
{ name: '室外其他水源位置', velue: '' } { name: '室外其他水源', velue: '' },
] { name: '室外其他水源位置', velue: '' },
}, ],
{ },
name: '消防栓泵', {
data: [ name: '消防栓泵',
{ name: '数量', velue: '' }, data: [
{ name: '扬程(m)', velue: '' }, { name: '数量', velue: '' },
{ name: '流量(L/S)', velue: '' }, { name: '扬程(m)', velue: '' },
{ name: '水泵接合器数量', velue: '' }, { name: '流量(L/S)', velue: '' },
{ name: '水泵接合器位置', velue: '' } { name: '水泵接合器数量', velue: '' },
] { name: '水泵接合器位置', velue: '' },
}, ],
{ },
name: '喷淋泵', {
data: [ name: '喷淋泵',
{ name: '数量', velue: '' }, data: [
{ name: '扬程(m)', velue: '' }, { name: '数量', velue: '' },
{ name: '流量(L/S)', velue: '' }, { name: '扬程(m)', velue: '' },
{ name: '水泵接合器数量', velue: '' }, { name: '流量(L/S)', velue: '' },
{ name: '水泵接合器位置', velue: '' }, { name: '水泵接合器数量', velue: '' },
] { name: '水泵接合器位置', velue: '' },
],
},
}, {
{ name: '消防电梯',
name: '消防电梯', data: [
data: [ { name: '数量', velue: '' },
{ name: '数量', velue: '' }, { name: '位置', velue: '' },
{ name: '位置', velue: '' }, ],
] },
}, {
{ name: '疏散电梯',
name: '疏散电梯', data: [
data: [ { name: '数量', velue: '' },
{ name: '数量', velue: '' }, { name: '位置', velue: '' },
{ name: '位置', velue: '' }, ],
] },
}, {
{ name: '安全出口',
name: '安全出口', data: [
data: [ { name: '数量', velue: '' },
{ name: '数量', velue: '' }, { name: '位置', velue: '' },
{ name: '位置', velue: '' }, ],
] },
}, {
{ name: '标准层室内消火栓',
name: '标准层室内消火栓', data: [
data: [ { name: '数量', velue: '' },
{ name: '数量', velue: '' }, { 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: [ key: [],
zhongdiantishi: '',
], },
zhongdiantishi: '' };
}
}
/** /**
* *
@ -234,87 +243,103 @@ export class TaskDetailsPagesComponent implements OnInit {
kongzhishi = { kongzhishi = {
data: { data: {
addres: '' addres: '',
} },
} };
/** /**
* *
*/ */
shiwaixiaohuoshuan = { shiwaixiaohuoshuan = {
data: { data: {
addres: '' addres: '',
} },
} };
kongzhishiweizhi = '' kongzhishiweizhi = '';
shiwaixiaohuoshuanweizhi = '' shiwaixiaohuoshuanweizhi = '';
company: string company: string;
organization: string organization: string;
legalPersonName: string legalPersonName: string;
checkTime: string checkTime: string;
taskAlldataOfcompany: any = { taskAlldataOfcompany: any = {
address: '', address: '',
datas: { datas: {
basicInfo: { basicInfo: {},
},
facilities: { facilities: {
fireFightingFacilities: { fireFightingFacilities: {},
}
}, },
}, },
zhuyaosheshi: { zhuyaosheshi: {},
};
} taskAlldataOfform: any;
}
taskAlldataOfform: any
ngOnInit(): void { ngOnInit(): void {
this.company = this.route.snapshot.queryParams.company this.company = this.route.snapshot.queryParams.company;
this.legalPersonName = this.route.snapshot.queryParams.legalPersonName 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.methodService.getTaskDetails(taskId).then((data: any) => {
this.checkTime = data.checkTime this.checkTime = data.checkTime;
let obj = JSON.parse(data.resultData) let obj = JSON.parse(data.resultData);
// if (!obj) { // if (!obj) {
// return // return
// } // }
console.log('所有数据', obj) console.log('所有数据', obj);
this.taskAlldataOfcompany = obj.company this.taskAlldataOfcompany = obj.company;
this.taskAlldataOfform = obj.form this.taskAlldataOfform = obj.form;
let exerciseData = this.methodService.getTaskDetailsItem(
'实战演练',
let exerciseData = this.methodService.getTaskDetailsItem('实战演练', obj.form) obj.form
);
if (exerciseData.data.data) { if (exerciseData.data.data) {
this.exerciseData = this.methodService.getTaskDetailsItem('实战演练', obj.form) this.exerciseData = this.methodService.getTaskDetailsItem(
'实战演练',
obj.form
);
} }
// console.log('实战演练详情', this.exerciseData) // console.log('实战演练详情', this.exerciseData)
let planData = this.methodService.getTaskDetailsItem('数字化预案', obj.form) let planData = this.methodService.getTaskDetailsItem(
if (JSON.stringify(planData.data) != "{}") { '数字化预案',
if (JSON.stringify(planData.data.basicInfo) != "{}") { obj.form
this.planData.data.basicInfo = this.methodService.getTaskDetailsItem('数字化预案', obj.form).data.basicInfo );
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) != "{}") { if (JSON.stringify(planData.data.other) != '{}') {
this.planData.data.other = this.methodService.getTaskDetailsItem('数字化预案', obj.form).data.other this.planData.data.other = this.methodService.getTaskDetailsItem(
'数字化预案',
obj.form
).data.other;
} }
if (planData.data.key.lenth != 0) { 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) { 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) console.log('数字化预案详情', this.planData);
this.kongzhishiweizhi = obj.company.datas.facilities.controlPosition this.kongzhishiweizhi =
this.shiwaixiaohuoshuanweizhi = obj.company.datas.facilities.fireFightingFacilities.shiwaifenbu obj.company?.datas.facilities.controlPosition || '';
this.shiwaixiaohuoshuanweizhi =
obj.company?.datas.facilities.fireFightingFacilities.shiwaifenbu || '';
// let kongzhishi = this.methodService.getTaskDetailsItem('消防控制室', obj.form) // let kongzhishi = this.methodService.getTaskDetailsItem('消防控制室', obj.form)
// if (JSON.stringify(kongzhishi.data) != "{}") { // if (JSON.stringify(kongzhishi.data) != "{}") {
// this.kongzhishi = this.methodService.getTaskDetailsItem('消防控制室', obj.form) // this.kongzhishi = this.methodService.getTaskDetailsItem('消防控制室', obj.form)
@ -325,10 +350,9 @@ export class TaskDetailsPagesComponent implements OnInit {
// } // }
// console.log('消防控制室详情', this.kongzhishi) // console.log('消防控制室详情', this.kongzhishi)
// console.log('室外消火栓详情', this.shiwaixiaohuoshuan) // console.log('室外消火栓详情', this.shiwaixiaohuoshuan)
}) });
} }
olddata: any olddata: any;
getCompanies() { getCompanies() {
// this.http.get('/api/Companies/' + this.id).subscribe((data: any) => { // this.http.get('/api/Companies/' + this.id).subscribe((data: any) => {
// console.log('当前单位信息', data); // console.log('当前单位信息', data);
@ -337,45 +361,46 @@ export class TaskDetailsPagesComponent implements OnInit {
} }
goback() { goback() {
window.history.back() window.history.back();
} }
download(type) { download(type) {
type == 1 ? $("#tablebox").wordExport('演练卡') : $("#tablebox2").wordExport('数字化预案'); type == 1
? $('#tablebox').wordExport('演练卡')
: $('#tablebox2').wordExport('数字化预案');
} }
isprintLoading = false isprintLoading = false;
print() { print() {
this.isprintLoading = true this.isprintLoading = true;
Print('#tablebox3', { Print('#tablebox3', {
onStart: () => { onStart: () => {
console.log('onStart', this) console.log('onStart', this);
this.isprintLoading = false this.isprintLoading = false;
}, },
onEnd: () => { onEnd: () => {
console.log('onEnd', new Date()) console.log('onEnd', new Date());
this.isprintLoading = false this.isprintLoading = false;
} },
}) });
} }
//查看图片 //查看图片
viewImg(url) { viewImg(url) {
let dom = document.getElementById(`viewerjs`) let dom = document.getElementById(`viewerjs`);
let pObjs = dom.childNodes; let pObjs = dom.childNodes;
let node = document.createElement("img") let node = document.createElement('img');
node.style.display = "none"; node.style.display = 'none';
node.src = url; node.src = url;
node.id = 'img' node.id = 'img';
dom.appendChild(node) dom.appendChild(node);
setTimeout(() => { setTimeout(() => {
let viewer = new Viewer(document.getElementById(`viewerjs`), { let viewer = new Viewer(document.getElementById(`viewerjs`), {
hidden: () => { hidden: () => {
dom.removeChild(pObjs[0]); dom.removeChild(pObjs[0]);
viewer.destroy(); viewer.destroy();
} },
}); });
node.click(); node.click();
}, 0); }, 0);

Loading…
Cancel
Save