From 28b56132966e1d016410cddbb922bc5a6f2e72cd Mon Sep 17 00:00:00 2001 From: SHAOJIAHAO <55341701@qq.com> Date: Tue, 27 Sep 2022 16:47:59 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=E5=AE=8C=E5=96=84=E8=A1=A8?= =?UTF-8?q?=E6=A0=BC=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/home/home.module.ts | 5 +- .../task-details/task-details.component.html | 295 +++++++++--------- .../task-details/task-details.component.ts | 179 ++++++++++- src/app/pipe/pipe.ts | 9 + 4 files changed, 325 insertions(+), 163 deletions(-) diff --git a/src/app/home/home.module.ts b/src/app/home/home.module.ts index f26661e..28016bb 100644 --- a/src/app/home/home.module.ts +++ b/src/app/home/home.module.ts @@ -73,7 +73,7 @@ import { ChatWindowComponent } from './commonComponents/chat-window/chat-window. import { AngularDraggableModule } from 'angular2-draggable'; import { HomeComponent } from './statistic-analysis/home/home.component'; import { UploadComponent } from './task/station-task-execution/upload/upload.component'; -import { fileName } from '../pipe/pipe'; +import { chineseNumbers, fileName } from '../pipe/pipe'; import { TaskDetailsPagesComponent } from './task/station-task-execution/task-details/task-details.component'; @NgModule({ declarations: [ @@ -117,7 +117,8 @@ import { TaskDetailsPagesComponent } from './task/station-task-execution/task-de ChatWindowComponent, HomeComponent, UploadComponent, - fileName + fileName, + chineseNumbers ], imports: [ CommonModule, diff --git a/src/app/home/task/station-task-execution/task-details/task-details.component.html b/src/app/home/task/station-task-execution/task-details/task-details.component.html index 47994fd..691d102 100644 --- a/src/app/home/task/station-task-execution/task-details/task-details.component.html +++ b/src/app/home/task/station-task-execution/task-details/task-details.component.html @@ -160,12 +160,14 @@ 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:middle; width:183.6pt">

- {{exerciseData.data.data.from[0].form.mode}} + {{exerciseData.data.data.from[0].form.marshalling}}

-

+ newlogo @@ -210,7 +212,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:middle; width:183.6pt">

- {{exerciseData.data.data.from[0].form.marshalling}} + {{exerciseData.data.data.from[0].form.mode}}

@@ -229,15 +231,17 @@ 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:middle; width:183.6pt">

- {{exerciseData.data.data.from[1].form.mode}} + {{exerciseData.data.data.from[1].form.marshalling}}

-

newlogo + newlogo

@@ -290,11 +294,14 @@

{{exerciseData.data.data.from[3].form.mode}}

+ *ngIf="exerciseData.data.data.from[3].form">{{exerciseData.data.data.from[3].form.marshalling}} +

-

+ newlogo @@ -349,11 +356,14 @@

{{exerciseData.data.data.from[4].form.mode}}

+ *ngIf="exerciseData.data.data.from[4].form">{{exerciseData.data.data.from[4].form.marshalling}} +

-

+ newlogo @@ -408,11 +418,14 @@

{{exerciseData.data.data.from[5].form.mode}}

+ *ngIf="exerciseData.data.data.from[5].form">{{exerciseData.data.data.from[5].form.marshalling}} +

-

+ newlogo @@ -467,11 +480,14 @@

{{exerciseData.data.data.from[5].form.mode}}

+ *ngIf="exerciseData.data.data.from[2].form">{{exerciseData.data.data.from[5].form.marshalling}} +

-

+ newlogo @@ -526,11 +542,14 @@

{{exerciseData.data.data.from[6].form.mode}}

+ *ngIf="exerciseData.data.data.from[6].form">{{exerciseData.data.data.from[6].form.marshalling}} +

-

+ newlogo @@ -578,7 +597,9 @@ -

+ newlogo @@ -615,7 +636,9 @@ -

+ newlogo @@ -686,11 +709,8 @@

泰富特钢悬架有限公司基本情况{{xxx ? '牛牛牛' : - '嘤嘤嘤'}}

- - + style="font-family:宋体; font-size:22pt; font-weight:bold">{{company}}基本情况

@@ -708,7 +728,7 @@

泰富特钢悬架有限公司

+ style="font-family:宋体; font-size:9pt">{{planData.data.basicInfo.name}}

@@ -718,7 +738,7 @@

泰富路中段

+ style="font-family:宋体; font-size:9pt">{{planData.data.basicInfo.address}}

@@ -728,7 +748,7 @@

13335180877

+ style="font-family:'Times New Roman'; font-size:9pt">{{planData.data.basicInfo.phone}}

@@ -740,7 +760,7 @@

260

+ style="font-family:'Times New Roman'; font-size:9pt">{{planData.data.basicInfo.peoplenum}}

@@ -750,7 +770,8 @@

12

+ style="font-family:'Times New Roman'; font-size:9pt">{{planData.data.basicInfo.buildingheight}} +

@@ -759,7 +780,8 @@ -

1 +

{{planData.data.basicInfo.cengshu}}

@@ -772,7 +794,7 @@

钢结构

+ style="font-family:宋体; font-size:9pt">{{planData.data.basicInfo.jiegou}}

@@ -782,7 +804,7 @@

120000

+ style="font-family:'Times New Roman'; font-size:9pt">{{planData.data.basicInfo.zhandimianji}}

@@ -792,7 +814,7 @@

24000

+ style="font-family:'Times New Roman'; font-size:9pt">{{planData.data.basicInfo.zongmianji}}

@@ -802,7 +824,7 @@

钢材悬架生产

+ style="font-family:宋体; font-size:9pt">{{planData.data.basicInfo.xingzhi}}

@@ -814,25 +836,28 @@

东:玉凯路 + style="font-family:宋体; font-size:9pt">东:{{planData.data.basicInfo.pilin.dong}}

泰富街

+ style="font-family:宋体; font-size:9pt">{{planData.data.basicInfo.pilin.nan}}

西:玉皇路 + style="font-family:宋体; font-size:9pt">西:{{planData.data.basicInfo.pilin.xi}}

北:空地

+ style="font-family:宋体; font-size:9pt">北:{{planData.data.basicInfo.pilin.bei}}

@@ -844,7 +869,7 @@

府前街,玉凯路,泰富路

+ style="font-family:宋体; font-size:9pt">{{planData.data.basicInfo.luxian}}

@@ -866,7 +891,10 @@ -

厂区北侧 +

+ + {{kongzhishi.data.addres}} +

@@ -884,7 +912,8 @@

2

+ style="font-family:'Times New Roman'; font-size:9pt">{{planData.data.other.listdata[0].data[0].value}} +

@@ -894,7 +923,8 @@

厂区中部

+ style="font-family:宋体; font-size:9pt">{{planData.data.other.listdata[0].data[1].value}} +

@@ -904,7 +934,8 @@

300

+ style="font-family:'Times New Roman'; font-size:9pt">{{planData.data.other.listdata[0].data[2].value}} +

@@ -915,7 +946,7 @@

市政供水

+ style="font-family:宋体; font-size:9pt">{{planData.data.other.listdata[0].data[3].value}}

@@ -927,7 +958,8 @@

2

+ style="font-family:'Times New Roman'; font-size:9pt">{{planData.data.other.listdata[0].data[4].value}} +

@@ -937,7 +969,7 @@

南侧,东侧各一个

+ style="font-family:宋体; font-size:9pt">{{planData.data.other.listdata[0].data[5].value}}

@@ -952,8 +984,9 @@ 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:35.45pt">

有(
无({{planData.data.other.radiodata[0].isHave ? '√' : + ''}})
无({{planData.data.other.radiodata[0].isHave ? '' : '√'}}

有(
无({{planData.data.other.radiodata[1].isHave ? '√' : + ''}})
无({{planData.data.other.radiodata[1].isHave ? '' : '√'}}

有(
无({{planData.data.other.radiodata[2].isHave ? '√' : + ''}})
无({{planData.data.other.radiodata[2].isHave ? '' : '√'}}

有(
无({{planData.data.other.radiodata[3].isHave ? '√' : + ''}})
无({{planData.data.other.radiodata[3].isHave ? '' : '√'}}

@@ -1005,8 +1041,7 @@

20

+ style="font-family:'Times New Roman'; font-size:9pt">

@@ -1015,8 +1050,11 @@ -

厂区四周

+

+ + {{shiwaixiaohuoshuan.data.addres}} + +

@@ -1034,20 +1072,21 @@ 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:41.5pt">

数量:0

+ style="font-family:'Times New Roman'; font-size:9pt">{{planData.data.other.listdata[1].data[0].value}} +

扬程:0{{planData.data.other.listdata[1].data[1].value}}m

流量0{{planData.data.other.listdata[1].data[2].value}}L/S

数量:0

+ style="font-family:'Times New Roman'; font-size:9pt">{{planData.data.other.listdata[1].data[3].value}} +

+ style="font-family:宋体; font-size:9pt">{{planData.data.other.listdata[1].data[4].value}}

@@ -1077,20 +1117,21 @@ 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:41.5pt">

数量:0

+ style="font-family:'Times New Roman'; font-size:9pt">{{planData.data.other.listdata[2].data[0].value}} +

扬程:0{{planData.data.other.listdata[2].data[1].value}}m

流量:0{{planData.data.other.listdata[2].data[2].value}}L/S

数量:0

+ style="font-family:'Times New Roman'; font-size:9pt">{{planData.data.other.listdata[2].data[3].value}} +

0

+ style="font-family:'Times New Roman'; font-size:9pt">{{planData.data.other.listdata[2].data[4].value}} +

@@ -1120,7 +1163,10 @@ -

0 +

{{planData.data.other.listdata[3].data[0].value}} + , + {{planData.data.other.listdata[3].data[1].value}}

0,无

+ style="font-family:'Times New Roman'; font-size:9pt">{{planData.data.other.listdata[4].data[0].value}} + ,{{planData.data.other.listdata[4].data[1].value}} +

@@ -1146,8 +1194,9 @@

8,厂区四周

+ style="font-family:'Times New Roman'; font-size:9pt">{{planData.data.other.listdata[5].data[0].value}},{{planData.data.other.listdata[5].data[1].value}} +

@@ -1158,9 +1207,8 @@ -

0

+

+

@@ -1170,16 +1218,17 @@

0,无

+ style="font-family:'Times New Roman'; font-size:9pt">{{planData.data.other.listdata[6].data[0].value}},{{planData.data.other.listdata[6].data[1].value}} +

- +

- 重点部位情况(一) + 重点部位情况({{key | chineseNumbers}})

物质存储仓库

+ style="font-family:宋体; font-size:9pt">{{item.data[0].value}}

@@ -1200,7 +1249,7 @@

厂区东侧厂房

+ style="font-family:宋体; font-size:9pt">{{item.data[1].value}}

@@ -1210,7 +1259,7 @@

钢结构

+ style="font-family:宋体; font-size:9pt">{{item.data[2].value}}

@@ -1220,7 +1269,7 @@

存储漆类,油类

+ style="font-family:宋体; font-size:9pt">{{item.data[3].value}}

@@ -1232,79 +1281,12 @@

油类,漆类易燃,有毒

+ style="font-family:宋体; font-size:9pt">{{item.data[4].value}}

- - - - - - - - - -

- 重点部位情况(二) -

- - -

重点部位名称

- - -

淬火油池

- - -

重点部位所在位置

- - -

厂区中部

- - -

建筑结构

- - -

钢结构

- - -

使用性质

- - -

淬火

- - - - -

主要危险性

- - -

高温

- - @@ -1315,12 +1297,15 @@ -

 

+

+ + {{planData.data.zhongdiantishi}} + +

- + \ No newline at end of file diff --git a/src/app/home/task/station-task-execution/task-details/task-details.component.ts b/src/app/home/task/station-task-execution/task-details/task-details.component.ts index 6aa3b29..cf620ec 100644 --- a/src/app/home/task/station-task-execution/task-details/task-details.component.ts +++ b/src/app/home/task/station-task-execution/task-details/task-details.component.ts @@ -2,6 +2,7 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { MethodService } from 'src/app/service/method.service'; declare var $: any +import Viewer from 'viewerjs'; @Component({ selector: 'app-task-details', templateUrl: './task-details.component.html', @@ -112,7 +113,138 @@ export class TaskDetailsPagesComponent implements OnInit { /** * 救援预案信息 */ - planData: any + planData: any = { + data: { + basicInfo: { + name: '', + address: '', + people: '', + phone: '', + peoplenum: '', + buildingheight: '', + cengshu: '', + jiegou: '', + zhandimianji: '', + zongmianji: '', + xingzhi: '', + pilin: { + dong: '', + xi: '', + nan: '', + bei: '' + }, + luxian: '', + 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: '' }, + ] + } + + ], + radiodata: [{ + name: '自动报警系统', + isHave: null + }, + { + name: '自动喷水系统', + isHave: null + }, + { + name: '应急广播系统', + isHave: null + }, + { + name: '放排烟系统', + isHave: null + } + ] + }, + key: [ + + ], + zhongdiantishi: '' + } + } + + /** + * 消防控制室 + */ + + kongzhishi = { + data: { + addres: '' + } + } + + /** + * 室外消火栓 + */ + shiwaixiaohuoshuan = { + data: { + addres: '' + } + } + + company: string organization: string @@ -123,9 +255,25 @@ export class TaskDetailsPagesComponent implements OnInit { let taskId = this.route.snapshot.queryParams.id this.methodService.getTaskDetails(taskId).then((data: any) => { let obj = JSON.parse(data.resultData) - this.exerciseData = this.methodService.getTaskDetailsItem('实战演练', obj.form) - console.log('实战演练详情', this.exerciseData) - this.planData = this.methodService.getTaskDetailsItem('数字化预案', obj.form) + console.log('所有数据', obj) + + + let exerciseData = this.methodService.getTaskDetailsItem('实战演练', obj.form) + if (exerciseData.data.data) { + this.exerciseData = this.methodService.getTaskDetailsItem('实战演练', obj.form) + } + // console.log('实战演练详情', this.exerciseData) + + let planData = this.methodService.getTaskDetailsItem('数字化预案', obj.form) + if (planData.data) { + this.planData = this.methodService.getTaskDetailsItem('数字化预案', obj.form) + } + // console.log('数字化预案详情', this.planData) + + this.kongzhishi = this.methodService.getTaskDetailsItem('消防控制室', obj.form) + this.shiwaixiaohuoshuan = this.methodService.getTaskDetailsItem('室外消火栓', obj.form) + // console.log('消防控制室详情', this.kongzhishi) + // console.log('室外消火栓详情', this.shiwaixiaohuoshuan) }) } @@ -135,9 +283,28 @@ export class TaskDetailsPagesComponent implements OnInit { window.history.back() } - xxx = true - yyy = [1] download(type) { type == 1 ? $("#tablebox").wordExport('演练卡') : $("#tablebox2").wordExport('数字化预案'); } + + //查看图片 + viewImg(url) { + let dom = document.getElementById(`viewerjs`) + let pObjs = dom.childNodes; + let node = document.createElement("img") + node.style.display = "none"; + node.src = url; + node.id = 'img' + dom.appendChild(node) + + setTimeout(() => { + let viewer = new Viewer(document.getElementById(`viewerjs`), { + hidden: () => { + dom.removeChild(pObjs[0]); + viewer.destroy(); + } + }); + node.click(); + }, 0); + } } diff --git a/src/app/pipe/pipe.ts b/src/app/pipe/pipe.ts index 4b83e67..4186498 100644 --- a/src/app/pipe/pipe.ts +++ b/src/app/pipe/pipe.ts @@ -7,3 +7,12 @@ export class fileName implements PipeTransform { return a } } + + +@Pipe({ name: 'chineseNumbers' }) +export class chineseNumbers implements PipeTransform { + transform(value: any): string { + let arr = ['一', '二', '三', '四', '五', '六', '七', '八', '九', '十'] + return arr[value] + } +}