From 9bf3aea91f0d82d3ea0eb04df4b0f7695365b10e Mon Sep 17 00:00:00 2001 From: jingbowen <970029315@qq.com> Date: Thu, 29 Sep 2022 08:29:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=BC=94=E7=BB=83=E5=8D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../unit-details/unit-details.component.html | 706 +++++++++++++++++- .../unit-details/unit-details.component.scss | 3 + .../unit-details/unit-details.component.ts | 261 ++++++- src/app/service/method.service.ts | 18 +- 4 files changed, 983 insertions(+), 5 deletions(-) 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 @@ -
+
+
\ 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
|