diff --git a/src/app/home/basic-info/unit-details/unit-details.component.html b/src/app/home/basic-info/unit-details/unit-details.component.html index c4ae234..47a9402 100644 --- a/src/app/home/basic-info/unit-details/unit-details.component.html +++ b/src/app/home/basic-info/unit-details/unit-details.component.html @@ -159,9 +159,13 @@ -
基本信息
+
+
基本信息
+
切换为实战演练卡
+
切换为单位基本信息
+
-
+
 

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

实战演练卡

+
+

演练时间 +

+
+

+
+

演练对象 +

+
+

{{company}}

+
+

组织单位 +

+
+

{{organization}}

+
+

演练用时 +

+
+

+

+
+

参演单位及人数 +

+
+

{{exerciseData.data.people}} +

+
+

参演车辆数量及类型 +

+
+

{{exerciseData.data.typeAndAmount}} +

+
+

灾情设定: +

+
+

时间 +

+
+

{{exerciseData.data.time}} +

+
+

位置 +

+
+

{{exerciseData.data.add}} +

+
+

基本情况 +

+
+

{{exerciseData.data.information}} +

+
+

消防设施使用情况: +

+
+

{{exerciseData.data.situation}}

+
+

作战行动 +

+
+

  +

+

侦查 +

+
+

战斗编组

+
+

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

+
+

+ newlogo +

+
+

人数 +

+
+

+ {{exerciseData.data.data.from[0].form.people}} +

+
+

位置 +

+
+

+ {{exerciseData.data.data.from[0].form.add}} + +

+
+

侦查方式

+
+

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

+
+

警戒 +

+
+

战斗编组

+
+

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

+
+

+ newlogo +

+
+

人数 +

+
+

{{exerciseData.data.data.from[1].form.people}}

+
+

位置 +

+
+

{{exerciseData.data.data.from[1].form.add}}

+
+

特别警示

+
+

{{exerciseData.data.data.from[1].form.jingshi}}

+
+

搜救 +

+
+

战斗编组

+
+

{{exerciseData.data.data.from[3].form.marshalling}} +

+
+

+ newlogo +

+
+

人数 +

+
+

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

+
+

位置 +

+
+

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

+
+

特别警示

+
+

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

+
+

排烟 +

+
+

战斗编组

+
+

{{exerciseData.data.data.from[4].form.marshalling}} +

+
+

+ newlogo +

+
+

人数 +

+
+

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

+
+

位置 +

+
+

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

+
+

排烟方式

+
+

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

+
+

灭火 +

+
+

战斗编组

+
+

{{exerciseData.data.data.from[5].form.marshalling}} +

+
+

+ newlogo +

+
+

人数 +

+
+

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

+
+

位置 +

+
+

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

+
+

特别警示

+
+

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

+
+

供水 +

+
+

战斗编组

+
+

{{exerciseData.data.data.from[5].form.marshalling}} +

+
+

+ newlogo +

+
+

人数 +

+
+

{{exerciseData.data.data.from[2].form.people}}

+
+

供水方式

+
+

{{exerciseData.data.data.from[2].form.gongshui}}

+
+

取水点 +

+
+

{{exerciseData.data.data.from[2].form.qushuidian}} +

+
+

照明

+
+

战斗编组

+
+

{{exerciseData.data.data.from[6].form.marshalling}} +

+
+

+ newlogo +

+
+

人数 +

+
+

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

+
+

照明方式

+
+

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

+
+

撤离 +

+
+

撤离路线

+
+

{{exerciseData.data.data.from[7].form.cheliluxian}} +

+
+

+ newlogo +

+
+

撤离信号

+
+

{{exerciseData.data.data.from[7].form.chelixinhao}} +

+
+

讲评 +

+
+

讲评人员

+
+

{{exerciseData.data.data.from[8].form.jiangpingren}} +

+
+

+ newlogo +

+
+

清点人员

+
+

{{exerciseData.data.data.from[8].form.qingdian}}

+
+

好的方面

+
+

{{exerciseData.data.data.from[8].form.haode}}

+
+

存在不足

+
+

{{exerciseData.data.data.from[8].form.buzu}}

+
+

该单位重大安全隐患 +

+
+

{{exerciseData.data.data.danger}} +

+
+ + +
\ No newline at end of file diff --git a/src/app/home/basic-info/unit-details/unit-details.component.scss b/src/app/home/basic-info/unit-details/unit-details.component.scss index 2137c49..96a67a4 100644 --- a/src/app/home/basic-info/unit-details/unit-details.component.scss +++ b/src/app/home/basic-info/unit-details/unit-details.component.scss @@ -1,3 +1,6 @@ +.bule{ + color: #2196F3; +} .detailsbox { width: 100%; diff --git a/src/app/home/basic-info/unit-details/unit-details.component.ts b/src/app/home/basic-info/unit-details/unit-details.component.ts index 4e8014f..075f93a 100644 --- a/src/app/home/basic-info/unit-details/unit-details.component.ts +++ b/src/app/home/basic-info/unit-details/unit-details.component.ts @@ -1,7 +1,9 @@ import { Component, Input, Renderer2, OnDestroy, AfterViewInit, ElementRef, OnInit, ViewChild, ViewContainerRef } from '@angular/core'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { NzMessageService } from 'ng-zorro-antd/message'; -import { Router } from '@angular/router'; +import { Router,ActivatedRoute } from '@angular/router'; + +import { MethodService } from 'src/app/service/method.service'; import { TreeService } from 'src/app/service/tree.service'; import { HttpClient } from '@angular/common/http'; import { asBlob } from 'html-docx-js-typescript' @@ -22,10 +24,240 @@ export class UnitDetailsComponent implements OnInit { @ViewChild('box') box: ElementRef; loading = false; avatarUrl?: string; - constructor(private message: NzMessageService, private router: Router, private toTree: TreeService, private fb: FormBuilder, private http: HttpClient, private renderer: Renderer2, private el: ElementRef, public renderer2: Renderer2, private elementRef: ElementRef, private objectsSrv: ObjectsSimpleService, private modal: NzModalService, private viewContainerRef: ViewContainerRef) { + constructor(public methodService: MethodService, private route: ActivatedRoute, private message: NzMessageService, private router: Router, private toTree: TreeService, private fb: FormBuilder, private http: HttpClient, private renderer: Renderer2, private el: ElementRef, public renderer2: Renderer2, private elementRef: ElementRef, private objectsSrv: ObjectsSimpleService, private modal: NzModalService, private viewContainerRef: ViewContainerRef) { } + index=true disableds = false + exerciseData: any = { + data: { + people: "", + typeAndAmount: "", + time: "请选择时间", + add: '', + information: "", + situation: "",//消防设施使用情况 + data: { + danger: '', + from: [ + { + name: '侦查', form: { + // mode: '', + // people: '', + // add: '', + // marshalling: '', + // imgShow: '' + } + }, + { + name: '警戒', form: { + // mode: '', + // people: '', + // add: '', + // jingshi: '', + // imgShow: '' + } + }, + { + name: '供水', form: { + // mode: '', + // people: '', + // gongshui: '', + // qushuidian: '', + // imgShow: '' + } + }, + { + name: '搜救', form: { + // mode: '', + // people: '', + // add: '', + // jingshi: '', + // imgShow: '' + } + }, + { + name: '排烟', form: { + // mode: '', + // people: '', + // add: '', + // paiyan: '', + // imgShow: '' + } + }, + { + name: '灭火', form: { + // mode: '', + // people: '', + // add: '', + // jingshi: '', + // imgShow: '' + } + }, + { + name: '照明', form: { + // mode: '', + // people: '', + // zhaoming: '', + // imgShow: '' + } + }, + { + name: '撤离', form: { + // cheliluxian: '', + // chelixinhao: '', + // imgShow: '' + } + }, + { + name: '讲评', form: { + // jiangpingren: '', + // qingdian: '', + // haode: '', + // buzu: '', + // imgShow: '' + } + } + ] + }, + vehicleType: [] + } + } + /** + * 救援预案信息 + */ + 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 datas = { basicInfo: { name: "", @@ -103,6 +335,31 @@ export class UnitDetailsComponent implements OnInit { if (this.router['browserUrlTree'].queryParams.pattern != "edit") { this.disableds = true } + this.company = this.route.snapshot.queryParams.company + this.organization = JSON.parse(sessionStorage.getItem('userData')).organizationName + let taskId = this.route.snapshot.queryParams.id + this.methodService.getCompanyTaskDetails(taskId).then((data: any) => { + let obj = JSON.parse(data.resultData) + 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) + }) this.validateForm = this.fb.group({ code: [null], organizationId: [null, [Validators.required]], diff --git a/src/app/service/method.service.ts b/src/app/service/method.service.ts index b9e55e3..98cd2be 100644 --- a/src/app/service/method.service.ts +++ b/src/app/service/method.service.ts @@ -71,7 +71,23 @@ export class MethodService { }) } - + /** + * @param id2 任务id + * @returns 任务具体内容 + */ + async getCompanyTaskDetails(id2) { + return new Promise((resolve, reject) => { + this.http.get(`/api/PlanTasks/GetCompanyLastTask/`, { + params: { + companyId: id2, + taskType:"熟悉演练", + approvalStatus:["待检查"] + } + }).subscribe((data: any) => { + resolve(data) + }) + }) + } /** * 当前任务详情