diff --git a/proxy.config.json b/proxy.config.json index b28a11f..f4e72bb 100644 --- a/proxy.config.json +++ b/proxy.config.json @@ -1,6 +1,6 @@ { "/api": { - "target": "http://121.37.20.190:8000", + "target": "http://121.36.37.70:8222/", "secure": false, "changeOrigin": true } diff --git a/src/app/http-interceptors/cache-token.service.ts b/src/app/http-interceptors/cache-token.service.ts index b19b0cb..e50ab29 100644 --- a/src/app/http-interceptors/cache-token.service.ts +++ b/src/app/http-interceptors/cache-token.service.ts @@ -1,66 +1,64 @@ -import { Injectable } from '@angular/core'; -import { HttpClient } from '@angular/common/http' -import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar'; +import { Injectable } from "@angular/core"; +import { HttpClient } from "@angular/common/http"; +import { MatSnackBar, MatSnackBarConfig } from "@angular/material/snack-bar"; @Injectable({ - providedIn: 'root' + providedIn: "root", }) - export class CacheTokenService { - - constructor(private http:HttpClient,public snackBar: MatSnackBar) { } + constructor(private http: HttpClient, public snackBar: MatSnackBar) {} //登录 - loginData = {name: 'admin', password: '12345678'} //登录账号信息 - - login () { - return new Promise ((resolve,reject)=>{ - sessionStorage.setItem("buildingTypeId",'5e7c9078a3050b1a840ed4ba'); //建筑类型 - sessionStorage.setItem("planId",'5fa3820af8eb762cb03c666d'); //预案ID - sessionStorage.setItem("companyId",'5fa35d68f8eb762cb03c662e'); //单位ID - this.http.post('/api/Account/SignIn',this.loginData).subscribe((data:any)=>{ - sessionStorage.setItem("level",data.level); - sessionStorage.setItem("token",data.token); - sessionStorage.setItem("refreshToken",data.refreshToken); - this.startUp() - resolve('success') - },(err) => { //捕获错误 - const config = new MatSnackBarConfig(); - config.verticalPosition = 'top'; - config.duration = 3000 - this.snackBar.open(err,'确定',config); - }) - }) + loginData = { name: "superadmin", password: "SHya119!@" }; //登录账号信息 + + login() { + return new Promise((resolve, reject) => { + sessionStorage.setItem("buildingTypeId", "5e7c9033a3050b1a840ed4b9"); //建筑类型 + sessionStorage.setItem("planId", "6475862544e5b20e1441ac23"); //预案ID + sessionStorage.setItem("companyId", "64756dbd912c6725e6010b8c"); //单位ID + this.http.post("/api/Account/SignIn", this.loginData).subscribe( + (data: any) => { + sessionStorage.setItem("level", data.level); + sessionStorage.setItem("token", data.token); + sessionStorage.setItem("refreshToken", data.refreshToken); + this.startUp(); + resolve("success"); + }, + (err) => { + //捕获错误 + const config = new MatSnackBarConfig(); + config.verticalPosition = "top"; + config.duration = 3000; + this.snackBar.open(err, "确定", config); + } + ); + }); } //登录 public timer; //刷新token定时器 //刷新token令牌定时器 - startUp = ():void=>{ - window.clearInterval(this.timer) //清一遍定时器 - this.timer = window.setInterval(()=>{ + startUp = (): void => { + window.clearInterval(this.timer); //清一遍定时器 + this.timer = window.setInterval(() => { var token = sessionStorage.getItem("token"); var refreshToken = sessionStorage.getItem("refreshToken"); - this.http.post('/api/Account/RefreshToken', { - token: token, - refreshToken: refreshToken - }).subscribe((data:any) => { - sessionStorage.setItem("level",data.level); - sessionStorage.setItem("token",data.token); - sessionStorage.setItem("refreshToken",data.refreshToken); - }) - },18*60*1000) - - } - - + this.http + .post("/api/Account/RefreshToken", { + token: token, + refreshToken: refreshToken, + }) + .subscribe((data: any) => { + sessionStorage.setItem("level", data.level); + sessionStorage.setItem("token", data.token); + sessionStorage.setItem("refreshToken", data.refreshToken); + }); + }, 18 * 60 * 1000); + }; //删除定时器 - delete = ():void=> { - window.clearInterval(this.timer) - } - - - + delete = (): void => { + window.clearInterval(this.timer); + }; } diff --git a/src/app/navigation/navigation.component.ts b/src/app/navigation/navigation.component.ts index cb8dd24..fc9b8fd 100644 --- a/src/app/navigation/navigation.component.ts +++ b/src/app/navigation/navigation.component.ts @@ -26,9 +26,9 @@ export class NavigationComponent implements OnInit { {name:'数据推送', url: '/ui/plan/basicInfo'}, {name:'处置要点', url: '/ui/disposalNode'}, {name:'区域危险源', url: '/ui/dangerous'}, - {name:'预案甄选', url: '/ui/similarPlans'}, + {name:'参考预案', url: '/ui/similarPlans'}, {name:'实例警示', url: '/ui/realCases'}, - {name:'预案赋能', url: '/ui/planAssistance'} + {name:'火场作图', url: '/ui/planAssistance'} ] ngOnInit () { diff --git a/src/app/ui/basicinfo-look/basicinfo.component.html b/src/app/ui/basicinfo-look/basicinfo.component.html index dd078bf..82b6f86 100644 --- a/src/app/ui/basicinfo-look/basicinfo.component.html +++ b/src/app/ui/basicinfo-look/basicinfo.component.html @@ -10,20 +10,19 @@
-
+
-
+
* 统一社会信用代码: - +
-
+
统一社会信用代码格式不正确
@@ -32,8 +31,10 @@ * 单位类型: - - {{item.name}} + + {{item.name}}
@@ -41,26 +42,23 @@ * 联系人: - +
* 联系电话: - + -
-
- 电话号码格式不正确 +
+
+ 电话号码格式不正确
@@ -68,30 +66,26 @@ * 辖区中队: - +
- -
+ +
* 单位地址: - - + + -
+
单位照片:
- +
- -
+ +
@@ -100,7 +94,7 @@
-->
- +
@@ -110,402 +104,430 @@ -
-
- - - -
- - -
-
- 建筑名称: - - - - * -
-
- 建筑类型: - - - {{n.name}} - - - * -
+
+
+ + + + + + +
+
+ 建筑名称: + + + + * +
+
+ 建筑类型: + + + {{n.name}} + + + * +
+ +
+

{{item.name}}

+
+ {{i.propertyName}}({{i.physicalUnit}}) -
-

{{item.name}}

-
- {{i.propertyName}}({{i.physicalUnit}}) - - - - + + - + - - - + + - - - - - - - * -
+ + + + + + + * +
- {{i.rulevalue}} -
+ {{i.rulevalue}}
- -
- -

自定义信息

-
-
- +

自定义信息

+
+
+ -
- - + + - - : - - + : + + - - * -
-
+ + * +
+
- -
- -
-
- 建筑名称: - - - - * -
-
- 建筑类型: - - - {{n.name}} - - - * -
-

{{item.buildingBasicGroups[0].name}}

-
- {{i.propertyName}} ({{i.physicalUnit}}) - - - - - +
+ +
+
+ 建筑名称: + + + + * +
+
+ 建筑类型: + + + {{n.name}} + + + * +
+

{{item.buildingBasicGroups[0].name}}

+
+ {{i.propertyName}} ({{i.physicalUnit}}) + : + + + + + - + - - - + + - - - - - - * -
+ + + + + + * +
{{i.rulevalue}}
-
-
- - -
-
- -

{{item.buildingBasicGroups[1].name}}

-
- - - - - - - - - - - - - - - - - - - - -
- - - 装置区名称* - - 工艺流程* - - 火灾危险性* - - 灭火注意事项 - -
+
+ +
- -

储罐信息

+ +

{{item.buildingBasicGroups[1].name}}

- +

储罐信息

+
+ + - - -
-
-

{{x[0].name}}

-
-
- {{i.propertyName}} {{i.physicalUnit}}: - - +
+

{{x[0].name}}

+
+
+ {{i.propertyName}} {{i.physicalUnit}}: + + - - - * -
- + [(ngModel)]="i.propertyValue"> + + + *
-

{{x[1].name}}

-
- - - + +
+ + +

{{x[1].name}}

+
+ + + - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - - - - - - - + + + + + - - - - + - - - - - -
- 罐区 - + + - 罐区编号* - + + + 罐区编号* + - 储存介质* - - 储罐类型* - - 容量(m³)* - - 直径(m)* - - 高度(m)* - - 顶盖形式 - + + + 储存介质* + + 储罐类型* + + 容量(m³)* + + 直径(m)* + + 高度(m)* + + 顶盖形式 + - 浮盘材质 - - 浮盘类型 - - 泡沫产生器型号 - - 泡沫产生器形式 - - 是否设置氮封惰化保护装置 - + + + 浮盘材质 + + 浮盘类型 + + 泡沫产生器型号 + + 泡沫产生器形式 + + 是否设置氮封惰化保护装置 + - 防护堤高度(m)* - - 半固定泡沫灭火接口数量 - + + + 防护堤高度(m)* + + 半固定泡沫灭火接口数量 + - 其它设施 - + + + 其它设施 + -
-
+ + + + +
- +
-
- -

自定义信息

-
-
- - -
- - + +

自定义信息

+
+
+ + +
+ + - - : - - + : + + - - * -
+ + *
-
- - - - - - - - - -
- -
- -
- +
+ + + + +
+
+
\ No newline at end of file diff --git a/src/app/ui/basicinfo-look/basicinfo.component.ts b/src/app/ui/basicinfo-look/basicinfo.component.ts index 5a2aa2a..26a4993 100644 --- a/src/app/ui/basicinfo-look/basicinfo.component.ts +++ b/src/app/ui/basicinfo-look/basicinfo.component.ts @@ -1,214 +1,236 @@ -import { Component, OnInit, Inject ,ViewChild} from '@angular/core'; -import { MatTreeFlatDataSource, MatTreeFlattener } from '@angular/material/tree'; -import { FlatTreeControl } from '@angular/cdk/tree'; -import { HttpClient,HttpHeaders, HttpEventType } from '@angular/common/http'; -import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; -import { FormControl } from '@angular/forms'; -import { MatSnackBar ,MatSnackBarConfig} from '@angular/material/snack-bar'; -import format from 'date-fns/format'; -import { TreeService } from '../../http-interceptors/tree.service' -import { FileUploader, FileItem } from 'ng2-file-upload' +import { Component, OnInit, Inject, ViewChild } from "@angular/core"; +import { + MatTreeFlatDataSource, + MatTreeFlattener, +} from "@angular/material/tree"; +import { FlatTreeControl } from "@angular/cdk/tree"; +import { HttpClient, HttpHeaders, HttpEventType } from "@angular/common/http"; +import { + MatDialog, + MatDialogRef, + MAT_DIALOG_DATA, +} from "@angular/material/dialog"; +import { FormControl } from "@angular/forms"; +import { MatSnackBar, MatSnackBarConfig } from "@angular/material/snack-bar"; +import format from "date-fns/format"; +import { TreeService } from "../../http-interceptors/tree.service"; +import { FileUploader, FileItem } from "ng2-file-upload"; // import { House } from '../../interface' -import { DomSanitizer } from '@angular/platform-browser' -import { Injectable } from "@angular/core" -import { filter } from 'rxjs/operators'; -import { async } from '@angular/core/testing'; -import { MatTableDataSource } from '@angular/material/table'; -import { isNgTemplate } from '@angular/compiler'; -import * as _ from 'lodash'; +import { DomSanitizer } from "@angular/platform-browser"; +import { Injectable } from "@angular/core"; +import { filter } from "rxjs/operators"; +import { async } from "@angular/core/testing"; +import { MatTableDataSource } from "@angular/material/table"; +import { isNgTemplate } from "@angular/compiler"; +import * as _ from "lodash"; // import Swiper from 'swiper'; -import { LookMaster2 } from './lookmaster.component' -import { Router,ActivatedRoute } from '@angular/router' -import {CacheTokenService} from '../../http-interceptors/cache-token.service' +import { LookMaster2 } from "./lookmaster.component"; +import { Router, ActivatedRoute } from "@angular/router"; +import { CacheTokenService } from "../../http-interceptors/cache-token.service"; @Component({ - selector: 'app-basicinfo-look', - templateUrl: './basicinfo.component.html', - styleUrls: ['./basicinfo.component.scss'] + selector: "app-basicinfo-look", + templateUrl: "./basicinfo.component.html", + styleUrls: ["./basicinfo.component.scss"], }) export class BasicinfoLookComponent implements OnInit { - unitinfo:any={ - id: '', - name: '', //单位信息名字 - usci: '', //单位信用代码 - contacts: '', //联系人 - phone: '', //联系电话 - address: '', //单位地址 - imageUrl: '', //图片地址 - location: '', //单位地理位置 - modifiedTime: '', //信息修改时间 - organizationId: '', //所属组织机构 - organizationName: '', //组织机构名称 + unitinfo: any = { + id: "", + name: "", //单位信息名字 + usci: "", //单位信用代码 + contacts: "", //联系人 + phone: "", //联系电话 + address: "", //单位地址 + imageUrl: "", //图片地址 + location: "", //单位地理位置 + modifiedTime: "", //信息修改时间 + organizationId: "", //所属组织机构 + organizationName: "", //组织机构名称 buildingTypes: [ { - id:'', - name:'' - } - ] - } - - uploader:FileUploader = new FileUploader({ //初始化上传事件 ng2-upload - url: `/api/Objects/PlanPlatform/${sessionStorage.getItem('companyId')}`, - method: "POST", + id: "", + name: "", + }, + ], + }; + + uploader: FileUploader = new FileUploader({ + //初始化上传事件 ng2-upload + url: `/api/Objects/PlanPlatform/${sessionStorage.getItem("companyId")}`, + method: "POST", itemAlias: "uploadedfile", autoUpload: false, - removeAfterUpload:true //上传之后是否在队列中移除,如果不移除就会出现无法上传第二次的情况 + removeAfterUpload: true, //上传之后是否在队列中移除,如果不移除就会出现无法上传第二次的情况 }); - - - - private _transformer = (node, level: number) => { //初始化tree + private _transformer = (node, level: number) => { + //初始化tree return { expandable: !!node.children && node.children.length > 0, name: node.name, level: level, id: node.id, parentId: node.parentId, - children: node.children + children: node.children, }; - } - treeControl = new FlatTreeControl(node => node.level, node => node.expandable); - treeFlattener = new MatTreeFlattener(this._transformer, node => node.level, node => node.expandable, node => node.children); + }; + treeControl = new FlatTreeControl( + (node) => node.level, + (node) => node.expandable + ); + treeFlattener = new MatTreeFlattener( + this._transformer, + (node) => node.level, + (node) => node.expandable, + (node) => node.children + ); dataSource = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener); - - myControl = new FormControl(); - isorganizationbox = false//控制辖区中队框的显示隐藏 - selectedorganization: any//所选的辖区中队 - selectedorganizationid:any //所选的辖区中队的id - highhouse = false//控制高层表单的显示 - houses: any = [] //存储当前单位的建筑信息 - defaultbuildingTypes :any //存储当前建筑的默认类型的id - buildingTypesname:any//存储当前建筑的默认类型name - buildingCustomData:any //存储当前建筑的自定义信息 - allunittype: any //所有单位类型 - allorganizing:any = [] //所有组织机构 - constructor(private router:Router,private route:ActivatedRoute,private http: HttpClient, private tree: TreeService, private sanitizer: DomSanitizer, public dialog: MatDialog,public snackBar: MatSnackBar,public isLogin:CacheTokenService) { } + myControl = new FormControl(); + isorganizationbox = false; //控制辖区中队框的显示隐藏 + selectedorganization: any; //所选的辖区中队 + selectedorganizationid: any; //所选的辖区中队的id + highhouse = false; //控制高层表单的显示 + houses: any = []; //存储当前单位的建筑信息 + defaultbuildingTypes: any; //存储当前建筑的默认类型的id + buildingTypesname: any; //存储当前建筑的默认类型name + buildingCustomData: any; //存储当前建筑的自定义信息 + allunittype: any; //所有单位类型 + allorganizing: any = []; //所有组织机构 + constructor( + private router: Router, + private route: ActivatedRoute, + private http: HttpClient, + private tree: TreeService, + private sanitizer: DomSanitizer, + public dialog: MatDialog, + public snackBar: MatSnackBar, + public isLogin: CacheTokenService + ) {} - unitId = sessionStorage.getItem('companyId') //当前单位id + unitId = sessionStorage.getItem("companyId"); //当前单位id ngOnInit(): void { - let token = sessionStorage.getItem('token') + let token = sessionStorage.getItem("token"); if (token) { - this.unitId = sessionStorage.getItem('companyId'); - this.getallunittype() - this.getorganization() - this.getunitallbuilding() + this.unitId = sessionStorage.getItem("companyId"); + this.getallunittype(); + this.getorganization(); + this.getunitallbuilding(); } else { - this.isLogin.login().then(res=>{ - this.unitId = sessionStorage.getItem('companyId'); - this.getallunittype() - this.getorganization() - this.getunitallbuilding() - }) + this.isLogin.login().then((res) => { + this.unitId = sessionStorage.getItem("companyId"); + this.getallunittype(); + this.getorganization(); + this.getunitallbuilding(); + }); } - } //获得所有单位类型 getallunittype() { - this.http.get("/api/BuildingTypes/Simple").subscribe(data => { - this.allunittype = data - }) + this.http.get("/api/BuildingTypes/Simple").subscribe((data) => { + this.allunittype = data; + }); } //获得所有组织机构 getorganization() { - this.http.get('/api/Organizations').subscribe( - (data: any) => { - this.allorganizing = data; - this.dataSource.data = this.tree.toTree(data); - this.getunitinfo(); - } - ) + this.http.get("/api/Organizations").subscribe((data: any) => { + this.allorganizing = data; + this.dataSource.data = this.tree.toTree(data); + this.getunitinfo(); + }); } //获得当前单位的基本信息 - getunitinfo(){ - this.http.get(`/api/Companies/${sessionStorage.getItem('companyId')}`).subscribe((data:any)=>{ - - // if(data.buildingTypes.length){ - // sessionStorage.setItem('buildingTypeId',data.buildingTypes[0].id) - // }else{ - // sessionStorage.setItem('buildingTypeId',"") - // } - let node - this.allorganizing.forEach(item => { - if(item.id == data.organizationId){ - node = item - } - }); - if(node){ - if(!node.parentId){ - this.selectedorganization = node.name - }else{ - let namearr = [node.name] - let targetId = node.parentId; // 临时变量 - for(let i = 0; i < node.level ; i++){ - this.allorganizing.forEach(item => { - if(item.id == targetId ){ - namearr.push(item.name) - targetId = item.parentId; // 临时变量更新没有副作用 - } + getunitinfo() { + this.http + .get(`/api/Companies/${sessionStorage.getItem("companyId")}`) + .subscribe((data: any) => { + // if(data.buildingTypes.length){ + // sessionStorage.setItem('buildingTypeId',data.buildingTypes[0].id) + // }else{ + // sessionStorage.setItem('buildingTypeId',"") + // } + let node; + this.allorganizing.forEach((item) => { + if (item.id == data.organizationId) { + node = item; + } + }); + if (node) { + if (!node.parentId) { + this.selectedorganization = node.name; + } else { + let namearr = [node.name]; + let targetId = node.parentId; // 临时变量 + for (let i = 0; i < node.level; i++) { + this.allorganizing.forEach((item) => { + if (item.id == targetId) { + namearr.push(item.name); + targetId = item.parentId; // 临时变量更新没有副作用 + } + }); + } + namearr.reverse(); + let str = ""; + namearr.forEach((item) => { + str += "/" + item; }); + this.selectedorganization = str.substr(1); } - namearr.reverse() - let str = '' - namearr.forEach(item=>{ - str += '/' + item - }) - this.selectedorganization = str.substr(1) } - } - - this.unitinfo = data - this.selectedorganizationid = data.organizationId - if(data.imageUrl){ - this.imgsrc = data.imageUrl - } - if(data.buildingTypes[0]){ - this.defaultbuildingTypes = data.buildingTypes[0].id - this.buildingTypesname = data.buildingTypes[0].name - } - }) + + this.unitinfo = data; + this.selectedorganizationid = data.organizationId; + if (data.imageUrl) { + console.log('图片地址', data.imageUrl) + this.imgsrc = data.imageUrl; + } + if (data.buildingTypes[0]) { + this.defaultbuildingTypes = data.buildingTypes[0].id; + this.buildingTypesname = data.buildingTypes[0].name; + } + }); } - unitallbuilding:any = []//用于存储当前单位所有的建筑 - buildinginfoId:any = []//用于存储当前单位所有具体建筑的id - presentbuildinfoId:any // 用于存储当前单位第一个建筑的id - bigfor:any//循环(储罐信息+罐区信息)大组 - npdata:any = [] - newnpdata:any //用于存储石油化工 储罐信息/罐区情况的 datasource + unitallbuilding: any = []; //用于存储当前单位所有的建筑 + buildinginfoId: any = []; //用于存储当前单位所有具体建筑的id + presentbuildinfoId: any; // 用于存储当前单位第一个建筑的id + bigfor: any; //循环(储罐信息+罐区信息)大组 + npdata: any = []; + newnpdata: any; //用于存储石油化工 储罐信息/罐区情况的 datasource - basicCategoryId:any //当前单位所有建筑中位于第一个的建筑id - deviceinfodata:any=[];//用于存储石油化工装置信息的数组 - zhuangzhiinfodatasource:any = [] //用于存储石油化工装置信息表格的数据来源 - newzhuangzhiinfodatasource:any= []//存储石油化工装置信息表格的 datasource形式 - devicedataSourcebox:any = [] //存储多个石油化工建筑的不同装置信息表格datasource + basicCategoryId: any; //当前单位所有建筑中位于第一个的建筑id + deviceinfodata: any = []; //用于存储石油化工装置信息的数组 + zhuangzhiinfodatasource: any = []; //用于存储石油化工装置信息表格的数据来源 + newzhuangzhiinfodatasource: any = []; //存储石油化工装置信息表格的 datasource形式 + devicedataSourcebox: any = []; //存储多个石油化工建筑的不同装置信息表格datasource - //数据格式化函数 将原始数据映射转化为表格需要的datasource formatHandle(list) { const result = [{}]; // tag 是从1开始,因此预置索引为0的项 list.forEach((item) => { const { tag, propertyName, propertyValue } = item; - if (result[tag] === undefined) { // 初始化对象 - result[tag] = {}; + if (result[tag] === undefined) { + // 初始化对象 + result[tag] = {}; } - const fieldMap = { // 字段映射,实现自动映射 - '罐区': 'tank', - '储罐编号': 'tankid', - '储存介质': 'tankmedium', - '储罐类型': 'tanktype', - '容量': 'tankcapacity', - '直径': 'tankdiameter', - '高度': 'tankheight', - '顶盖形式': 'tanktectum', - '浮盘材质': 'tanktexture', - '浮盘类型': 'platetype', - '泡沫产生器型号': 'foamgeneratorid', - '泡沫产生器形式': 'foamgeneratortype', - '是否设置氮封惰化保护装置': 'isprotect', - '防护堤高度': 'fendinggroyneheight', - '半固定泡沫灭火接口数量': 'portnum', - '其它设施': 'else' + const fieldMap = { + // 字段映射,实现自动映射 + 罐区: "tank", + 储罐编号: "tankid", + 储存介质: "tankmedium", + 储罐类型: "tanktype", + 容量: "tankcapacity", + 直径: "tankdiameter", + 高度: "tankheight", + 顶盖形式: "tanktectum", + 浮盘材质: "tanktexture", + 浮盘类型: "platetype", + 泡沫产生器型号: "foamgeneratorid", + 泡沫产生器形式: "foamgeneratortype", + 是否设置氮封惰化保护装置: "isprotect", + 防护堤高度: "fendinggroyneheight", + 半固定泡沫灭火接口数量: "portnum", + 其它设施: "else", }; result[tag][fieldMap[propertyName]] = propertyValue; }); @@ -217,57 +239,58 @@ export class BasicinfoLookComponent implements OnInit { } //将模板信息加工成附带自定义属性的信息 - getunithouse(data,n,x){ //data是原始模板在此基础上加工 n是当前建筑名称和建筑id、 x是当前循环的item信息 - data[0].buildingtypeId = n.id - data[0].name = x.name - data[0].username =x.name - data[0].buildtype = n.name - data[0].tongyong = true - data[0].index = x.index - if(data[0].buildtype == "石油化工类"){ - data[0].tongyong = false - data[0].isshiyou = true - this.deviceinfodata = data[0].buildingBasicGroups[1].propertyInfos //存储装置信息的初始数据,需要转换成datasource形式 - var map = [] - this.deviceinfodata.forEach((item,index) => { - if(item.tag == ""){ - item.tag = "1" + getunithouse(data, n, x) { + //data是原始模板在此基础上加工 n是当前建筑名称和建筑id、 x是当前循环的item信息 + data[0].buildingtypeId = n.id; + data[0].name = x.name; + data[0].username = x.name; + data[0].buildtype = n.name; + data[0].tongyong = true; + data[0].index = x.index; + if (data[0].buildtype == "石油化工类") { + data[0].tongyong = false; + data[0].isshiyou = true; + this.deviceinfodata = data[0].buildingBasicGroups[1].propertyInfos; //存储装置信息的初始数据,需要转换成datasource形式 + var map = []; + this.deviceinfodata.forEach((item, index) => { + if (item.tag == "") { + item.tag = "1"; } - if(!(item.tag in map)){ - map[item.tag] = [] + if (!(item.tag in map)) { + map[item.tag] = []; } - map[item.tag].push(item) + map[item.tag].push(item); }); - let zhuangzhiinfodatasource = [] - map.forEach((item,index)=>{ - zhuangzhiinfodatasource[index] = {} - item.forEach(i => { + let zhuangzhiinfodatasource = []; + map.forEach((item, index) => { + zhuangzhiinfodatasource[index] = {}; + item.forEach((i) => { if (i.propertyName == "装置区名称") { - zhuangzhiinfodatasource[index].name = i.propertyValue + zhuangzhiinfodatasource[index].name = i.propertyValue; } if (i.propertyName == "工艺流程") { - zhuangzhiinfodatasource[index].flow = i.propertyValue + zhuangzhiinfodatasource[index].flow = i.propertyValue; } if (i.propertyName == "火灾危险性") { - zhuangzhiinfodatasource[index].danger = i.propertyValue + zhuangzhiinfodatasource[index].danger = i.propertyValue; } if (i.propertyName == "灭火注意事项") { - zhuangzhiinfodatasource[index].payattentionto = i.propertyValue + zhuangzhiinfodatasource[index].payattentionto = i.propertyValue; } }); - }) - this.newzhuangzhiinfodatasource =[] //数据去空 - zhuangzhiinfodatasource.forEach(item=>{ - if(item !== "" && item != undefined){ - this.newzhuangzhiinfodatasource.push(item) + }); + this.newzhuangzhiinfodatasource = []; //数据去空 + zhuangzhiinfodatasource.forEach((item) => { + if (item !== "" && item != undefined) { + this.newzhuangzhiinfodatasource.push(item); } - }) - this.devicedataSourcebox[data[0].buildingId] = new MatTableDataSource(this.newzhuangzhiinfodatasource) - data[0].newzhuangzhiinfodatasource = this.newzhuangzhiinfodatasource + }); + this.devicedataSourcebox[data[0].buildingId] = + new MatTableDataSource(this.newzhuangzhiinfodatasource); + data[0].newzhuangzhiinfodatasource = this.newzhuangzhiinfodatasource; - //把bigfor分组取出来 先大循环 (储罐信息---储罐信息/罐区情况)为一组 - let noemptybigfordata = data[0].buildingBasicGroups + let noemptybigfordata = data[0].buildingBasicGroups; // if(noemptybigfordata.length > 4){ // noemptybigfordata.forEach((item,index) => { // if(!item.submitted && item.name !="装置信息"){ @@ -275,695 +298,758 @@ export class BasicinfoLookComponent implements OnInit { // } // }) // } - let bigtankgroups = noemptybigfordata.slice(2) + let bigtankgroups = noemptybigfordata.slice(2); // console.log("bigtankgroups",bigtankgroups) let proportion = 2; //按照比例切割 let num = 0; - let bigfor =[]; - for(let i=0;i{ - item[1].propertyInfos.forEach(item => { - if(item.tag == ""){ - item.tag = 1 + + bigfor.forEach((item) => { + item[1].propertyInfos.forEach((item) => { + if (item.tag == "") { + item.tag = 1; } }); - item[1].propertyInfos = this.formatHandle(item[1].propertyInfos) - - }) - data[0].bigfor = bigfor + item[1].propertyInfos = this.formatHandle(item[1].propertyInfos); + }); + data[0].bigfor = bigfor; } // if(data[0].buildtype == "地铁类"){ // data[0].tongyong = true // // data[0].ditie = true // } - return data[0] + return data[0]; } //点击建筑自定义信息的checkbox - isCustomData = false - checkCustomData(e){ - this.isCustomData = e.checked + isCustomData = false; + checkCustomData(e) { + this.isCustomData = e.checked; } //增加自定义信息行数 - addCustomData(item){ + addCustomData(item) { item.buildingCustomData.customProperties.push({ - name: "", - value: "" - }) + name: "", + value: "", + }); } //删除自定义信息行数 - deleteCustomData(item){ - item.buildingCustomData.customProperties.pop() + deleteCustomData(item) { + item.buildingCustomData.customProperties.pop(); } //得到建筑信息数据并进行处理 - allBuildings:any - getunitallbuilding(){ - this.houses = [] - this.unitId = sessionStorage.getItem('companyId') - this.http.get("/api/Buildings",{ - params:{ - companyId:this.unitId - } - }).subscribe(async (data:any)=>{ // 获得当前单位所有的建筑 - this.allBuildings = data - // console.log(data) - if(data.length != 0){ - this.basicCategoryId = data[0].buildingTypes[0].id - this.presentbuildinfoId = data[0].id // 用于存储当前单位第一个建筑的id - for (let i = 0, length = data.length; i < length; i++) {//循环所有建筑 - const n = data[i]; - const index = i; - this.buildinginfoId.push(n.id) - const result = await new Promise((resolve) => { - this.http.get("/api/BuildingBasicInfos",{ // 循环请求当前单位建筑每一个建筑的信息保存到数组中 - params:{ - companyId :this.unitId, - buildingId:n.id, - buildingType:n.buildingTypes[0].id - } - }).subscribe((data)=>{ - //获得当前建筑自定义信息并且添加到item自定义属性上 - let _data = data - this.http.get("/api/BuildingCustomData",{params:{ - buildingId:n.id - }}).subscribe((data:any)=>{ - _data[0].buildingCustomData = data - if(data && data.customProperties.length != 0){ - _data[0].isCustomData = true - }else{ - _data[0].isCustomData = false - _data[0].buildingCustomData ={ - id: "", - customProperties: [ - { - name: "", - value: "" + allBuildings: any; + getunitallbuilding() { + this.houses = []; + this.unitId = sessionStorage.getItem("companyId"); + this.http + .get("/api/Buildings", { + params: { + companyId: this.unitId, + }, + }) + .subscribe(async (data: any) => { + // 获得当前单位所有的建筑 + this.allBuildings = data; + // console.log(data) + if (data.length != 0) { + this.basicCategoryId = data[0].buildingTypes[0].id; + this.presentbuildinfoId = data[0].id; // 用于存储当前单位第一个建筑的id + for (let i = 0, length = data.length; i < length; i++) { + //循环所有建筑 + const n = data[i]; + const index = i; + this.buildinginfoId.push(n.id); + const result = await new Promise((resolve) => { + this.http + .get("/api/BuildingBasicInfos", { + // 循环请求当前单位建筑每一个建筑的信息保存到数组中 + params: { + companyId: this.unitId, + buildingId: n.id, + buildingType: n.buildingTypes[0].id, + }, + }) + .subscribe((data) => { + //获得当前建筑自定义信息并且添加到item自定义属性上 + let _data = data; + this.http + .get("/api/BuildingCustomData", { + params: { + buildingId: n.id, + }, + }) + .subscribe((data: any) => { + _data[0].buildingCustomData = data; + if (data && data.customProperties.length != 0) { + _data[0].isCustomData = true; + } else { + _data[0].isCustomData = false; + _data[0].buildingCustomData = { + id: "", + customProperties: [ + { + name: "", + value: "", + }, + ], + buildingId: _data[0].buildingId, + }; + } + }); + //为每个建筑添加自定义属性 + data[0].buildingtypeId = n.buildingTypes[0].id; + data[0].name = n.name; + data[0].username = n.name; + data[0].buildtype = n.buildingTypes[0].name; + data[0].tongyong = true; + data[0].index = index; + + if (data[0].buildtype == "石油化工类") { + data[0].tongyong = false; + data[0].isshiyou = true; + let noemptydeviceArr = + data[0].buildingBasicGroups[1].propertyInfos; + noemptydeviceArr.forEach((item, index) => { + if (item.tag == "") { + noemptydeviceArr.splice(index, 1); + } + }); + this.deviceinfodata = noemptydeviceArr; //存储装置信息的初始数据,需要转换成datasource形式 + var map = []; + this.deviceinfodata.forEach((item, index) => { + if (!data[0].buildingBasicGroups[1].submitted) { + if (item.tag == "") { + item.tag = "1"; } - ], - buildingId: _data[0].buildingId - } - } - }) - //为每个建筑添加自定义属性 - data[0].buildingtypeId = n.buildingTypes[0].id - data[0].name = n.name - data[0].username = n.name - data[0].buildtype = n.buildingTypes[0].name - data[0].tongyong = true - data[0].index = index + } - if(data[0].buildtype == "石油化工类"){ - data[0].tongyong = false - data[0].isshiyou = true - let noemptydeviceArr = data[0].buildingBasicGroups[1].propertyInfos - noemptydeviceArr.forEach((item,index) => { - if(item.tag == ""){ - noemptydeviceArr.splice(index,1) - } - }); - this.deviceinfodata = noemptydeviceArr //存储装置信息的初始数据,需要转换成datasource形式 - var map = [] - this.deviceinfodata.forEach((item,index) => { - if(!data[0].buildingBasicGroups[1].submitted){ - if(item.tag == ""){ - item.tag = "1" - } - } + if (!(item.tag in map)) { + map[item.tag] = []; + } + map[item.tag].push(item); + }); + let zhuangzhiinfodatasource = []; + map.forEach((item, index) => { + zhuangzhiinfodatasource[index] = {}; + item.forEach((i) => { + if (i.propertyName == "装置区名称") { + zhuangzhiinfodatasource[index].name = i.propertyValue; + } + if (i.propertyName == "工艺流程") { + zhuangzhiinfodatasource[index].flow = i.propertyValue; + } + if (i.propertyName == "火灾危险性") { + zhuangzhiinfodatasource[index].danger = + i.propertyValue; + } + if (i.propertyName == "灭火注意事项") { + zhuangzhiinfodatasource[index].payattentionto = + i.propertyValue; + } + }); + }); + this.newzhuangzhiinfodatasource = []; //数据去空 + zhuangzhiinfodatasource.forEach((item) => { + if (item !== "" && item != undefined) { + this.newzhuangzhiinfodatasource.push(item); + } + }); + this.devicedataSourcebox[data[0].buildingId] = + new MatTableDataSource( + this.newzhuangzhiinfodatasource + ); + data[0].newzhuangzhiinfodatasource = + this.newzhuangzhiinfodatasource; - if(!(item.tag in map)){ - map[item.tag] = [] - } - map[item.tag].push(item) - }); - let zhuangzhiinfodatasource = [] - map.forEach((item,index)=>{ - zhuangzhiinfodatasource[index] = {} - item.forEach(i => { - if (i.propertyName == "装置区名称") { - zhuangzhiinfodatasource[index].name = i.propertyValue - } - if (i.propertyName == "工艺流程") { - zhuangzhiinfodatasource[index].flow = i.propertyValue - } - if (i.propertyName == "火灾危险性") { - zhuangzhiinfodatasource[index].danger = i.propertyValue - } - if (i.propertyName == "灭火注意事项") { - zhuangzhiinfodatasource[index].payattentionto = i.propertyValue - } - }); - }) - this.newzhuangzhiinfodatasource =[] //数据去空 - zhuangzhiinfodatasource.forEach(item=>{ - if(item !== "" && item != undefined){ - this.newzhuangzhiinfodatasource.push(item) - } - }) - this.devicedataSourcebox[data[0].buildingId] = new MatTableDataSource(this.newzhuangzhiinfodatasource) - data[0].newzhuangzhiinfodatasource = this.newzhuangzhiinfodatasource - - //把bigfor分组取出来 先大循环 (储罐信息---储罐信息/罐区情况)为一组 - let noemptybigfordata = data[0].buildingBasicGroups + //把bigfor分组取出来 先大循环 (储罐信息---储罐信息/罐区情况)为一组 + let noemptybigfordata = data[0].buildingBasicGroups; - let bigtankgroups = noemptybigfordata.slice(2) - let proportion = 2; //按照比例切割 - let num = 0; - let bigfor =[]; - for(let i=0;i{ - - item[1].propertyInfos = this.formatHandle(item[1].propertyInfos) - - }) - data[0].bigfor = bigfor - } - resolve(data[0]) //把数据传递出去 - }) - }) - this.houses.push(result) // 并且把他添加到 tab 总体数组中 + //bigfor决定当前储罐分组有几个 + bigfor.forEach((item, index) => { + item[1].propertyInfos = this.formatHandle( + item[1].propertyInfos + ); + }); + data[0].bigfor = bigfor; + } + resolve(data[0]); //把数据传递出去 + }); + }); + this.houses.push(result); // 并且把他添加到 tab 总体数组中 + } } - } - // console.log(666,this.houses) - }) - + // console.log(666,this.houses) + }); } - unitinfotemplate:any //存储选择不同单位类型时的模板信息 - displayedColumns: string[]=['name', 'flow','danger','payattentionto']; - displayedColumns2: string[]=['tank','tankid', 'tankmedium','tanktype','tankcapacity','tankdiameter', 'tankheight','tanktectum','tanktexture','platetype', 'foamgeneratorid','foamgeneratortype','isprotect','fendinggroyneheight', 'portnum','else']; - devicedataSource:any; //存储石油化工模板中的装置信息表格 - tankinfodatabox:any = [ - [] - ] + unitinfotemplate: any; //存储选择不同单位类型时的模板信息 + displayedColumns: string[] = ["name", "flow", "danger", "payattentionto"]; + displayedColumns2: string[] = [ + "tank", + "tankid", + "tankmedium", + "tanktype", + "tankcapacity", + "tankdiameter", + "tankheight", + "tanktectum", + "tanktexture", + "platetype", + "foamgeneratorid", + "foamgeneratortype", + "isprotect", + "fendinggroyneheight", + "portnum", + "else", + ]; + devicedataSource: any; //存储石油化工模板中的装置信息表格 + tankinfodatabox: any = [[]]; // dataSourceArr = [] - tankinfodata:any=[];//用于存储石油化工储罐信息的数组 - adddeviceinfo2(e,item){//点击加一行 视图上多一行 + tankinfodata: any = []; //用于存储石油化工储罐信息的数组 + adddeviceinfo2(e, item) { + //点击加一行 视图上多一行 item.bigfor[e][1].propertyInfos.push({ - tank:"", - tankid:"", - tankmedium:"", - tanktype:"", - tankcapacity:"", - tankdiameter:"", - tankheight:"", - tanktectum:"", - tanktexture:"", - platetype:"", - foamgeneratorid:"", - foamgeneratortype:"", - isprotect:"", - fendinggroyneheight:"", - portnum:"", - else:"" - }) - item.bigfor[e][1].propertyInfos = [...item.bigfor[e][1].propertyInfos] + tank: "", + tankid: "", + tankmedium: "", + tanktype: "", + tankcapacity: "", + tankdiameter: "", + tankheight: "", + tanktectum: "", + tanktexture: "", + platetype: "", + foamgeneratorid: "", + foamgeneratortype: "", + isprotect: "", + fendinggroyneheight: "", + portnum: "", + else: "", + }); + item.bigfor[e][1].propertyInfos = [...item.bigfor[e][1].propertyInfos]; } - removedeviceinfo3(e,item){//点击减一行 - var isdeleted = confirm("确定要删除末行吗?") - if(isdeleted){ - if(item.bigfor[e][1].propertyInfos.length > 1){ - item.bigfor[e][1].propertyInfos.pop() - }else{ + removedeviceinfo3(e, item) { + //点击减一行 + var isdeleted = confirm("确定要删除末行吗?"); + if (isdeleted) { + if (item.bigfor[e][1].propertyInfos.length > 1) { + item.bigfor[e][1].propertyInfos.pop(); + } else { const config = new MatSnackBarConfig(); - config.verticalPosition = 'top'; - config.duration = 3000 - this.snackBar.open('只剩一行,无法删除','确定',config); + config.verticalPosition = "top"; + config.duration = 3000; + this.snackBar.open("只剩一行,无法删除", "确定", config); } - item.bigfor[e][1].propertyInfos = [...item.bigfor[e][1].propertyInfos] + item.bigfor[e][1].propertyInfos = [...item.bigfor[e][1].propertyInfos]; } - } - //增加储罐大分组 //在石油化工模板种点击增加储罐信息 //获得模板信息 - templateinfo:any - gettemplateinfo(typeid){ - - } - - addtankbox(item,bigkey){ - this.http.get("/api/CompanyAccount/BasicInfos",{ - params:{ - companyId : this.unitId, - buildingType:item.buildingtypeId - } - }).subscribe((data:any)=>{ - // console.log(1314,data) - // console.log(777,data[0]) - item.bigfor.push([ - { - id: "", - name: "罐区"+ (item.bigfor.length+ 1), - type: 0, - addMode: 2, - basicGroupId:'', - basicCategoryId: item.basicCategoryId, - buildingBasicId: null, - buildingId: item.buildingId, - companyId: this.unitinfo.id, - enabled: true, - order: item.bigfor.length+2, - propertyInfos:data[0].buildingBasicGroups[2].propertyInfos + templateinfo: any; + gettemplateinfo(typeid) {} + + addtankbox(item, bigkey) { + this.http + .get("/api/CompanyAccount/BasicInfos", { + params: { + companyId: this.unitId, + buildingType: item.buildingtypeId, }, - { - addMode: 2, - basicCategoryId:item.basicCategoryId, - buildingBasicId:null, - buildingId: item.buildingId, - companyId: this.unitinfo.id, - enabled: true, - basicGroupId:'', - id: "", - name: "罐区" + (item.bigfor.length+ 1) +"/储罐信息", - order: item.bigfor.length+3, - propertyInfos: [ - { - else: "", - fendinggroyneheight: "", - foamgeneratorid: "", - foamgeneratortype: "", - isprotect: "", - platetype: "", - portnum: "", - tank: "", - tankcapacity: "", - tankdiameter: "", - tankheight: "", - tankid: "", - tankmedium: "", - tanktectum: "", - tanktexture: "", - tanktype: "" - } - ], - type: 1 - } - - ]) - }) - + }) + .subscribe((data: any) => { + // console.log(1314,data) + // console.log(777,data[0]) + item.bigfor.push([ + { + id: "", + name: "罐区" + (item.bigfor.length + 1), + type: 0, + addMode: 2, + basicGroupId: "", + basicCategoryId: item.basicCategoryId, + buildingBasicId: null, + buildingId: item.buildingId, + companyId: this.unitinfo.id, + enabled: true, + order: item.bigfor.length + 2, + propertyInfos: data[0].buildingBasicGroups[2].propertyInfos, + }, + { + addMode: 2, + basicCategoryId: item.basicCategoryId, + buildingBasicId: null, + buildingId: item.buildingId, + companyId: this.unitinfo.id, + enabled: true, + basicGroupId: "", + id: "", + name: "罐区" + (item.bigfor.length + 1) + "/储罐信息", + order: item.bigfor.length + 3, + propertyInfos: [ + { + else: "", + fendinggroyneheight: "", + foamgeneratorid: "", + foamgeneratortype: "", + isprotect: "", + platetype: "", + portnum: "", + tank: "", + tankcapacity: "", + tankdiameter: "", + tankheight: "", + tankid: "", + tankmedium: "", + tanktectum: "", + tanktexture: "", + tanktype: "", + }, + ], + type: 1, + }, + ]); + }); } //移除储罐大分组 - removetankbox(item,bigkey){ - if(item.bigfor.length > 1){ - var isdeleted = confirm("确定要删除末尾储罐分组吗?") - if(isdeleted){ - item.bigfor.pop() - } - }else{ + removetankbox(item, bigkey) { + if (item.bigfor.length > 1) { + var isdeleted = confirm("确定要删除末尾储罐分组吗?"); + if (isdeleted) { + item.bigfor.pop(); + } + } else { const config = new MatSnackBarConfig(); - config.verticalPosition = 'top'; - config.duration = 3000 - this.snackBar.open('只剩唯一储罐,无法删除','确定',config); + config.verticalPosition = "top"; + config.duration = 3000; + this.snackBar.open("只剩唯一储罐,无法删除", "确定", config); } } //新建建筑时把原始建筑数据放进来进行加工处理成可用数据 - async changebuildingdata(data){ - let n = data - let yyy - let result = await new Promise(resolve=>{ - this.http.get("/api/BuildingBasicInfos",{ // 需要请求建筑信息的模板 - params:{ - companyId : this.unitId, - buildingId:data.id, - buildingType:data.buildingTypes[0].id - } - }).subscribe((data)=>{//此时的data才是模板详细信息 - let _data = data - this.http.get("/api/BuildingCustomData",{params:{ //-----处理建筑自定义属性部分 - buildingId:n.id - }}).subscribe(data=>{ - if(data){ - _data[0].isCustomData = true //如果data存在则把自定义属性isCustomData设为true - _data[0].buildingCustomData = data //把建筑自定义信息赋给buildingCustomData自定义属性 - }else{ - _data[0].isCustomData = false - _data[0].buildingCustomData ={ //否则设为false,并且把自定义信息属性赋值为空 + async changebuildingdata(data) { + let n = data; + let yyy; + let result = await new Promise((resolve) => { + this.http + .get("/api/BuildingBasicInfos", { + // 需要请求建筑信息的模板 + params: { + companyId: this.unitId, + buildingId: data.id, + buildingType: data.buildingTypes[0].id, + }, + }) + .subscribe((data) => { + //此时的data才是模板详细信息 + let _data = data; + this.http + .get("/api/BuildingCustomData", { + params: { + //-----处理建筑自定义属性部分 + buildingId: n.id, + }, + }) + .subscribe((data) => { + if (data) { + _data[0].isCustomData = true; //如果data存在则把自定义属性isCustomData设为true + _data[0].buildingCustomData = data; //把建筑自定义信息赋给buildingCustomData自定义属性 + } else { + _data[0].isCustomData = false; + _data[0].buildingCustomData = { + //否则设为false,并且把自定义信息属性赋值为空 id: "", customProperties: [ { name: "", - value: "" - } + value: "", + }, ], - buildingId: _data[0].buildingId + buildingId: _data[0].buildingId, + }; } - } - }) - data[0].buildingtypeId = n.buildingTypes[0].id - data[0].buildtype = n.buildingTypes[0].name - data[0].name = n.name - data[0].username = n.name - data[0].tongyong = true - data[0].index = this.houses.length ////////////////// - if(data[0].buildtype == "石油化工类"){ - data[0].tongyong = false - data[0].isshiyou = true //如果是石油化工则启用石油化工的模板 - this.deviceinfodata = data[0].buildingBasicGroups[1].propertyInfos //存储装置信息表格的初始数据,需要转换成datasource形式 - var map = [] - this.deviceinfodata.forEach((item,index) => { - if(item.tag == ""){ - item.tag = "1" + }); + data[0].buildingtypeId = n.buildingTypes[0].id; + data[0].buildtype = n.buildingTypes[0].name; + data[0].name = n.name; + data[0].username = n.name; + data[0].tongyong = true; + data[0].index = this.houses.length; ////////////////// + if (data[0].buildtype == "石油化工类") { + data[0].tongyong = false; + data[0].isshiyou = true; //如果是石油化工则启用石油化工的模板 + this.deviceinfodata = data[0].buildingBasicGroups[1].propertyInfos; //存储装置信息表格的初始数据,需要转换成datasource形式 + var map = []; + this.deviceinfodata.forEach((item, index) => { + if (item.tag == "") { + item.tag = "1"; } - if(!(item.tag in map)){ - map[item.tag] = [] + if (!(item.tag in map)) { + map[item.tag] = []; } - map[item.tag].push(item) + map[item.tag].push(item); }); - let zhuangzhiinfodatasource = [] - map.forEach((item,index)=>{ - zhuangzhiinfodatasource[index] = {} - item.forEach(i => { + let zhuangzhiinfodatasource = []; + map.forEach((item, index) => { + zhuangzhiinfodatasource[index] = {}; + item.forEach((i) => { if (i.propertyName == "装置区名称") { - zhuangzhiinfodatasource[index].name = i.propertyValue + zhuangzhiinfodatasource[index].name = i.propertyValue; } if (i.propertyName == "工艺流程") { - zhuangzhiinfodatasource[index].flow = i.propertyValue + zhuangzhiinfodatasource[index].flow = i.propertyValue; } if (i.propertyName == "火灾危险性") { - zhuangzhiinfodatasource[index].danger = i.propertyValue + zhuangzhiinfodatasource[index].danger = i.propertyValue; } if (i.propertyName == "灭火注意事项") { - zhuangzhiinfodatasource[index].payattentionto = i.propertyValue + zhuangzhiinfodatasource[index].payattentionto = + i.propertyValue; } }); - }) - this.newzhuangzhiinfodatasource =[] //数据去空 - zhuangzhiinfodatasource.forEach(item=>{ - if(item !== "" && item != undefined){ - this.newzhuangzhiinfodatasource.push(item) + }); + this.newzhuangzhiinfodatasource = []; //数据去空 + zhuangzhiinfodatasource.forEach((item) => { + if (item !== "" && item != undefined) { + this.newzhuangzhiinfodatasource.push(item); } - }) - this.devicedataSourcebox[data[0].buildingId] = new MatTableDataSource(this.newzhuangzhiinfodatasource) //强制渲染表格 - data[0].newzhuangzhiinfodatasource = this.newzhuangzhiinfodatasource + }); + this.devicedataSourcebox[data[0].buildingId] = + new MatTableDataSource(this.newzhuangzhiinfodatasource); //强制渲染表格 + data[0].newzhuangzhiinfodatasource = + this.newzhuangzhiinfodatasource; - //把bigfor分组取出来 先大循环 (储罐信息---储罐信息/罐区情况)为一组 - let bigtankgroups = data[0].buildingBasicGroups.slice(2) + let bigtankgroups = data[0].buildingBasicGroups.slice(2); let proportion = 2; //按照比例切割 let num = 0; - let bigfor =[]; - for(let i=0;i{ - item[1].propertyInfos.forEach(item => { - if(item.tag == ""){ - item.tag = 1 + + bigfor.forEach((item) => { + item[1].propertyInfos.forEach((item) => { + if (item.tag == "") { + item.tag = 1; } }); - item[1].propertyInfos = this.formatHandle(item[1].propertyInfos) - }) - data[0].bigfor = bigfor + item[1].propertyInfos = this.formatHandle(item[1].propertyInfos); + }); + data[0].bigfor = bigfor; } - if(data[0].buildtype == "地铁类"){ - data[0].tongyong = true - // data[0].ditie = true - } - yyy = data[0] - resolve(yyy) - }) - }) - return result + if (data[0].buildtype == "地铁类") { + data[0].tongyong = true; + // data[0].ditie = true + } + yyy = data[0]; + resolve(yyy); + }); + }); + return result; } - - //点击不同的tab选项 - selecttab(e) { - } + selecttab(e) {} - FunData(e){//切割数组 + FunData(e) { + //切割数组 let proportion = 2; //按照比例切割 let num = 0; - let _data =[]; - for(let i=0;i { - if(item.id == targetId ){ - namearr.push(item.name) + for (let i = 0; i < node.level; i++) { + this.allorganizing.forEach((item) => { + if (item.id == targetId) { + namearr.push(item.name); targetId = item.parentId; // 临时变量更新没有副作用 } }); } - namearr.reverse() - let str = '' - namearr.forEach(item=>{ - str += '/' + item - }) - - this.selectedorganization = str.substr(1) + namearr.reverse(); + let str = ""; + namearr.forEach((item) => { + str += "/" + item; + }); + + this.selectedorganization = str.substr(1); } -} + } //关闭辖区中队隐藏框 closeorganizationbox() { - this.isorganizationbox = false + this.isorganizationbox = false; } //打开辖区中队隐藏框 openorganizationbox() { - this.isorganizationbox = true + this.isorganizationbox = true; } hasChild = (_: number, node: any) => node.expandable; - + // imgsrc = "../../../assets/upload.jpg" //没有上传图片时显示的图片,当上传后就会被替换,即保存时需要传的图片地址参数 - imgsrc = "" - imgUrl = ""//返回来的图片地址后缀 + imgsrc = ""; + imgUrl = ""; //返回来的图片地址后缀 file: any; //上传的文件 objectName: any; //上传对象名 uploadId: any; //上传分块上传事件编号 - isspinner:boolean=false //控制进度圈的显示隐藏 + isspinner: boolean = false; //控制进度圈的显示隐藏 PartNumberETag: any = []; //分块上传每次返回需要保存的信息 //change选择文件 filechange(e) { - this.file = e.target.files[0] || null //上传的文件 + this.file = e.target.files[0] || null; //上传的文件 var reader = new FileReader(); reader.readAsDataURL(this.file); - var image:any = new Image(); - reader.onload = function(){ - image.src = reader.result - } + var image: any = new Image(); + reader.onload = function () { + image.src = reader.result; + }; setTimeout(() => { - if(image.width>=4096 || image.height>=5000 ){ + if (image.width >= 4096 || image.height >= 5000) { const config = new MatSnackBarConfig(); - config.verticalPosition = 'top'; - config.duration = 3000 - this.snackBar.open('请选择分辨率小于4096*5000的图片','确定',config); - }else{ - if(this.file){ - this.startUploading() + config.verticalPosition = "top"; + config.duration = 3000; + this.snackBar.open("请选择分辨率小于4096*5000的图片", "确定", config); + } else { + if (this.file) { + this.startUploading(); } } - }, 500); - } + } //查看单位大图 - lookmaster(){ - const dialogRef = this.dialog.open(LookMaster2, {//调用open方法打开对话框并且携带参数过去 - width: '1600px', - height:'900px', - data: {img:this.imgsrc} + lookmaster() { + const dialogRef = this.dialog.open(LookMaster2, { + //调用open方法打开对话框并且携带参数过去 + width: "1600px", + height: "900px", + data: { img: this.imgsrc }, }); - dialogRef.afterClosed().subscribe( - - ); + dialogRef.afterClosed().subscribe(); } //上传文件 startUploading() { - this.isspinner = true - let file = this.file || null //获取上传的文件 - let fileSize = file.size || null //上传文件的总大小 - let shardSize = 5 * 1024 * 1024 //5MB一个分片 + this.isspinner = true; + let file = this.file || null; //获取上传的文件 + let fileSize = file.size || null; //上传文件的总大小 + let shardSize = 5 * 1024 * 1024; //5MB一个分片 - if (file && fileSize <= shardSize) { //上传文件<=5MB时 + if (file && fileSize <= shardSize) { + //上传文件<=5MB时 // this.upload() - let formData = new FormData() - formData.append("file",file) - this.http.post(`/api/Objects/PlanPlatform/${sessionStorage.getItem('companyId')}`,formData).subscribe((data:any)=>{ - this.isspinner = false - this.imgUrl = data.objectName - this.imgsrc = `/api/Objects/PlanPlatform/${this.imgUrl}?x-oss-process=image/resize,m_fill,h_170,w_299` - const config = new MatSnackBarConfig(); - config.verticalPosition = 'top'; - config.duration = 3000 - this.snackBar.open('上传成功','确定',config); - }) - } else if (file && fileSize >= shardSize) { //上传文件>5MB时,分块上传 + let formData = new FormData(); + formData.append("file", file); + this.http + .post( + `/api/Objects/PlanPlatform/${sessionStorage.getItem("companyId")}`, + formData + ) + .subscribe((data: any) => { + this.isspinner = false; + this.imgUrl = data.objectName; + this.imgsrc = `/api/Objects/PlanPlatform/${this.imgUrl}?x-oss-process=image/resize,m_fill,h_170,w_299`; + const config = new MatSnackBarConfig(); + config.verticalPosition = "top"; + config.duration = 3000; + this.snackBar.open("上传成功", "确定", config); + }); + } else if (file && fileSize >= shardSize) { + //上传文件>5MB时,分块上传 - let data = { filename: file.name } - this.http.post(`/api/NewMultipartUpload/PlanPlatform/${this.unitinfo.id}`, {}, { params: data }).subscribe((data: any) => { //初始化分段上传 - this.objectName = data.objectName - this.uploadId = data.uploadId - this.subsectionUploading() - }) + let data = { filename: file.name }; + this.http + .post( + `/api/NewMultipartUpload/PlanPlatform/${this.unitinfo.id}`, + {}, + { params: data } + ) + .subscribe((data: any) => { + //初始化分段上传 + this.objectName = data.objectName; + this.uploadId = data.uploadId; + this.subsectionUploading(); + }); } } - - - - //小于5MB不需要分块上传 - upload(){ - this.uploader.queue[0].upload();//开始上传 - this.uploader.queue[0].onSuccess = (response, status, headers) => { - // 上传文件成功 + //小于5MB不需要分块上传 + upload() { + this.uploader.queue[0].upload(); //开始上传 + this.uploader.queue[0].onSuccess = (response, status, headers) => { + // 上传文件成功 if (status == 201) { - // 上传文件后获取服务器返回的数据 + // 上传文件后获取服务器返回的数据 const config = new MatSnackBarConfig(); - config.verticalPosition = 'top'; - config.duration = 3000 - this.snackBar.open('上传成功','确定',config); - this.isspinner = false + config.verticalPosition = "top"; + config.duration = 3000; + this.snackBar.open("上传成功", "确定", config); + this.isspinner = false; let tempRes = JSON.parse(response); - this.imgUrl = tempRes.objectName - this.imgsrc = `/api/Objects/PlanPlatform/${this.imgUrl}?x-oss-process=image/resize,m_fill,h_170,w_299` - }else { - // 上传文件后获取服务器返回的数据错误 + this.imgUrl = tempRes.objectName; + this.imgsrc = `/api/Objects/PlanPlatform/${this.imgUrl}?x-oss-process=image/resize,m_fill,h_170,w_299`; + } else { + // 上传文件后获取服务器返回的数据错误 } }; - this.uploader.queue[0].onError = (response, status, headers) => { + this.uploader.queue[0].onError = (response, status, headers) => { if (status == 401) { const config = new MatSnackBarConfig(); - config.verticalPosition = 'top'; - config.duration = 3000 - this.snackBar.open('上传失败','确定',config); + config.verticalPosition = "top"; + config.duration = 3000; + this.snackBar.open("上传失败", "确定", config); } }; } - + //开始分块上传 - async subsectionUploading () { - let file = this.file || null //获取上传的文件 - let fileSize = file.size || null //上传文件的总大小 - let shardSize = 5 * 1024 * 1024 //5MB一个分片 - let allSlice = Math.ceil(fileSize / shardSize) //总文件/5MB===共分多少段 + async subsectionUploading() { + let file = this.file || null; //获取上传的文件 + let fileSize = file.size || null; //上传文件的总大小 + let shardSize = 5 * 1024 * 1024; //5MB一个分片 + let allSlice = Math.ceil(fileSize / shardSize); //总文件/5MB===共分多少段 - for (let i = 0;i < allSlice;i++) { //循环分段上传 - let start = i * shardSize //切割文件开始位置 + for (let i = 0; i < allSlice; i++) { + //循环分段上传 + let start = i * shardSize; //切割文件开始位置 let end = Math.min(fileSize, start + shardSize); //切割文件结束位置 - let formData = new FormData() - formData.append("file",file.slice(start, end)) + let formData = new FormData(); + formData.append("file", file.slice(start, end)); // 同步写法实现异步调用 let result = await new Promise((resolve, reject) => { - // await 需要后面返回一个 promise 对象 - this.http.post(`/api/MultipartUpload/PlanPlatform/${this.objectName}?uploadId=${this.uploadId}&partNumber=${i+1}`,formData).subscribe((data:any)=>{ - let msg = { - "partNumber":data.partNumber || null, - "eTag": data.eTag || null - } - resolve(msg) // 调用 promise 内置方法处理成功 - }) + // await 需要后面返回一个 promise 对象 + this.http + .post( + `/api/MultipartUpload/PlanPlatform/${this.objectName}?uploadId=${ + this.uploadId + }&partNumber=${i + 1}`, + formData + ) + .subscribe((data: any) => { + let msg = { + partNumber: data.partNumber || null, + eTag: data.eTag || null, + }; + resolve(msg); // 调用 promise 内置方法处理成功 + }); }); - this.PartNumberETag.push(result) + this.PartNumberETag.push(result); if (this.PartNumberETag.length === allSlice) { - this.endUploading() + this.endUploading(); } } } //完成分块上传 endUploading() { - let data = this.PartNumberETag - let paramsData = { uploadId: this.uploadId } - this.http.post(`/api/CompleteMultipartUpload/PlanPlatform/${this.objectName}`, data, { params: paramsData }).subscribe(data => { - this.imgsrc = `/api/Objects/PlanPlatform/${this.objectName}?x-oss-process=image/resize,m_fill,h_170,w_299` - this.isspinner = false - this.PartNumberETag = [] - this.uploader.clearQueue(); //清空input控件文件 - }) + let data = this.PartNumberETag; + let paramsData = { uploadId: this.uploadId }; + this.http + .post( + `/api/CompleteMultipartUpload/PlanPlatform/${this.objectName}`, + data, + { params: paramsData } + ) + .subscribe((data) => { + this.imgsrc = `/api/Objects/PlanPlatform/${this.objectName}?x-oss-process=image/resize,m_fill,h_170,w_299`; + this.isspinner = false; + this.PartNumberETag = []; + this.uploader.clearQueue(); //清空input控件文件 + }); } //删除具体建筑 - deletedbuilding(item){ - var isdeleted = confirm("确定要删除此建筑吗?") - if(isdeleted){ + deletedbuilding(item) { + var isdeleted = confirm("确定要删除此建筑吗?"); + if (isdeleted) { //请求删除接口 - this.http.delete(`/api/Buildings/${item.buildingId}`).subscribe(data=>{ - - const config = new MatSnackBarConfig(); - config.verticalPosition = 'top'; - config.duration = 3000 - this.snackBar.open('删除成功','确定',config); - this.houses.splice(this.houses.findIndex(items=>items==item),1) - }) + this.http + .delete(`/api/Buildings/${item.buildingId}`) + .subscribe((data) => { + const config = new MatSnackBarConfig(); + config.verticalPosition = "top"; + config.duration = 3000; + this.snackBar.open("删除成功", "确定", config); + this.houses.splice( + this.houses.findIndex((items) => items == item), + 1 + ); + }); } } //提交单位基本信息 - onSubmit(value,invalid,form) { - if(invalid){ + onSubmit(value, invalid, form) { + if (invalid) { const config = new MatSnackBarConfig(); - config.verticalPosition = 'top'; - config.duration = 3000 - this.snackBar.open('请填写必填项','确定',config); - }else{ + config.verticalPosition = "top"; + config.duration = 3000; + this.snackBar.open("请填写必填项", "确定", config); + } else { // sessionStorage.setItem('buildingTypeId',value.unittype) - let time =new Date() + let time = new Date(); let body = { id: this.unitinfo.id, name: this.unitinfo.name, @@ -974,7 +1060,7 @@ export class BasicinfoLookComponent implements OnInit { imageUrl: this.imgsrc, location: { x: 0, - y: 0 + y: 0, }, modifiedTime: time, organizationId: this.selectedorganizationid, @@ -982,1003 +1068,1059 @@ export class BasicinfoLookComponent implements OnInit { buildingTypes: [ { id: value.unittype, - name: this.buildingTypesname + name: this.buildingTypesname, + }, + ], + }; + this.http + .put(`/api/Companies/${this.unitId}`, body) + .subscribe((data: any) => { + //修改单位基本信息 + this.getunitinfo(); + if (!this.houses.length) { + const config = new MatSnackBarConfig(); + config.verticalPosition = "top"; + config.duration = 3000; + this.snackBar.open( + "单位基本信息保存成功,请填写单位建筑模板信息", + "确定", + config + ); + // alert("单位基本信息保存成功,请填写单位建筑模板信息") + let order = 0; + let addbody = { + //请求创建单位基本信息成功后 直接创建出一个主体建筑模板 + id: "", //即将要生成具体建筑的id + name: "主体建筑", + order: order, + enabled: true, + companyId: this.unitinfo.id, + buildingTypes: [ + { + id: value.unittype, + name: "", + }, + ], + }; + this.http.post("/api/Buildings", addbody).subscribe((data) => { + //首先创建建筑成功了,需要刷出当前建筑类型的模板 + this.getunitallbuilding(); + }); + } else { + const config = new MatSnackBarConfig(); + config.verticalPosition = "top"; + config.duration = 3000; + this.snackBar.open("保存成功", "确定", config); } - ] - } - this.http.put(`/api/Companies/${this.unitId}`,body).subscribe((data:any)=>{ //修改单位基本信息 - this.getunitinfo() - if(!this.houses.length){ - const config = new MatSnackBarConfig(); - config.verticalPosition = 'top'; - config.duration = 3000 - this.snackBar.open('单位基本信息保存成功,请填写单位建筑模板信息','确定',config); - // alert("单位基本信息保存成功,请填写单位建筑模板信息") - let order = 0 - let addbody = { //请求创建单位基本信息成功后 直接创建出一个主体建筑模板 - id: "",//即将要生成具体建筑的id - name: "主体建筑", - order: order, - enabled: true, - companyId: this.unitinfo.id, - buildingTypes: [ - { - id: value.unittype, - name: "" - } - ] - } - this.http.post("/api/Buildings",addbody).subscribe(data=>{//首先创建建筑成功了,需要刷出当前建筑类型的模板 - this.getunitallbuilding() - }) - }else{ - const config = new MatSnackBarConfig(); - config.verticalPosition = 'top'; - config.duration = 3000 - this.snackBar.open('保存成功','确定',config); - } - }), - err=>{ - const config = new MatSnackBarConfig(); - config.verticalPosition = 'top'; - config.duration = 3000 - this.snackBar.open('请填写正确信息','确定',config); - } + }), + (err) => { + const config = new MatSnackBarConfig(); + config.verticalPosition = "top"; + config.duration = 3000; + this.snackBar.open("请填写正确信息", "确定", config); + }; } - - } - selected:any + selected: any; - isshowrule:boolean = false - rulevalue:any - inputchange(e,name,value,item){ + isshowrule: boolean = false; + rulevalue: any; + inputchange(e, name, value, item) { // console.log(e.target.value,name,value,item) // console.log(item) - if(name == "≥"){ - if(Number(e.target.value)< Number(value)){ - item.isshowrule = true - item.rulevalue = `请输入≥${value}的值` - }else{ - item.isshowrule = false + if (name == "≥") { + if (Number(e.target.value) < Number(value)) { + item.isshowrule = true; + item.rulevalue = `请输入≥${value}的值`; + } else { + item.isshowrule = false; } } - if(name == "≤"){ - if(Number(e.target.value) > Number(value)){ - item.isshowrule = true - item.rulevalue = `请输入≤${value}的值` - }else{ - item.isshowrule = false + if (name == "≤") { + if (Number(e.target.value) > Number(value)) { + item.isshowrule = true; + item.rulevalue = `请输入≤${value}的值`; + } else { + item.isshowrule = false; } } - if(name == "Range"){ - let rangenum = value.split(",") + if (name == "Range") { + let rangenum = value.split(","); // console.log(rangenum) - if(Number(e.target.value) < Number(rangenum[0]) || Number(e.target.value) >= Number(rangenum[1])){ - item.isshowrule = true - item.rulevalue = `请输入位于${Number(rangenum[0])}和${Number(rangenum[1])-1}之间的值` - }else{ - item.isshowrule = false + if ( + Number(e.target.value) < Number(rangenum[0]) || + Number(e.target.value) >= Number(rangenum[1]) + ) { + item.isshowrule = true; + item.rulevalue = `请输入位于${Number(rangenum[0])}和${ + Number(rangenum[1]) - 1 + }之间的值`; + } else { + item.isshowrule = false; } } } - + //切换建筑类型 - templatebuildtype(n ,item,key){ - this.http.get("/api/Buildings",{ - params:{ - companyId:this.unitId - } - }).subscribe((data:any)=>{ - this.allBuildings = data - this.http.put(`/api/Buildings/${item.buildingId}`,{ //修改当前建筑类型 - id: item.buildingId, - name: item.housename, - order: this.allBuildings[key].order, - enabled: true, - companyId: this.unitinfo.id, - buildingTypes: [ - { - id: n.id, - name: n.name - } - ] - }).subscribe(data=>{ - this.http.get("/api/BuildingBasicInfos",{//请求当前建筑类型的模板信息保存到数组中 - params:{ - companyId :this.unitId, - buildingId:item.buildingId, - buildingType:n.id - } - }).subscribe(data=>{ - this.getunithouse(data,n,item) - this.houses[item.index] = data[0] - - let _data = data - this.http.get("/api/BuildingCustomData",{params:{ - buildingId:item.buildingId - }}).subscribe((data:any)=>{ - _data[0].buildingCustomData = data - if(data && data.customProperties.length != 0){ - _data[0].isCustomData = true - }else{ - _data[0].isCustomData = false - _data[0].buildingCustomData ={ - id: "", - customProperties: [ - { - name: "", - value: "" - } - ], - buildingId: _data[0].buildingId - } - } - }) - }) + templatebuildtype(n, item, key) { + this.http + .get("/api/Buildings", { + params: { + companyId: this.unitId, + }, }) - }) - + .subscribe((data: any) => { + this.allBuildings = data; + this.http + .put(`/api/Buildings/${item.buildingId}`, { + //修改当前建筑类型 + id: item.buildingId, + name: item.housename, + order: this.allBuildings[key].order, + enabled: true, + companyId: this.unitinfo.id, + buildingTypes: [ + { + id: n.id, + name: n.name, + }, + ], + }) + .subscribe((data) => { + this.http + .get("/api/BuildingBasicInfos", { + //请求当前建筑类型的模板信息保存到数组中 + params: { + companyId: this.unitId, + buildingId: item.buildingId, + buildingType: n.id, + }, + }) + .subscribe((data) => { + this.getunithouse(data, n, item); + this.houses[item.index] = data[0]; + let _data = data; + this.http + .get("/api/BuildingCustomData", { + params: { + buildingId: item.buildingId, + }, + }) + .subscribe((data: any) => { + _data[0].buildingCustomData = data; + if (data && data.customProperties.length != 0) { + _data[0].isCustomData = true; + } else { + _data[0].isCustomData = false; + _data[0].buildingCustomData = { + id: "", + customProperties: [ + { + name: "", + value: "", + }, + ], + buildingId: _data[0].buildingId, + }; + } + }); + }); + }); + }); } - deviceinfo=[] //用于存储石头化工的第一个表格 + deviceinfo = []; //用于存储石头化工的第一个表格 //提交单位模板信息 - onSubmit2(value,item,key,invalid){ - this.http.get("/api/Buildings",{ - params:{ - companyId:this.unitId - } - }).subscribe((data:any)=>{ - this.allBuildings = data - if(invalid){ - const config = new MatSnackBarConfig(); - config.verticalPosition = 'top'; - config.duration = 3000 - this.snackBar.open('请填写必填项','确定',config); - }else{ - this.http.put(`/api/Buildings/${item.buildingId}`,{ //(通用)只修改建筑名称和建筑类型 - id: item.buildingId, - name: value.housename, - order: this.allBuildings[key].order, - enabled: true, - companyId: this.unitinfo.id, - buildingTypes: [ - { - id: item.buildingtypeId, - name: item.buildtype - } - ] - }).subscribe((data:any)=>{ - this.houses[item.index].username = item.name + onSubmit2(value, item, key, invalid) { + this.http + .get("/api/Buildings", { + params: { + companyId: this.unitId, }, - err=>{ - alert("名称和类型保存失败") - }) - - if(value.checkbuilding){//如果勾选了自定义信息的checkbox - var CustomDataval = [] - for (const key in value) { - if (key.indexOf("CustomData") != -1) { - CustomDataval.push(value[key]) - } - } - let newCustomData = this.FunData(CustomDataval) - let newCustomDataval = [] - newCustomData.forEach(n=>{ - newCustomDataval.push({ - name:n[0], - value:n[1] - }) - }) - let CustomDatabody = { - id: "", - customProperties: newCustomDataval, - buildingId: item.buildingId - } - this.http.post("/api/BuildingCustomData",CustomDatabody,{params:{ - buildingId:item.buildingId - }}).subscribe(data=>{ - - }, - err=>{ - alert("自定义信息保存失败") - }) - }else{ - let CustomDatabody = { - id: "", - customProperties: [], - buildingId: item.buildingId - } - this.http.post("/api/BuildingCustomData",CustomDatabody,{params:{ - buildingId:item.buildingId - }}).subscribe(data=>{ - - }, - err=>{ - alert("自定义信息保存失败") - }) - } - - - if(item.buildtype != "石油化工类" && item.buildtype != "地铁类"){ - // console.log(this.houses[key]) - // console.log(value) - this.houses[key].buildingBasicGroups[0].propertyInfos.forEach(item => { - - if(item.propertyValue || item.propertyValue == 0){ - // item.propertyValue = "" + value[key] - item.propertyValue = String(item.propertyValue) - } - - }); - let newObj = _.cloneDeep(this.houses[key]) //把数据深拷贝取出来进行操作 - newObj.buildingBasicGroups[0].buildingId = item.buildingId - newObj.buildingBasicGroups[0].companyId = this.unitinfo.id - newObj.buildingBasicGroups[0].submitted = true //把是否提交过变为true - delete newObj.name - delete newObj.username - delete newObj.buildtype - delete newObj.tongyong - delete newObj.index - delete newObj.isCustomData - delete newObj.buildingCustomData - newObj.buildingBasicGroups[0].propertyInfos.forEach(item => { - delete item.isshowrule - delete item.rulevalue - }); - - let body = newObj - let newbody = [] - newbody.push(body) - if(newbody[0].buildingBasicGroups.length){ - this.http.post("/api/BuildingBasicInfos",newbody,{ - params:{ - companyId : this.unitId, - buildingId :newbody[0].buildingId - } - }).subscribe((data:any)=>{ - this.houses[key].id = data[0].id - const config = new MatSnackBarConfig(); - config.verticalPosition = 'top'; - config.duration = 3000 - this.snackBar.open('建筑信息保存成功','确定',config); - }, - err=>{ - const config = new MatSnackBarConfig(); - config.verticalPosition = 'top'; - config.duration = 3000 - this.snackBar.open('请检查输入数据是否有误','确定',config); + }) + .subscribe((data: any) => { + this.allBuildings = data; + if (invalid) { + const config = new MatSnackBarConfig(); + config.verticalPosition = "top"; + config.duration = 3000; + this.snackBar.open("请填写必填项", "确定", config); + } else { + this.http + .put(`/api/Buildings/${item.buildingId}`, { + //(通用)只修改建筑名称和建筑类型 + id: item.buildingId, + name: value.housename, + order: this.allBuildings[key].order, + enabled: true, + companyId: this.unitinfo.id, + buildingTypes: [ + { + id: item.buildingtypeId, + name: item.buildtype, + }, + ], }) - } - } - if(item.buildtype == "石油化工类"){ - // console.log(888,item) - let bodyObj = _.cloneDeep(item) - delete bodyObj.name - delete bodyObj.username - delete bodyObj.isshiyou - delete bodyObj.newzhuangzhiinfodatasource - delete bodyObj.tongyong - delete bodyObj.buildtype - delete bodyObj.buildingtypeId - delete bodyObj.bigfor - delete bodyObj.index - delete bodyObj.isCustomData - delete bodyObj.buildingCustomData - // console.log(456,bodyObj) - bodyObj.buildingBasicGroups[0].propertyInfos.forEach(item => { - delete item.isshowrule - delete item.rulevalue - }); - //修改基本信息 - bodyObj.buildingBasicGroups[0].propertyInfos.forEach(item => { - for (const key in value) { - if (item.propertyName == key) { - if(item.propertyValue || item.propertyValue == 0){ - // item.propertyValue = "" + value[key] - item.propertyValue = String(value[key]) + .subscribe( + (data: any) => { + this.houses[item.index].username = item.name; + }, + (err) => { + alert("名称和类型保存失败"); } - + ); + + if (value.checkbuilding) { + //如果勾选了自定义信息的checkbox + var CustomDataval = []; + for (const key in value) { + if (key.indexOf("CustomData") != -1) { + CustomDataval.push(value[key]); } } - }); - bodyObj.buildingBasicGroups[0].submitted = true - bodyObj.buildingBasicGroups[0].buildingId = item.buildingId - bodyObj.buildingBasicGroups[0].companyId = this.unitinfo.id - //石油化工类的 装置信息 就提交这个表单——————————————————————————————this.deviceinfo 记得清空 - // console.log(this.deviceinfodata) - if(bodyObj.buildingBasicGroups[1].submitted){ //如果用户点击了并填写了装置信息就提交这个表格数据 - this.deviceinfo = [] - item.newzhuangzhiinfodatasource.forEach((element,index) => { - this.deviceinfo.push({ - propertyName: "装置区名称", - propertyValue: element.name, - propertyType: 0, - required: true, - ruleName: "", - ruleValue: "", + let newCustomData = this.FunData(CustomDataval); + let newCustomDataval = []; + newCustomData.forEach((n) => { + newCustomDataval.push({ + name: n[0], + value: n[1], + }); + }); + let CustomDatabody = { + id: "", + customProperties: newCustomDataval, + buildingId: item.buildingId, + }; + this.http + .post("/api/BuildingCustomData", CustomDatabody, { + params: { + buildingId: item.buildingId, + }, + }) + .subscribe( + (data) => {}, + (err) => { + alert("自定义信息保存失败"); + } + ); + } else { + let CustomDatabody = { + id: "", + customProperties: [], + buildingId: item.buildingId, + }; + this.http + .post("/api/BuildingCustomData", CustomDatabody, { + params: { + buildingId: item.buildingId, + }, + }) + .subscribe( + (data) => {}, + (err) => { + alert("自定义信息保存失败"); + } + ); + } + + if (item.buildtype != "石油化工类" && item.buildtype != "地铁类") { + // console.log(this.houses[key]) + // console.log(value) + this.houses[key].buildingBasicGroups[0].propertyInfos.forEach( + (item) => { + if (item.propertyValue || item.propertyValue == 0) { + // item.propertyValue = "" + value[key] + item.propertyValue = String(item.propertyValue); + } + } + ); + let newObj = _.cloneDeep(this.houses[key]); //把数据深拷贝取出来进行操作 + newObj.buildingBasicGroups[0].buildingId = item.buildingId; + newObj.buildingBasicGroups[0].companyId = this.unitinfo.id; + newObj.buildingBasicGroups[0].submitted = true; //把是否提交过变为true + delete newObj.name; + delete newObj.username; + delete newObj.buildtype; + delete newObj.tongyong; + delete newObj.index; + delete newObj.isCustomData; + delete newObj.buildingCustomData; + newObj.buildingBasicGroups[0].propertyInfos.forEach((item) => { + delete item.isshowrule; + delete item.rulevalue; + }); + + let body = newObj; + let newbody = []; + newbody.push(body); + if (newbody[0].buildingBasicGroups.length) { + this.http + .post("/api/BuildingBasicInfos", newbody, { + params: { + companyId: this.unitId, + buildingId: newbody[0].buildingId, + }, + }) + .subscribe( + (data: any) => { + this.houses[key].id = data[0].id; + const config = new MatSnackBarConfig(); + config.verticalPosition = "top"; + config.duration = 3000; + this.snackBar.open("建筑信息保存成功", "确定", config); + }, + (err) => { + const config = new MatSnackBarConfig(); + config.verticalPosition = "top"; + config.duration = 3000; + this.snackBar.open( + "请检查输入数据是否有误", + "确定", + config + ); + } + ); + } + } + if (item.buildtype == "石油化工类") { + // console.log(888,item) + let bodyObj = _.cloneDeep(item); + delete bodyObj.name; + delete bodyObj.username; + delete bodyObj.isshiyou; + delete bodyObj.newzhuangzhiinfodatasource; + delete bodyObj.tongyong; + delete bodyObj.buildtype; + delete bodyObj.buildingtypeId; + delete bodyObj.bigfor; + delete bodyObj.index; + delete bodyObj.isCustomData; + delete bodyObj.buildingCustomData; + // console.log(456,bodyObj) + bodyObj.buildingBasicGroups[0].propertyInfos.forEach((item) => { + delete item.isshowrule; + delete item.rulevalue; + }); + //修改基本信息 + bodyObj.buildingBasicGroups[0].propertyInfos.forEach((item) => { + for (const key in value) { + if (item.propertyName == key) { + if (item.propertyValue || item.propertyValue == 0) { + // item.propertyValue = "" + value[key] + item.propertyValue = String(value[key]); + } + } + } + }); + bodyObj.buildingBasicGroups[0].submitted = true; + bodyObj.buildingBasicGroups[0].buildingId = item.buildingId; + bodyObj.buildingBasicGroups[0].companyId = this.unitinfo.id; + //石油化工类的 装置信息 就提交这个表单——————————————————————————————this.deviceinfo 记得清空 + // console.log(this.deviceinfodata) + if (bodyObj.buildingBasicGroups[1].submitted) { + //如果用户点击了并填写了装置信息就提交这个表格数据 + this.deviceinfo = []; + item.newzhuangzhiinfodatasource.forEach((element, index) => { + this.deviceinfo.push( + { + propertyName: "装置区名称", + propertyValue: element.name, + propertyType: 0, + required: true, + ruleName: "", + ruleValue: "", + physicalUnit: "", + order: 0, + enabled: true, + visible: true, + tag: String(index + 1), + }, + { + propertyName: "工艺流程", + propertyValue: element.flow, + propertyType: 0, + required: true, + ruleName: "", + ruleValue: "", + physicalUnit: "", + order: 1, + enabled: true, + visible: true, + tag: String(index + 1), + }, + { + propertyName: "火灾危险性", + propertyValue: element.danger, + propertyType: 0, + required: true, + ruleName: "", + ruleValue: "", + physicalUnit: "", + order: 2, + enabled: true, + visible: true, + tag: String(index + 1), + }, + { + propertyName: "灭火注意事项", + propertyValue: element.payattentionto, + propertyType: 1, + required: false, + ruleName: "", + ruleValue: "", + physicalUnit: "", + order: 3, + enabled: true, + visible: true, + tag: String(index + 1), + } + ); + }); + } else { + //否则就传一个空的 + this.deviceinfo = [ + { + propertyName: "装置区名称", + propertyValue: "", + propertyType: 0, + required: true, + ruleName: "", + ruleValue: "", physicalUnit: "", - order:0, + order: 0, enabled: true, visible: true, - tag: String(index + 1) - }, - { + tag: "1", + }, + { propertyName: "工艺流程", - propertyValue: element.flow, + propertyValue: "", propertyType: 0, required: true, ruleName: "", ruleValue: "", physicalUnit: "", - order:1, + order: 0, enabled: true, visible: true, - tag: String(index + 1) - }, - { + tag: "1", + }, + { propertyName: "火灾危险性", - propertyValue: element.danger, + propertyValue: "", propertyType: 0, required: true, ruleName: "", ruleValue: "", physicalUnit: "", - order:2, + order: 0, enabled: true, visible: true, - tag: String(index + 1) - }, - { + tag: "1", + }, + { propertyName: "灭火注意事项", - propertyValue: element.payattentionto, + propertyValue: "", propertyType: 1, required: false, ruleName: "", ruleValue: "", physicalUnit: "", - order:3, + order: 0, enabled: true, visible: true, - tag: String(index + 1) - }) - }); - }else{//否则就传一个空的 - this.deviceinfo = [ - { - propertyName: "装置区名称", - propertyValue: "", - propertyType: 0, - required: true, - ruleName: "", - ruleValue: "", - physicalUnit: "", - order: 0, - enabled: true, - visible: true, - tag: "1" - }, - { - propertyName: "工艺流程", - propertyValue: "", - propertyType: 0, - required: true, - ruleName: "", - ruleValue: "", - physicalUnit: "", - order: 0, - enabled: true, - visible: true, - tag: "1" - }, - { - propertyName: "火灾危险性", - propertyValue: "", - propertyType: 0, - required: true, - ruleName: "", - ruleValue: "", - physicalUnit: "", - order: 0, - enabled: true, - visible: true, - tag: "1" - }, - { - propertyName: "灭火注意事项", - propertyValue: "", - propertyType: 1, - required: false, - ruleName: "", - ruleValue: "", - physicalUnit: "", - order: 0, - enabled: true, - visible: true, - tag: "1" + tag: "1", + }, + ]; } - ] - } - bodyObj.buildingBasicGroups[1].propertyInfos = this.deviceinfo - bodyObj.buildingBasicGroups[1].buildingId = item.buildingId - bodyObj.buildingBasicGroups[1].companyId = this.unitinfo.id - - - if(bodyObj.buildingBasicGroups[2].submitted){ //如果勾选了储罐信息 则直接提交当前bodyObj - var map = {}; //用于存储石油化工要提交的储罐信息表单 - for (let key in value) { - if (key.indexOf('tanker') != -1) { - const list = key.split('-'); // 2,tanker,1 - const orderKey = list[0]; // 2 or 3 - if (!(orderKey in map)) { + bodyObj.buildingBasicGroups[1].propertyInfos = this.deviceinfo; + bodyObj.buildingBasicGroups[1].buildingId = item.buildingId; + bodyObj.buildingBasicGroups[1].companyId = this.unitinfo.id; + + if (bodyObj.buildingBasicGroups[2].submitted) { + //如果勾选了储罐信息 则直接提交当前bodyObj + var map = {}; //用于存储石油化工要提交的储罐信息表单 + for (let key in value) { + if (key.indexOf("tanker") != -1) { + const list = key.split("-"); // 2,tanker,1 + const orderKey = list[0]; // 2 or 3 + if (!(orderKey in map)) { map[orderKey] = []; // map[2] or map[3] = []; + } + map[orderKey][list[2]] = value[key]; // map[2][1] = xxxxx } - map[orderKey][list[2]] = value[key]; // map[2][1] = xxxxx } - } - - bodyObj.buildingBasicGroups.splice( 2 , bodyObj.buildingBasicGroups.length) - - // console.log(123, item) - - let basictankinfobody:any = {} - - for(let key in map){//------------------------------------------------------------石油化工 储罐信息 - - - basictankinfobody = { - id: null, - name: "罐区" + (Number(key)-1), - type: 0, - addMode: 2, - basicGroupId:'', - submitted:true, - isOptional:true, - order: Number(key), - enabled: true, - propertyInfos: item.bigfor[Number(key)-2][0].propertyInfos, - basicCategoryId: item.basicCategoryId, - buildingBasicId: null, - buildingId: item.buildingId,//当前建筑id - companyId: this.unitinfo.id//当前企业id - } - - bodyObj.buildingBasicGroups.push(basictankinfobody) - } - - - let basictankchildinfobody:any = []//-------------后续储罐信息以及储罐信息/罐区情况都push到这个数组中 - item.bigfor.forEach(item => { - basictankchildinfobody.push(item[1].propertyInfos) - }); - var _item = item - basictankchildinfobody.forEach((item,index) => { - let tankfieldArr = [] - item.forEach((element,key) => { - tankfieldArr.push( + + bodyObj.buildingBasicGroups.splice( + 2, + bodyObj.buildingBasicGroups.length + ); + + // console.log(123, item) + + let basictankinfobody: any = {}; + + for (let key in map) { + //------------------------------------------------------------石油化工 储罐信息 + + basictankinfobody = { + id: null, + name: "罐区" + (Number(key) - 1), + type: 0, + addMode: 2, + basicGroupId: "", + submitted: true, + isOptional: true, + order: Number(key), + enabled: true, + propertyInfos: item.bigfor[Number(key) - 2][0].propertyInfos, + basicCategoryId: item.basicCategoryId, + buildingBasicId: null, + buildingId: item.buildingId, //当前建筑id + companyId: this.unitinfo.id, //当前企业id + }; + + bodyObj.buildingBasicGroups.push(basictankinfobody); + } + + let basictankchildinfobody: any = []; //-------------后续储罐信息以及储罐信息/罐区情况都push到这个数组中 + item.bigfor.forEach((item) => { + basictankchildinfobody.push(item[1].propertyInfos); + }); + var _item = item; + basictankchildinfobody.forEach((item, index) => { + let tankfieldArr = []; + item.forEach((element, key) => { + tankfieldArr.push( + { + propertyName: "罐区", + propertyValue: element.tank, + propertyType: 0, + required: false, + ruleName: "", + ruleValue: "", + physicalUnit: "", + order: 0, + enabled: true, + visible: true, + tag: String(key + 1), + }, + { + propertyName: "储罐编号", + propertyValue: element.tankid, + propertyType: 0, + required: true, + ruleName: "", + ruleValue: "", + physicalUnit: "", + order: 0, + enabled: true, + visible: true, + tag: String(key + 1), + }, + { + propertyName: "储存介质", + propertyValue: element.tankmedium, + propertyType: 0, + required: true, + ruleName: "", + ruleValue: "", + physicalUnit: "", + order: 0, + enabled: true, + visible: true, + tag: String(key + 1), + }, + { + propertyName: "储罐类型", + propertyValue: element.tanktype, + propertyType: 0, + required: true, + ruleName: "", + ruleValue: "", + physicalUnit: "", + order: 0, + enabled: true, + visible: true, + tag: String(key + 1), + }, + { + propertyName: "容量", + propertyValue: element.tankcapacity, + propertyType: 2, + required: true, + ruleName: "", + ruleValue: "", + physicalUnit: "㎡", + order: 0, + enabled: true, + visible: true, + tag: String(key + 1), + }, + { + propertyName: "直径", + propertyValue: element.tankdiameter, + propertyType: 2, + required: true, + ruleName: "", + ruleValue: "", + physicalUnit: "m", + order: 0, + enabled: true, + visible: true, + tag: String(key + 1), + }, + { + propertyName: "高度", + propertyValue: element.tankheight, + propertyType: 2, + required: true, + ruleName: "", + ruleValue: "", + physicalUnit: "m", + order: 0, + enabled: true, + visible: true, + tag: String(key + 1), + }, + { + propertyName: "顶盖形式", + propertyValue: element.tanktectum, + propertyType: 0, + required: false, + ruleName: "", + ruleValue: "", + physicalUnit: "", + order: 0, + enabled: true, + visible: true, + tag: String(key + 1), + }, + { + propertyName: "浮盘材质", + propertyValue: element.tanktexture, + propertyType: 0, + required: false, + ruleName: "", + ruleValue: "", + physicalUnit: "", + order: 0, + enabled: true, + visible: true, + tag: String(key + 1), + }, + { + propertyName: "浮盘类型", + propertyValue: element.platetype, + propertyType: 0, + required: false, + ruleName: "", + ruleValue: "", + physicalUnit: "", + order: 0, + enabled: true, + visible: true, + tag: String(key + 1), + }, + { + propertyName: "泡沫产生器型号", + propertyValue: element.foamgeneratorid, + propertyType: 0, + required: false, + ruleName: "", + ruleValue: "", + physicalUnit: "", + order: 0, + enabled: true, + visible: true, + tag: String(key + 1), + }, + { + propertyName: "泡沫产生器形式", + propertyValue: element.foamgeneratortype, + propertyType: 0, + required: false, + ruleName: "", + ruleValue: "", + physicalUnit: "", + order: 0, + enabled: true, + visible: true, + tag: String(key + 1), + }, + { + propertyName: "是否设置氮封惰化保护装置", + propertyValue: element.isprotect, + propertyType: 0, + required: false, + ruleName: "", + ruleValue: "", + physicalUnit: "", + order: 0, + enabled: true, + visible: true, + tag: String(key + 1), + }, + { + propertyName: "防护堤高度", + propertyValue: element.fendinggroyneheight, + propertyType: 2, + required: true, + ruleName: "", + ruleValue: "", + physicalUnit: "m", + order: 0, + enabled: true, + visible: true, + tag: String(key + 1), + }, + { + propertyName: "半固定泡沫灭火接口数量", + propertyValue: element.portnum, + propertyType: 2, + required: false, + ruleName: "", + ruleValue: "", + physicalUnit: "个", + order: 0, + enabled: true, + visible: true, + tag: String(key + 1), + }, + { + propertyName: "其它设施", + propertyValue: element.else, + propertyType: 0, + required: false, + ruleName: "", + ruleValue: "", + physicalUnit: "", + order: 0, + enabled: true, + visible: true, + tag: String(key + 1), + } + ); + }); + basictankchildinfobody = { + // + id: null, + name: "罐区" + Number(index + 1) + "/储罐信息", + type: 1, + addMode: 2, + basicGroupId: "", + order: Number(index + 2), + enabled: true, + submitted: true, + isOptional: true, + propertyInfos: tankfieldArr, + basicCategoryId: _item.basicCategoryId, + buildingBasicId: null, + buildingId: _item.buildingId, + companyId: this.unitinfo.id, + }; + bodyObj.buildingBasicGroups.push(basictankchildinfobody); + }); + } else { + bodyObj.buildingBasicGroups[2].buildingId = item.buildingId; + bodyObj.buildingBasicGroups[2].companyId = this.unitinfo.id; + bodyObj.buildingBasicGroups[2].propertyInfos.forEach((item) => { + item.propertyValue = ""; + }); + bodyObj.buildingBasicGroups[3].buildingId = item.buildingId; + bodyObj.buildingBasicGroups[3].companyId = this.unitinfo.id; + bodyObj.buildingBasicGroups[3].propertyInfos = [ { - propertyName: "罐区", - propertyValue: element.tank, - propertyType: 0, - required: false, - ruleName: "", - ruleValue: "", - physicalUnit: "", - order: 0, - enabled: true, - visible: true, - tag:String(key + 1) + propertyName: "罐区", + propertyValue: "", + propertyType: 0, + required: false, + ruleName: "", + ruleValue: "", + physicalUnit: "", + order: 0, + enabled: true, + visible: true, + tag: "1", }, { - propertyName: "储罐编号", - propertyValue: element.tankid, - propertyType: 0, - required: true, - ruleName: "", - ruleValue: "", - physicalUnit: "", - order: 0, - enabled: true, - visible: true, - tag:String(key + 1) + propertyName: "储罐编号", + propertyValue: "", + propertyType: 0, + required: true, + ruleName: "", + ruleValue: "", + physicalUnit: "", + order: 0, + enabled: true, + visible: true, + tag: "1", }, { - propertyName: "储存介质", - propertyValue: element.tankmedium, - propertyType: 0, - required: true, - ruleName: "", - ruleValue: "", - physicalUnit: "", - order: 0, - enabled: true, - visible: true, - tag:String(key + 1) + propertyName: "储存介质", + propertyValue: "", + propertyType: 0, + required: true, + ruleName: "", + ruleValue: "", + physicalUnit: "", + order: 0, + enabled: true, + visible: true, + tag: "1", }, { - propertyName: "储罐类型", - propertyValue: element.tanktype, - propertyType: 0, - required: true, - ruleName: "", - ruleValue: "", - physicalUnit: "", - order: 0, - enabled: true, - visible: true, - tag:String(key + 1) + propertyName: "储罐类型", + propertyValue: "", + propertyType: 0, + required: true, + ruleName: "", + ruleValue: "", + physicalUnit: "", + order: 0, + enabled: true, + visible: true, + tag: "1", }, { - propertyName: "容量", - propertyValue: element.tankcapacity, - propertyType: 2, - required: true, - ruleName: "", - ruleValue: "", - physicalUnit: "㎡", - order: 0, - enabled: true, - visible: true, - tag:String(key + 1) + propertyName: "容量", + propertyValue: "", + propertyType: 2, + required: true, + ruleName: "", + ruleValue: "", + physicalUnit: "㎡", + order: 0, + enabled: true, + visible: true, + tag: "1", }, { - propertyName: "直径", - propertyValue:element.tankdiameter, - propertyType: 2, - required: true, - ruleName: "", - ruleValue: "", - physicalUnit: "m", - order: 0, - enabled: true, - visible: true, - tag:String(key + 1) + propertyName: "直径", + propertyValue: "", + propertyType: 2, + required: true, + ruleName: "", + ruleValue: "", + physicalUnit: "m", + order: 0, + enabled: true, + visible: true, + tag: "1", }, { - propertyName: "高度", - propertyValue: element.tankheight, - propertyType: 2, - required: true, - ruleName: "", - ruleValue: "", - physicalUnit: "m", - order: 0, - enabled: true, - visible: true, - tag:String(key + 1) + propertyName: "高度", + propertyValue: "", + propertyType: 2, + required: true, + ruleName: "", + ruleValue: "", + physicalUnit: "m", + order: 0, + enabled: true, + visible: true, + tag: "1", }, { - propertyName: "顶盖形式", - propertyValue: element.tanktectum, - propertyType: 0, - required: false, - ruleName: "", - ruleValue: "", - physicalUnit: "", - order: 0, - enabled: true, - visible: true, - tag:String(key + 1) + propertyName: "顶盖形式", + propertyValue: "", + propertyType: 0, + required: false, + ruleName: "", + ruleValue: "", + physicalUnit: "", + order: 0, + enabled: true, + visible: true, + tag: "1", }, { - propertyName: "浮盘材质", - propertyValue: element.tanktexture, - propertyType: 0, - required: false, - ruleName: "", - ruleValue: "", - physicalUnit: "", - order: 0, - enabled: true, - visible: true, - tag:String(key + 1) + propertyName: "浮盘材质", + propertyValue: "", + propertyType: 0, + required: false, + ruleName: "", + ruleValue: "", + physicalUnit: "", + order: 0, + enabled: true, + visible: true, + tag: "1", }, { - propertyName: "浮盘类型", - propertyValue: element.platetype, - propertyType: 0, - required: false, - ruleName: "", - ruleValue: "", - physicalUnit: "", - order: 0, - enabled: true, - visible: true, - tag:String(key + 1) + propertyName: "浮盘类型", + propertyValue: "", + propertyType: 0, + required: false, + ruleName: "", + ruleValue: "", + physicalUnit: "", + order: 0, + enabled: true, + visible: true, + tag: "1", }, { - propertyName: "泡沫产生器型号", - propertyValue: element.foamgeneratorid, - propertyType: 0, - required: false, - ruleName: "", - ruleValue: "", - physicalUnit: "", - order: 0, - enabled: true, - visible: true, - tag:String(key + 1) + propertyName: "泡沫产生器型号", + propertyValue: "", + propertyType: 0, + required: false, + ruleName: "", + ruleValue: "", + physicalUnit: "", + order: 0, + enabled: true, + visible: true, + tag: "1", }, { - propertyName: "泡沫产生器形式", - propertyValue: element.foamgeneratortype, - propertyType: 0, - required: false, - ruleName: "", - ruleValue: "", - physicalUnit: "", - order: 0, - enabled: true, - visible: true, - tag:String(key + 1) + propertyName: "泡沫产生器形式", + propertyValue: "", + propertyType: 0, + required: false, + ruleName: "", + ruleValue: "", + physicalUnit: "", + order: 0, + enabled: true, + visible: true, + tag: "1", }, { - propertyName: "是否设置氮封惰化保护装置", - propertyValue: element.isprotect, - propertyType: 0, - required: false, - ruleName: "", - ruleValue: "", - physicalUnit: "", - order: 0, - enabled: true, - visible: true, - tag:String(key + 1) + propertyName: "是否设置氮封惰化保护装置", + propertyValue: "", + propertyType: 0, + required: false, + ruleName: "", + ruleValue: "", + physicalUnit: "", + order: 0, + enabled: true, + visible: true, + tag: "1", }, { - propertyName: "防护堤高度", - propertyValue: element.fendinggroyneheight, - propertyType: 2, - required: true, - ruleName: "", - ruleValue: "", - physicalUnit: "m", - order: 0, - enabled: true, - visible: true, - tag:String(key + 1) + propertyName: "防护堤高度", + propertyValue: "", + propertyType: 2, + required: true, + ruleName: "", + ruleValue: "", + physicalUnit: "m", + order: 0, + enabled: true, + visible: true, + tag: "1", }, { - propertyName: "半固定泡沫灭火接口数量", - propertyValue: element.portnum, - propertyType: 2, - required: false, - ruleName: "", - ruleValue: "", - physicalUnit: "个", - order: 0, - enabled: true, - visible: true, - tag:String(key + 1) + propertyName: "半固定泡沫灭火接口数量", + propertyValue: "", + propertyType: 2, + required: false, + ruleName: "", + ruleValue: "", + physicalUnit: "个", + order: 0, + enabled: true, + visible: true, + tag: "1", }, { - propertyName: "其它设施", - propertyValue: element.else, - propertyType: 0, - required: false, - ruleName: "", - ruleValue: "", - physicalUnit: "", - order: 0, - enabled: true, - visible: true, - tag:String(key + 1) - } - ) - }); - basictankchildinfobody={// - id: null, - name: "罐区" + Number(index+1) + "/储罐信息", - type: 1, - addMode: 2, - basicGroupId:'', - order: Number(index + 2), - enabled: true, - submitted:true, - isOptional:true, - propertyInfos: tankfieldArr, - basicCategoryId: _item.basicCategoryId, - buildingBasicId: null, - buildingId: _item.buildingId, - companyId: this.unitinfo.id - } - bodyObj.buildingBasicGroups.push(basictankchildinfobody) - }); - }else{ - - - bodyObj.buildingBasicGroups[2].buildingId = item.buildingId - bodyObj.buildingBasicGroups[2].companyId = this.unitinfo.id - bodyObj.buildingBasicGroups[2].propertyInfos.forEach(item=>{ - item.propertyValue = "" - }) - bodyObj.buildingBasicGroups[3].buildingId = item.buildingId - bodyObj.buildingBasicGroups[3].companyId = this.unitinfo.id - bodyObj.buildingBasicGroups[3].propertyInfos = [ - { - propertyName: "罐区", - propertyValue: "", - propertyType: 0, - required: false, - ruleName: "", - ruleValue: "", - physicalUnit: "", - order: 0, - enabled: true, - visible: true, - tag:"1" - }, - { - propertyName: "储罐编号", - propertyValue: "", - propertyType: 0, - required: true, - ruleName: "", - ruleValue: "", - physicalUnit: "", - order: 0, - enabled: true, - visible: true, - tag:"1" - }, - { - propertyName: "储存介质", - propertyValue: "", - propertyType: 0, - required: true, - ruleName: "", - ruleValue: "", - physicalUnit: "", - order: 0, - enabled: true, - visible: true, - tag:"1" - }, - { - propertyName: "储罐类型", - propertyValue:"", - propertyType: 0, - required: true, - ruleName: "", - ruleValue: "", - physicalUnit: "", - order: 0, - enabled: true, - visible: true, - tag:"1" - }, - { - propertyName: "容量", - propertyValue: "", - propertyType: 2, - required: true, - ruleName: "", - ruleValue: "", - physicalUnit: "㎡", - order: 0, - enabled: true, - visible: true, - tag:"1" - }, - { - propertyName: "直径", - propertyValue:"", - propertyType: 2, - required: true, - ruleName: "", - ruleValue: "", - physicalUnit: "m", - order: 0, - enabled: true, - visible: true, - tag:"1" - }, - { - propertyName: "高度", - propertyValue: "", - propertyType: 2, - required: true, - ruleName: "", - ruleValue: "", - physicalUnit: "m", - order: 0, - enabled: true, - visible: true, - tag:"1" - }, - { - propertyName: "顶盖形式", - propertyValue: "", - propertyType: 0, - required: false, - ruleName: "", - ruleValue: "", - physicalUnit: "", - order: 0, - enabled: true, - visible: true, - tag:"1" - }, - { - propertyName: "浮盘材质", - propertyValue:"", - propertyType: 0, - required: false, - ruleName: "", - ruleValue: "", - physicalUnit: "", - order: 0, - enabled: true, - visible: true, - tag:"1" - }, - { - propertyName: "浮盘类型", - propertyValue: "", - propertyType: 0, - required: false, - ruleName: "", - ruleValue: "", - physicalUnit: "", - order: 0, - enabled: true, - visible: true, - tag:"1" - }, - { - propertyName: "泡沫产生器型号", - propertyValue:"", - propertyType: 0, - required: false, - ruleName: "", - ruleValue: "", - physicalUnit: "", - order: 0, - enabled: true, - visible: true, - tag:"1" - }, - { - propertyName: "泡沫产生器形式", - propertyValue: "", - propertyType: 0, - required: false, - ruleName: "", - ruleValue: "", - physicalUnit: "", - order: 0, - enabled: true, - visible: true, - tag:"1" - }, - { - propertyName: "是否设置氮封惰化保护装置", - propertyValue:"", - propertyType: 0, - required: false, - ruleName: "", - ruleValue: "", - physicalUnit: "", - order: 0, - enabled: true, - visible: true, - tag:"1" - }, - { - propertyName: "防护堤高度", - propertyValue:"", - propertyType: 2, - required: true, - ruleName: "", - ruleValue: "", - physicalUnit: "m", - order: 0, - enabled: true, - visible: true, - tag:"1" - }, - { - propertyName: "半固定泡沫灭火接口数量", - propertyValue: "", - propertyType: 2, - required: false, - ruleName: "", - ruleValue: "", - physicalUnit: "个", - order: 0, - enabled: true, - visible: true, - tag:"1" - }, - { - propertyName: "其它设施", - propertyValue: "", - propertyType: 0, - required: false, - ruleName: "", - ruleValue: "", - physicalUnit: "", - order: 0, - enabled: true, - visible: true, - tag:"1" + propertyName: "其它设施", + propertyValue: "", + propertyType: 0, + required: false, + ruleName: "", + ruleValue: "", + physicalUnit: "", + order: 0, + enabled: true, + visible: true, + tag: "1", + }, + ]; + // console.log(888,bodyObj) + bodyObj.buildingBasicGroups.splice( + 4, + bodyObj.buildingBasicGroups.length + ); } - ] - // console.log(888,bodyObj) - bodyObj.buildingBasicGroups.splice(4,bodyObj.buildingBasicGroups.length) - } - - - - let newbodyObj = [] - newbodyObj.push(bodyObj) - // console.log(1111,newbodyObj) - this.http.post("/api/BuildingBasicInfos",newbodyObj,{ - params:{ - companyId : this.unitId, - buildingId :item.buildingId + + let newbodyObj = []; + newbodyObj.push(bodyObj); + // console.log(1111,newbodyObj) + this.http + .post("/api/BuildingBasicInfos", newbodyObj, { + params: { + companyId: this.unitId, + buildingId: item.buildingId, + }, + }) + .subscribe( + (data: any) => { + this.houses[key].id = data[0].id; + const config = new MatSnackBarConfig(); + config.verticalPosition = "top"; + config.duration = 3000; + this.snackBar.open("建筑信息保存成功", "确定", config); + // alert("建筑信息保存成功") + }, + (err) => { + const config = new MatSnackBarConfig(); + config.verticalPosition = "top"; + config.duration = 3000; + this.snackBar.open("请检查输入数据是否有误", "确定", config); + } + ); } - }).subscribe((data:any)=>{ - this.houses[key].id = data[0].id - const config = new MatSnackBarConfig(); - config.verticalPosition = 'top'; - config.duration = 3000 - this.snackBar.open('建筑信息保存成功','确定',config); - // alert("建筑信息保存成功") - }, - err=>{ - const config = new MatSnackBarConfig(); - config.verticalPosition = 'top'; - config.duration = 3000 - this.snackBar.open('请检查输入数据是否有误','确定',config); - }) - } - if(item.buildtype == "地铁类"){ - let newObj = _.cloneDeep(item) - delete newObj.username - delete newObj.name - delete newObj.tongyong - delete newObj.ditie - delete newObj.buildtype - delete newObj.isCustomData - delete newObj.buildingCustomData - newObj.buildingBasicGroups.forEach(item => { - item.propertyInfos.forEach(element => { - delete element.isshowrule - delete element.rulevalue - if( element.propertyValue || element.propertyValue == 0){ - element.propertyValue = String(element.propertyValue) - } + if (item.buildtype == "地铁类") { + let newObj = _.cloneDeep(item); + delete newObj.username; + delete newObj.name; + delete newObj.tongyong; + delete newObj.ditie; + delete newObj.buildtype; + delete newObj.isCustomData; + delete newObj.buildingCustomData; + newObj.buildingBasicGroups.forEach((item) => { + item.propertyInfos.forEach((element) => { + delete element.isshowrule; + delete element.rulevalue; + if (element.propertyValue || element.propertyValue == 0) { + element.propertyValue = String(element.propertyValue); + } + }); + item.buildingId = newObj.buildingId; + item.companyId = this.unitinfo.id; + item.submitted = true; }); - item.buildingId = newObj.buildingId - item.companyId = this.unitinfo.id - item.submitted = true - }); - let newbodyObj2 = [] - newbodyObj2.push(newObj) - this.http.post("/api/BuildingBasicInfos",newbodyObj2,{ - params:{ - companyId : this.unitId, - buildingId :newObj.buildingId - } - }).subscribe((data:any)=>{ - this.houses[key].id = data[0].id - const config = new MatSnackBarConfig(); - config.verticalPosition = 'top'; - config.duration = 3000 - this.snackBar.open('建筑信息保存成功','确定',config); - }, - err=>{ - const config = new MatSnackBarConfig(); - config.verticalPosition = 'top'; - config.duration = 3000 - this.snackBar.open('请检查输入数据是否有误','确定',config); - }) - + let newbodyObj2 = []; + newbodyObj2.push(newObj); + this.http + .post("/api/BuildingBasicInfos", newbodyObj2, { + params: { + companyId: this.unitId, + buildingId: newObj.buildingId, + }, + }) + .subscribe( + (data: any) => { + this.houses[key].id = data[0].id; + const config = new MatSnackBarConfig(); + config.verticalPosition = "top"; + config.duration = 3000; + this.snackBar.open("建筑信息保存成功", "确定", config); + }, + (err) => { + const config = new MatSnackBarConfig(); + config.verticalPosition = "top"; + config.duration = 3000; + this.snackBar.open("请检查输入数据是否有误", "确定", config); + } + ); + } } - } - }) - - - }} \ No newline at end of file + }); + } +} diff --git a/src/app/ui/dangerous/dangerous.component.html b/src/app/ui/dangerous/dangerous.component.html index 1de8f49..c5cffc4 100644 --- a/src/app/ui/dangerous/dangerous.component.html +++ b/src/app/ui/dangerous/dangerous.component.html @@ -5,22 +5,22 @@
volume_up
-
-
泵房
-
控制室
- -
-
-
- settings_voice -
-
- 按住说话 +
+
泵房
+
控制室
+
-
- search +
+
+ settings_voice +
+
+ 按住说话 +
+
+ search +
-
@@ -28,7 +28,8 @@
-
{{item.name}}
+
{{item.name}}
@@ -51,11 +52,11 @@ - + -
+
-

{{detailNode.name}}

+

{{detailNode.name}}

x
@@ -68,9 +69,9 @@
储运注意事项
- +
- + \ No newline at end of file diff --git a/src/app/ui/data-push/data-push.component.ts b/src/app/ui/data-push/data-push.component.ts index bda71aa..1748b01 100644 --- a/src/app/ui/data-push/data-push.component.ts +++ b/src/app/ui/data-push/data-push.component.ts @@ -1,30 +1,29 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit } from "@angular/core"; @Component({ - selector: 'app-data-push', - templateUrl: './data-push.component.html', - styleUrls: ['./data-push.component.scss'] + selector: "app-data-push", + templateUrl: "./data-push.component.html", + styleUrls: ["./data-push.component.scss"], }) export class DataPushComponent implements OnInit { + constructor() {} - constructor() { } - - ngOnInit(): void { - - } + ngOnInit(): void {} //路由配置 - routers:any = [ - {name:'基本信息', url: '/ui/plan/basicInfo'}, - {name:'平面图', url: '/ui/plan/planarGraph',id:'B56498312911454698'}, - {name:'四周毗邻', url: '/ui/plan/allaround'}, - {name:'消防设施', url: '/ui/plan/fire-fighting-device'}, - {name:'重点部位', url: '/ui/plan/key-site'}, - {name:'功能分区', url: '/ui/plan/FunctionDivisionLookComponent'}, - {name:'实景图', url: '/ui/plan/realistic-picture'}, - {name:'上传CAD', url: '/ui/plan/UploadingCADLookComponent'} - ] - open3D(){ - window.open("http://121.37.20.190:8088/%5B%E7%BD%91%E9%A1%B5%E7%89%88%5D%E8%B4%B5%E6%B8%AF%E6%B2%B9%E5%BA%93%E4%B8%89%E7%BB%B4%E7%81%AD%E7%81%AB%E9%A2%84%E6%A1%88/") + routers: any = [ + { name: "基本信息", url: "/ui/plan/basicInfo" }, + { name: "平面图", url: "/ui/plan/planarGraph", id: "168541740680000000" }, + { name: "四周毗邻", url: "/ui/plan/allaround" }, + { name: "消防设施", url: "/ui/plan/fire-fighting-device" }, + { name: "重点部位", url: "/ui/plan/key-site" }, + { name: "功能分区", url: "/ui/plan/FunctionDivisionLookComponent" }, + { name: "实景图", url: "/ui/plan/realistic-picture" }, + { name: "上传CAD", url: "/ui/plan/UploadingCADLookComponent" }, + ]; + open3D() { + window.open( + "http://123.60.214.242:10045/GuiGang/[%E7%BD%91%E9%A1%B5%E7%89%88]%E8%B4%B5%E6%B8%AF%E6%B2%B9%E5%BA%93%E4%B8%89%E7%BB%B4%E7%81%AD%E7%81%AB%E9%A2%84%E6%A1%88/index.html" + ); } } diff --git a/src/app/ui/plan-assistance/plan-assistance.component.html b/src/app/ui/plan-assistance/plan-assistance.component.html index e2a1611..be6435a 100644 --- a/src/app/ui/plan-assistance/plan-assistance.component.html +++ b/src/app/ui/plan-assistance/plan-assistance.component.html @@ -12,13 +12,13 @@

{{item.Name}}

{{item.FireTeamName}}

-
已到场
- +
已到场
-
--> +
@@ -27,13 +27,13 @@

{{item.Name}}

{{item.FireTeamName}}

-
已到场
- +
已到场
-
--> + diff --git a/src/app/ui/real-cases/real-cases.component.html b/src/app/ui/real-cases/real-cases.component.html index f851039..891603b 100644 --- a/src/app/ui/real-cases/real-cases.component.html +++ b/src/app/ui/real-cases/real-cases.component.html @@ -1,91 +1,94 @@
-
- volume_up -
-
-
泵房
-
控制室
- -
-
-
- settings_voice -
-
- 按住说话 -
-
- search -
-
+
+ volume_up +
+
+
泵房
+
控制室
+ +
+
+
+ settings_voice +
+
+ 按住说话 +
+
+ search
+
+
- -
-
- - - - - - - - - - - - - - - - - - -
单位名称始建于着火物点火位置相近度详情
{{leisi.danweiName}}{{leisi.year}}{{leisi.zhoahuo}}{{leisi.weizhi}}{{leisi.xiangjin}}%查看详情
-
+ +
+ + + + + + + + + + + + + + + + + + + +
单位名称始建于着火物点火位置相近度详情
{{leisi.danweiName}}{{leisi.year}}{{leisi.zhoahuo}}{{leisi.weizhi}} + {{leisi.xiangjin}}%查看详情
+
- -
-
- 基本信息 -
-
- 事故特点 -
-
- 处置经过 -
-
- 几点体会 -
-
- 存在不足 -
-
- - - clear -
- -
- -
- -
-
- {{item.name}} -
-
- -
- {{zjxinxi}} -
-
- -
+ +
+
+ 基本信息 +
+
+ 事故特点 +
+
+ 处置经过 +
+
+ 几点体会 +
+
+ 存在不足 +
+
+ + + clear +
+ +
+ +
+ +
+
+ {{item.name}}
-
+
+ +
+ {{zjxinxi}} +
+
+ +
+
+
\ No newline at end of file diff --git a/src/app/ui/real-cases/real-cases.component.ts b/src/app/ui/real-cases/real-cases.component.ts index f084d0f..bc952d3 100644 --- a/src/app/ui/real-cases/real-cases.component.ts +++ b/src/app/ui/real-cases/real-cases.component.ts @@ -1,220 +1,368 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit } from "@angular/core"; @Component({ - selector: 'app-real-cases', - templateUrl: './real-cases.component.html', - styleUrls: ['./real-cases.component.scss'] + selector: "app-real-cases", + templateUrl: "./real-cases.component.html", + styleUrls: ["./real-cases.component.scss"], }) export class RealCasesComponent implements OnInit { + constructor() {} - constructor() { } + ngOnInit(): void {} - ngOnInit(): void { - } - - leisiYuan=[ - {danweiName:"江苏南京扬子石化",year:"2017年",zhoahuo:"液态丙烯",weizhi:"烴泵区",xiangjin:parseFloat("50%")}, - {danweiName:"河北张家口中国化工集团盛华化工公司",year:"2018年",zhoahuo:"氯乙烯",weizhi:"氯乙烯一号气柜",xiangjin:parseFloat("40%")}, - {danweiName:"山东临沂金誉石化",year:"2017年",zhoahuo:"液化气",weizhi:"装卸区东北侧11号卸车位",xiangjin:parseFloat("30%")}, - {danweiName:"江苏省靖江市德桥化工仓储有限公司",year:"2016年",zhoahuo:"汽油",weizhi:"2号交换站",xiangjin:parseFloat("20%")}, - {danweiName:"海南东方市八所港危化品码头",year:"2016年",zhoahuo:"石脑油",weizhi:"丰盛油8油轮发动机舱",xiangjin:parseFloat("10%")} - - ] + leisiYuan = [ + { + danweiName: "江苏南京扬子石化", + year: "2017年", + zhoahuo: "液态丙烯", + weizhi: "烴泵区", + xiangjin: parseFloat("50%"), + }, + { + danweiName: "河北张家口中国化工集团盛华化工公司", + year: "2018年", + zhoahuo: "氯乙烯", + weizhi: "氯乙烯一号气柜", + xiangjin: parseFloat("40%"), + }, + { + danweiName: "山东临沂金誉石化", + year: "2017年", + zhoahuo: "液化气", + weizhi: "装卸区东北侧11号卸车位", + xiangjin: parseFloat("30%"), + }, + { + danweiName: "江苏省靖江市德桥化工仓储有限公司", + year: "2016年", + zhoahuo: "汽油", + weizhi: "2号交换站", + xiangjin: parseFloat("20%"), + }, + { + danweiName: "海南东方市八所港危化品码头", + year: "2016年", + zhoahuo: "石脑油", + weizhi: "丰盛油8油轮发动机舱", + xiangjin: parseFloat("10%"), + }, + ]; //弹窗数据 - tandata=[ - {key:0,zongdata:[ - {name:"基本信息",xinxidata:[ - {name:"单位基本情况",xinxi:"江苏德桥化工仓储有限公司位于江苏省靖江市新港园区,是由新加坡恒阳石化物流有限公司投资组建的液体石化产品储运公司," - +"占地面积31.5万m2,现有员工130人,罐区13个、储罐139个,储存能力约58.3万m3。事故发生时储存有汽油、石脑油、甲醇、二氯乙烷、三氯乙烯、四氯乙烯、" - +"液化烃、芳烃、醋酸乙酯、醋酸丁酯、冰醋酸等25种危化品,共计21.12万吨,其中:油品约14万吨、液态化学品近7万吨、主要组分为C3、C4的液化烃约1420吨。" - +"事故单位北侧400m为村庄,东侧120m为储存能力52万m3、22个易燃易爆危化品储罐的联合安能石化有限公司,南侧300m为长江主航道,西侧50m为长江丹华港。"}, - {name:"主要工艺流程",xinxi:"德桥化工仓储有限公司是典型的危化品储运企业,主要从事液态散化、油品及液化气体的仓储中转、分拨、灌装业务。厂区设有2个软管交换站," - +"作为物料集中配输中心,通过输送管线分别连接长江码头、罐区储罐和厂区装卸台,实现危化品物料从码头—罐区—装卸台间的进出双向输转。其中,1号交换站:设有发船泵5台、" - +"发车泵30台,对应11、12、21、22罐区60个储罐的物料分输;2号交换站:设有发船泵6台、发车泵36台,对应13、14、15、23、24、25罐区58个储罐的物料分输。" - +"事故所在的2号交换站,位于厂区中间,24罐区北侧,为半敞开式框架结构,建筑面积1482m2,交换站下层管廊设有码头管线12根,连接长江码头,长度741-1102m、" - +"管径200-300mm;上层管廊设有发车管线36根,连接厂区装卸台,长度477-601m、管径100mm;底部分布有储罐内管线58根,分别连向各罐区储罐的罐根,因各罐区位置不同," - +"管线长度也不一样,总长约为1.1km。事故发生时,长江码头上的码头海油318(船名)、赣华强化016(船名),正在通过2号交换站,分别利用码头206号管线(管径250mm)、" - +"305号管线(管径200mm)进行卸汽油至2411储罐、卸醋酸乙酯至2307储罐的作业。其他10条管线内有残留物料。"}, - {name:"重点危险罐区",xinxi:"厂区危险等级最高的物料:燃烧或爆炸能产生剧毒光气的2406号二氯乙烷罐(存量4274吨)、1108号三氯乙烯罐(存量1988吨)和1105、1109、" - +"2210、2213、2214号四氯乙烯罐(存量9315吨)以及燃烧爆炸后威力巨大、主要组分为C3、C4 的901-926号液化烃罐(存量1536吨)。二氯乙烷:无色或浅黄色透明液体,有类似氯仿的气味," - +"微溶于水,可混溶于醇、醚、氯仿等,主要用于作蜡、脂肪、橡胶等的溶剂及谷物杀虫剂;属高毒类,对眼睛及呼吸道有刺激作用,吸入可引起肺水肿,抑制中枢神经系统、刺激胃肠道和引起肝、肾及肾上腺损害;" - +"其蒸气与空气形成爆炸性混合物,遇明火、高热能引起燃烧爆炸,与氧化剂能发生强烈反应,受高热分解产生有毒的腐蚀性气体。熔点-35.7℃、闪点13℃、沸点83.5℃、饱和蒸气压13.33Kpa/29.4℃,爆炸极限6.2%-16%。" - +"有害燃烧产物:一氧化碳、二氧化碳、氯化氢、光气。三氯乙烯:无色透明液体,有似氯仿的气味,不溶于水,可混溶于乙醇、乙醚等多数有机溶剂,主要用于脱脂、冷冻、农药、香料、橡胶工业、洗涤织物等;吸入后出现头痛、" - +"头晕、酩酊感、嗜睡等,重者发生谵妄、抽搐,甚至昏迷、呼吸麻痹或循环衰竭;其蒸气与空气形成爆炸性混合物,遇明火、高热能引起燃烧爆炸,与强氧化剂可发生反应,受高热分解产生有毒的腐蚀性气体。熔点-87.1℃、闪点32.2℃、" - +"沸点87.1℃、饱和蒸气压13.33Kpa/32℃,爆炸极限12.5%-90%。有害燃烧产物:一氧化碳、二氧化碳、氯化氢、光气。" - +"四氯乙烯:无色液体,有氯仿样气味,不溶于水,可混溶于乙醇、乙醚等多数有机溶剂,主要用作溶剂;吸入急性中毒者有上呼吸道刺激症状、流泪、流涎,随之出现头晕、头痛、恶心、运动失调及酒醉样症状;一般不会燃烧," - +"但长时间暴露在明火及高温下仍能燃烧;若遇高热可发生剧烈分解,引起容器破裂或爆炸事故;受高热分解产生有毒的腐蚀性气体。熔点-22.2℃、沸点121.2℃、饱和蒸气压2.11Kpa/20℃。有害燃烧产物:氯化氢、光气。"}, - {name:"着火区域情况",xinxi:"1、起火区域。起火位置为2号交换站。事故发生时,2号交换站进出料管线内存有汽油、石脑油、甲醇、芳烃、醋酸乙酯、醋酸丁酯、冰醋酸等物料,与其相连的罐区共存储12种、约15.8万吨的危化品。" - +"后期起火的2401罐所在罐区,位于厂区中部,共有12个储罐,呈东、西两排分布,罐区防火堤长170m、宽70m、高1.1m,罐组隔堤高1m,最小罐间距10m。其中,2401-2408号为内浮顶罐、2409-2412号为拱顶罐,2401、2402罐罐容2500m3," - +"其余均为3750m3。事故发生时,2401、2402、2403、2404、2407、2409、2410、2411罐储存汽油共计13482吨,2408、2412罐储存甲醇共计1895吨,2405罐储存汽油添加剂MTBE(又称甲基叔丁基醚)1675吨,2406罐储存二氯乙烷4274吨。" - +"2、毗邻情况。距离着火区域南侧7-8m为2401-2412罐区,储存裂解汽油、石脑油、甲醇、二氯乙烷等约1.8万吨;北侧66m为1301-1308罐区,储存甲醇约2.3万吨;东侧36m为2301-2316罐区,储存醋酸乙酯、醋酸丁酯、冰醋酸等约1.6万吨;" - +"西侧36m为2501-2504罐区,储存混合芳烃约1.5万吨;西侧100m为液化烃罐区,储存主要组分为C3、C4的液化烃约1536吨。"}, - {name:"单位消防设施及水源情况",xinxi:"事故单位设有消防水池1个,容积4864m3;消防水泵房位于厂区东侧,设有消防水泵3台,每台功率480kW、流量250L∕s、扬程130m;消防给水管网为环状、管径500mm,采用稳高压系统,平时压力0.7Mpa;" - +"厂区共有消火栓132只、固定水炮54门。泡沫站位于2号交换站北侧,设有泡沫储罐2座,储存3%型抗溶性水成膜泡沫18吨,泡沫混合液主管道管径200-250mm。各罐区均设有水喷淋冷却系统,除液化烃罐区外,其他罐区还设有泡沫灭火系统;" - +"1、2号交换站未设置自动消防设施。厂区四面有人工河流(护仓河)环绕,南临长江航道,西连丹华港,均可作为消防取水码头。"}, - {name:"单位及周边消防力量情况",xinxi:"德桥化工仓储有限公司只建有微型消防站,没有企业专职消防队。周边20km范围有1个现役消防队、1个政府专职消防队,共有消防车11辆、队员53人,总载水量59吨、泡沫量12.4吨,距离最近的新港城专职队约5公里。"}, - {name:"当日气象情况",xinxi:"气象资料显示:22日-23日,白天多云,夜里多云转阴有小雨,东南风3-4级,最低气温15-16℃,最高气温26-27℃。"} - ]}, - {name:"事故特点",xinxidata:[ - {name:"化学品种类多,危险性大",xinxi:"事故厂区储存有汽油、石脑油、甲醇、二氯乙烷、三氯乙烯、四氯乙烯、液化烃、芳烃、醋酸乙酯、" - +"醋酸丁酯等各类危化品共计25种、21万余吨,且分储在13个罐区内。库区、罐区、罐组、罐与罐的安全间距小,同一罐区、罐组内存有多种易燃易爆、" - +"有毒有害物料,成分复杂,风险极高。特别是厂区储存4274吨二氯乙烷、1988吨三氯乙烯、9315吨四氯乙烯,一旦遇到高热或发生爆炸、燃烧,会快速释放大量的剧毒光气。"}, - {name:"储罐类型复杂,处置难度高",xinxi:"罐区内有拱顶、内浮顶、全压力球型、半冷冻球型等多种储罐类型,储存物料有油、烷烃、醇、酯等," - +"处置方法和灭火药剂类型不同,特别是厂区南侧的二氯乙烷、东北侧的三氯乙烯和四氯乙烯罐以及主要组分为C3、C4的液化烃罐区,危险性大、处置难度高。"}, - {name:"地势落差大,流淌火蔓延快",xinxi:"厂区地势“中间高、南北低”,地面绝对标高相差约1.55m,道路坡度近1%。发生爆炸后,位于厂区中部的2号交换站上方管线被拉断," - +"大量易燃易爆物料外泄并沿地势急速流淌燃烧,将邻近罐区两侧的冷却管线和泡沫灭火管线烧毁。扑救过程中,大面积流淌火先后5次突破灭火防线,烧毁部分器材装备,严重威胁参战官兵生命安全。"}, - {name:"周边环境复杂,指挥决策难度大",xinxi:"事故单位距离长江主航道仅300m,有相邻的危险品码头2个,事发时正在作业的危险品运输船只2艘,其他危险品船只若干;" - +"周边5公里范围有19个村镇6万余名群众。加之事故单位有139个危化品储罐,与其一路之隔的联合安能化工有限公司还有22个、总储量达52万m3的易燃易爆物料储罐,火势一旦失控,极易引起连锁反应,给周边数十平方公里区域和长江水域带来不可估量的灾难。"} - ]}, - {name:"处置过程",xinxidata:[ - {name:"辖区力量到场",xinxi:"4月22日7时许,江苏德桥仓储有限公司组织承包商(华东建设安装有限公司)3名工人进入厂区2号交换站进行检修作业;" - +"8时10分,在未实施有效监护的情况下动火作业;9时13分,因作业产生的明火引起2号交换站排污沟内残留油体燃烧,烧裂正在进料作业的206、305号管线" - +"与储罐间的连接软管,造成管线内的裂解汽油和醋酸乙酯大量外泄燃烧;现场人员关闭了206、305号管线的紧急切断阀,并进行自救;9时16分,DCS系统发出指令," - +"关闭与2号交换站相连的物料输送管道的电动阀;9时18分,现场人员撤离前对2401罐未完全关闭的电动阀实施手动关阀(旋转了4圈);9时18分55秒、9时19分38秒," - +"大火烧裂交换站部分管线,物料外泄加剧,先后发生2次较大规模爆炸;9时26分,事故单位向119报警。9时34分至49分,辖区中队新港城专职队和靖江中队相继到场。" - +"此时,2号交换站一片火海,燃烧面积约2000㎡,火焰高达几十米,上层管廊出现局部坍塌。经询问单位技术人员,厂区所有生产系统已紧急停车,着火区域及邻近罐区的消防泵、" - +"喷淋系统和固定炮已开启,燃烧物质为醇、脂、油类等易燃液体(主要为206、305号管线内的裂解汽油和醋酸乙酯)。到场力量迅速进行战斗部署:新港城专职队一号车泡沫水罐车" - +"停靠1号交换站附近,从着火区域东侧架设1门移动炮阻截火势、1门移动炮冷却2402罐;二号车水罐车占据氮气站附近消火栓,向一号车供水;三号车抢险救援车停靠厂区东门外," - +"负责外围警戒和增援车辆引导。靖江中队一号车压缩空气泡沫车停靠南侧2411罐附近,从着火区域西南侧架设1门移动炮冷却2401罐(后期改为2支泡沫枪灭火);二号车泡沫水罐车占据" - +"南侧人工河,向一号车供水;三号车高喷车停靠西侧2501罐附近,从着火区域西北侧压制火势;四号车泡沫水罐车占据西侧926罐附近消火栓,向三号车供水;五号车泡沫水罐车占据北侧人工河," - +"从着火区域北侧架设1门移动炮阻截火势;六号车抢险救援车停靠厂区东门外,负责外围警戒和增援车辆引导。10时40分,2号交换站发生第三次爆炸,站内承重结构严重受损,管廊呈V型坍塌," - +"与装卸台相连的36条管线以及与码头相连的12条管线被拉断,大量带压物料加速外泄,顺地势沿罐区东、西两侧道路急速流淌,瞬间形成“全路面”流淌火。现场指挥员立即下达紧急撤退命令," - +"参战官兵按照既定路线,迅速撤离至邻近的2502罐南侧未使用的罐区防火堤内。在西南侧承担主攻任务的靖江中队泡沫车驾驶员朱军军,为保证火场供水不间断、掩护战友及时撤退、抢救车辆装备,被流淌火围困,瞬间被大火吞噬,壮烈牺牲。"}, - {name:"支队增援力量到场",xinxi:"10时50分,支队全勤指挥部和特勤、泰兴、通扬路中队到场。此时,交换站及其东、南、西侧道路的流淌火近5000m2,火焰高度约40-50m,严重威胁位于" - +"厂区南侧的液化烃输送管道及24、25罐区的16个储罐安全。指挥部立即组织力量从东、南、西侧部署1门暴雪泡沫炮、2支泡沫枪梯次掩护、强攻推进压制地面流淌火,并重新部署2门移动炮在西侧" - +"道路设置阻截阵地。同时,组织相继到场的姜堰、兴化、滨江、春晖路中队,分别从着火区域西南、东北、东南方向共增设6门移动炮,阻截火势,强行对邻近的2401、2402、2403、2404、2502罐实施冷却、抑制爆炸。"}, - {name:"总队增援力量到场",xinxi:"总队全勤指挥部出动途中,周详总队长通过指挥中心和移动视频终端实时跟踪灾情发展态势、了解战斗部署情况,并及时向前方指挥员下达指示要求:一是迅速查明燃烧物料的种类、性质和储量;" - +"二是力量到场后不得盲目靠近事故核心区,应边行进边侦检,在相对安全区域设置移动炮、车载炮等阵地,确保官兵自身安全;三是组织单位技术人员采取关阀断料、紧急停车、氮封保护、启动固定消防设施等工艺措施,有效控制灾情发展;" - +"四是根据火场态势和力量到场情况,集中全力加强对着火区域邻近罐体的冷却,防止火势扩大蔓延;五是及时关闭罐区雨排系统,安排力量提前筑堤设防,防止流淌火蔓延;六是派出安全哨,实时观察灾情发展态势,不间断监测罐体结构变化和" - +"罐壁温度,明确紧急撤离路线。11时50分至12时,总队全勤指挥部和周详总队长相继到达现场,第一时间在距离2号交换站120m的配电房附近设立火场总指挥部,由周详总队长担任总指挥、高宁宇参谋长担任前沿指挥,朱晖副参谋长负责火情侦察" - +"和通信保障、王士军副参谋长负责统筹协调和药剂保障,责令事故单位指派熟悉厂区情况和工艺安全的技术人员到指挥部全程值守,同时架设无人机高空侦察。指挥部第一时间调取厂区平面图和DCS系统实时监测数据,并围绕着火区域进行火情侦察," - +"确认着火区域南侧为混存裂解汽油、石脑油和燃烧爆炸产生剧毒光气的二氯乙烷罐区;北侧为甲醇罐区;东侧为冰醋酸、醋酸乙酯罐区;西侧为混合芳烃及主要组分为C3、C4的液化烃罐区。无人机航拍发现,2号交换站燃烧猛烈,直接烘烤南侧2401、" - +"2402罐和西侧2502、2504罐;东、西两侧道路形成大面积流淌火迅速向南蔓延;2401-2404罐组防火隔堤内充满流淌火。根据DCS系统监测和无人机侦察结果,考虑到现场力量与灾情态势不对等的现状,指挥部确定了“控制燃烧、冷却抑爆、筑堤设防、" - +"全程监测”的战术原则,并研究制定七项处置措施:一是明确将2406罐和液化烃罐区作为保护重点,集中力量冷却南侧的2401、2402、2403、2404罐和西侧2502、2504罐,阻止火势蔓延;二是组织力量在着火区域东南、西南、西北方向道路上筑堤设防," - +"防止地面流淌火蔓延,威胁战斗阵地和官兵生命安全;三是核查着火罐区关阀断料情况;四是密切监视邻近储罐的结构变化,时刻监测罐体温度以及厂区可燃、有毒气体浓度;五是组织力量接应灭火药剂、装备器材厂家,做好向战斗阵地的输送投放;六是通知" - +"交通部门对长江航道采取禁航措施,撤离事故码头上下游船舶;七是通知环保部门做好防范水域污染的应对措施。12时05分至13时10分,无锡、南通、扬州支队增援力量相继到场。指挥部命令:泰州支队占据着火区域西北侧阵地,继续阻截流淌火向西侧芳烃罐区" - +"蔓延,重点冷却2502、2504罐,防止火势威胁液化烃罐区;无锡支队在着火区域东、西侧道路及南侧设置阵地,扑灭地面流淌火,加强冷却2401、2402、2403、2404罐进行,死保2406罐;扬州支队占据着火区域北侧阵地,阻截流淌火蔓延,加强冷却1307、1406罐;" - +"南通支队2套远程供水泵组分别利用东南侧消防水池和北侧人工河,向无锡和泰州支队阵地供水。12时15分许,着火区域接连传出十几声“嘭嘭”的爆炸声。侦察发现,由于长时间火焰烧烤,与2号交换站相连的部分进出料管线及盲板炸裂,管线内残存的汽油、甲醇、芳烃、" - +"醋酸乙酯、冰醋酸等物料大量外泄(约260吨)。随着火势猛烈燃烧,流淌火再次向东、西两侧排水明渠和道路翻腾外溢,并流淌至厂区南侧人工河流,同时越过西侧道路向芳烃罐区蔓延,2502、2504罐被浓烈的烟火笼罩,2502罐保温层局部脱落。根据火情,指挥部调整" - +"力量部署:在2502罐南侧未使用的罐区防火堤内设置4支泡沫枪阻截扑灭堤外流淌火;在2405—2408罐组防火堤内架设4门移动炮,加强对2403、2404罐冷却控制,继续死保2406罐;在西北侧架设2门移动炮,加强冷却2502、2504罐;在厂区南侧河面上,利用15m拉梯搭建" - +"紧急撤离通道;依托罐区道路和防火堤,从东南、西南、西北三个方向利用沙袋构筑防护堤。同时,考虑2406罐存在爆炸危险,为在紧急情况下掩护官兵撤退,指挥部调集2台涡喷消防车增援现场。随即,指挥部前移至距离着火点30m左右的地点。" - +"12时30分,省委常委、政法委书记、公安厅厅长王立科,省公安厅副厅长程建东到达现场,实地勘察灾情。王立科书记就事故处置工作提出六点要求:一是始终将参战官兵安全放在第一位,加强个人防护;二是发挥厂方技术人员作用,科学制定处置方案;" - +"三是全力控制灾情扩大,做好长时间作战准备;四是如实发布信息,客观规范舆论导向;五是加强外围警戒,严禁无关人员进入现场;六是尽快组织专家评估灾情发展态势。" - +"13时30分至17时45分,常州、苏州、镇江、南京、盐城支队和总队培训基地、公安消防部队士官学校的增援力量陆续到场。指挥部随即将整个火场划分为前、后方两个战区。" - +"前方以事故区域为中心,划分东、西、南、北四个战斗段,要求着火区域必须使用“全泡沫”灭火与冷却。西侧阵地:泰州、苏州、南通、镇江支队和总队培训基地部署4门移动炮、" - +"1门车载炮、1门高喷炮,阻截火势,加强对2401、2403、2502罐冷却,重点保护液化烃罐区。南侧阵地:无锡、常州支队部署8门移动炮,阻截火势,加强对2401、2402、2403、" - +"2404、2405、2406罐冷却,持续死保2406号二氯乙烷罐。东侧阵地:南京、常州、盐城、泰州支队部署8门移动炮,阻截火势,加强对2401、2402、2404、2301、2303罐冷却。" - +"北侧阵地:南京、扬州、泰州、南通、苏州支队部署10门移动炮、2门高喷炮、2门暴雪泡沫炮,阻截火势,加强对1307、1308罐冷却。" - +"后方调集全省10套远程供水泵组、4辆泡沫原液供给车、40台泡沫输转泵、1200吨抗溶性泡沫,依托厂区人工河和长江航道设立取水点,设置2个泡沫补给点,全力保障火场不间断供水、" - +"供液。远程供水:常州、无锡支队2套泵组利用厂区东南侧消防水池,向南侧、东侧阵地供水;苏州支队1套泵组利用北侧人工河,向北侧阵地供水;南通支队3套泵组分别利用厂区东南侧消防" - +"水池、北侧人工河和南面长江干道,向南侧、北侧阵地供水;扬州支队1套泵组利用北侧人工河,向北侧阵地供水;泰州支队2套泵组分别利用南侧人工河和长江主干道,向消防水池和东侧阵地供水;" - +"培训基地1套泵组利用北侧人工河,向西侧阵地供水。泡沫供给:分别在东、西门附近设置2个泡沫补给点,采取泡沫原液供给车输转、泡沫输转泵输转、人工搬运等多种方法,向各战斗阵地不间断补给泡沫药剂。" - +"14时50分,指挥部决定:组织公安消防部队士官学校132名官兵,分别在东、西、北侧进攻路线上布设第二道防护堤,组织力量死看死守,牢牢将火势控制在交换站周边区域内。" - +"16时11分,2号交换站火势突然急剧增大,巨大的火球腾空而起,近百米高的浓烟烈火笼罩厂区上空,东、西两侧部分道路和2401-2404罐防火隔堤内瞬间布满流淌火。加之厂区邻近" - +"长江、风向多次突变,固定泡沫站被大火完全吞噬,强大的热辐射对邻近2号交换站北侧的甲醇和西北侧的芳烃等罐区安全构成了极大的威胁,人员难以靠近。指挥部根据物料泄漏量、" - +"流淌速度及燃烧时间推断,2401-2404罐组存在储罐阀门未完全关闭,提出了“加强筑堤保护、全力阻截流淌火、持续强化冷却、伺机抵近关阀”的针对性措施。鉴于1307、1308罐体外壁温度均已超过300℃," - +"命令北侧阵地的扬州、泰州、苏州支队尽全力冷却1307、1308甲醇罐。" - +"16时45分,紧急调集的2万米水带、30门移动炮、100套隔热服、30台泡沫输转泵、300套防毒面具全部到场,做好了打持久战的准备。" - +"18时,指挥部根据兵力部署、火场态势和泡沫药剂、水源准备情况,发动第一次总攻,共部署30门移动炮、3门高喷炮、1门车载炮、2门暴雪泡沫炮、21支泡沫管枪强攻灭火。" - +"18时30分,交换站东、西两侧地面流淌火被陆续扑灭,前期丢失的部分阵地重新占领,灭火力量与灾情态势相对均衡,火场进入拉锯相持阶段。" - +"18时40分,指挥部明确四项措施:一是各阵地灭火冷却强度保持均衡;二是确保泡沫药剂、油料、供水不间断;三是加紧筑堤,巩固阵地;四是战斗预备队做好轮换准备。" - +"19时许,淮安、宿迁、连云港、徐州4个支队,中石化华东片区的扬子石化、金陵石化、仪征化纤、南化公司、管道分公司、高桥石化6个企业专职消防队,共51辆重型泡沫车、342名队员," - +"以及总队2套单车400L/s的超重型化工编队,到达现场。按照指挥部要求,立即组成战斗预备队,做好随时轮换投入战斗的准备。" - +"19时45分,伴随着几声巨响,数个火球接连腾起,管道再次爆裂,交换站东、西两侧道路再次出现大面积流淌火,2401罐顶鼓起,呼吸阀和泡沫产生器罐壁连接处起火," - +"呈火炬型燃烧。指挥部要求前沿指挥长密切监控火情,必要时有权决定撤退,确保安全。囿于高喷车难以抵近作战、移动炮和车载炮射程不足,指挥部要求加大供给强度,加强2401罐冷却,责成企业调集氮气车沿2401罐的东南侧道路停靠,强制向2401罐实施充氮保护。"}, - {name:"部局领导到场",xinxi:"20时10分,罗永强副局长一行到达现场。在听取情况汇报、查看无人机视频后,罗永强副局长率领部局专家组深入现场,抵近着火点侦察,与化工专家研判商讨后," - +"作出战斗部署:一是即将到场的上海增援力量配合无锡支队在重点防御的西南侧阵地展开战斗;二是再次确认所有储罐阀门关闭情况;三是调用高喷车对受火势威胁较大的1307、1308罐进一步强化冷却。" - +"20时30分,上海总队汪永明副总队长率领增援力量到场。根据罗永强副局长指示,组织力量从着火区域西南侧架设6门移动炮,协助无锡支队阻截交换站火势,并对2401、2403罐实施冷却。" - +"21时50分,部消防局于建华局长带领工作组到达现场,详细听取现场情况汇报,深入前沿阵地勘察火情,准确研判火灾发展态势,迅速召集各战斗段指挥员和事故单位工程技术人员,提出五项处置措施:" - +"一是保持足够力量对着火邻近储罐进行大强度冷却,确保不发生问题;二是从临近地区调集氮气,架设临时管线,对受火势威胁的储罐进行充氮保护;三是外接临时电源,启动西侧半冷冻球罐冰机;" - +"四是备足力量和药剂,择机对交换站及罐区实施强攻灭火;五是树立底线意识,组织疏散半径5公里范围内的群众。" - +"根据于建华局长指示,4个战斗区段分别增设1门移动炮加强对邻近罐冷却;组织对2401-2404罐组防火堤进行凿孔导流,降低液面、防止漫堤;" - +"加强对2401-2404罐补充氮气保护;协调当地政府疏散周边5公里范围内的群众;各战斗阵地迅速补足泡沫和油料,组织预备力量轮换,做好总攻准备。" - +"23日0时左右,2号交换站内火势仍呈喷射状燃烧。根据现场情况,于建华局长召集专家分析认定,罐区内仍有管线阀门未关闭,随即要求0时至1时再次发动总攻,为关阀断料创造条件。" - +"0时30分,各阵地共部署42门移动炮、1门高喷炮、2门车载炮、2门暴雪泡沫炮、21支泡沫管枪,对着火区域及邻近罐区发起第二次总攻,2401-2404罐组内的流淌火、" - +"2401罐顶呼吸阀和泡沫产生器罐壁连接处的明火被全部扑灭,2号交换站火势有所减弱。前沿侦察小组冒着强辐射热,抵近火场最前沿,反复观察火情,认为现场已具备关阀条件," - +"当即向于建华局长报告。于建华局长当机立断、果断决策,命令实施关阀断料。随后,罗永强副局长亲自排查罐区管线,制定关阀方案,指挥南京支队关阀攻坚小组," - +"在雾状水掩护下深入罐区防火堤内实施关阀断料。0时40分,2403、2404罐的进出料阀门被彻底关闭。" - +"1时10分,2401罐的进出料阀门被彻底关闭。随后,火势明显减弱。指挥部命令,在保证冷却力量的前提下,各战斗段抢抓战机,梯次掩护推进,全力围剿火势。3时10分,大火被彻底扑灭。"}, - {name:"冷却监护、移交现场",xinxi:"大火扑灭后,现场指挥部命令参战力量继续向着火区域液面喷射泡沫,增加泡沫覆盖厚度,防止复燃。同时继续冷却相邻罐体、持续降温," - +"安排专人对罐体温度和水样、空气进行不间断检测。4时25分,2401、2403、2404罐壁温度降至40℃以下,其它罐降至20℃左右,空气、水体检测结果基本正常。" - +"9时30分,指挥部召集参战队伍指挥员进行战斗小结,明确苏州、无锡、南通、镇江、扬州5个支队,25辆消防车、150名官兵留守现场,配合泰州支队实施监护,其余力量陆续返回。" - +"25日12时,现场所有储罐温度均降至常温,增援支队全部撤回,泰州支队17辆消防车、102名官兵继续监护。"} - ]}, - {name:"几点体会",xinxidata:[ - {name:"领导高度重视、正确指挥是先决条件",xinxi:"事故发生后,按照习近平总书记、李克强总理作出的批示指示,郭声琨部长,黄明、李伟副部长坐镇公安部指挥中心," - +"通过音视频系统指导现场处置工作,尤其是李伟副部长全程、实时跟踪指导一线战斗行动,明确了5条富有实效的战斗措施,为整个灭火救援战斗提供了科学遵循。江苏省委书记罗志军、" - +"省长石泰峰,省委常委、政法委书记、公安厅厅长王立科,公安部消防局局长于建华、副局长罗永强深入火场前沿阵地,指导事故处置工作,鼓舞士气、凝聚警心,为全体参战官兵注入了强大的精神动力。" - +"特别是于建华局长、罗永强副局长率先垂范、靠前指挥,准确研判、抢抓战机、果断决策,采取了一系列行之有效的灭火措施,从根本上遏制了火灾态势,为最终圆满打赢了这场险象环生的战斗起到了决定性作用。"}, - {name:"力量调集充分、响应迅速是有力支撑",xinxi:"针对石油化工火灾的特殊复杂性和灾情预判情况,总队第一时间提请省政府启动重特大灾害事故应急处置预案,按火灾最高等级调集全省13个支队和总队培训基地28个化工编队、" - +"4个战勤保障编队、10套远程供水泵组、124辆大功率泡沫水罐车、161门移动炮、1200吨抗溶性泡沫以及通信、侦检、洗消等装备器材,部消防局紧急调派公安消防部队士官学校和上海总队40辆车、332名官兵到场增援,为打好初战控制、有效遏制灾情扩大提供了有力保障。"}, - {name:"发挥专家作用、科学施救是关键所在",xinxi:"事故发生后,部消防局和总队紧急调派化工灭火专家遂行出动、辅助决策。专家组根据侦察结果,实时评估灾情发展态势和罐体设备安全,及时提出了筑堤设防、全力冷却、" - +"注氮排险等处置建议。尤其是公安部灭火救援专家组郝伟同志,在事故单位2次关阀未果的情况下,多次抵近罐区侦察,与罗永强副局长一起全程指导攻坚组关阀,对成功扑灭大火起到了十分关键的作用。"}, - {name:"应急联动高效、保障有力是重要基础",xinxi:"事故发生后,省、市两级市政府迅速启动应急预案和联动机制,公安、安监、交通、气象、卫生、供水、供电、环保等部门第一时间响应,调集了客运车、环境检测车、" - +"120救护车、叉车、运沙车等各种车辆40余辆和砂土、水泥等应急物资,协同开展了外围警戒、人员疏散、物资保障、环境监测、医疗急救等工作。总、支队两级战勤保障和应急通信力量遂行作战,调集战勤保障车辆22辆、" - +"器材装备600余件套、水带2万多米、泡沫灭火剂约1200吨、油料约52吨,综合利用4G球机、3G单兵、卫星通信指挥车、无人机等设备,实时采集全景视频、火点分布、罐体温度等数据,不间断上传重点部位图像,为现场指挥决策提供了科学参考。"}, - {name:"官兵英勇顽强、舍生忘死是根本保证",xinxi:"面对高温、浓烟、毒害气体和随时可能发生的爆炸,参战官兵从将军到士兵无一人退缩,始终战斗在灭火最前沿,面对生与死的考验,表现出应有的血性和担当。在多次进攻受阻的情况下,全体参战官兵顶着巨大压力,敢打敢拼、死守“红线”,与大火展开拉锯战、攻坚战,彰显了消防铁军英勇善战、敢打必胜的战斗精神。"} - ]} - ]}, - {key:1,zongdata:[ - {name:"基本信息",xinxidata:[ - {name:"码头基本情况",xinxi:"八所港危化品码头位于东方市滨海南路,东侧为中海石油建滔化工有限公司化工厂区(甲醇项目)、中海油东方石化有限责任公司化工厂区" - +"(DCC项目),西侧、北侧、南侧为大海。码头设置3个泊位,1号泊位为10000吨级,2号泊位为5000吨级,3号泊位为50000吨级。该码头目前运营工业园区六家公司的产品," - +"共有甲醇、原油、汽油、柴油、LPG、丙烯、MTBE等16种作业介质,年吞吐量约为520万吨。"},{name:"事故油轮基本情况",xinxi:"“丰盛油8 号”船体总长99.87m,型宽14.2m,吃水深度7.1m," - +"满载为4800 吨。船体前端和中段共有10 个储油舱,分布在船体左右两侧,每个储油舱480 吨。船尾甲板以上共3 层,分别为驾驶室、船员舱和生活舱。船尾负二层为船员舱,负一层底舱为机" - +"舱,机舱和货舱之间为泵舱。事故发生时油轮已装油完毕正准备离港。"},{name:"石脑油理化性质",xinxi:"石脑油化学俗名为溶剂油、粗汽油,是一种无色或浅黄色易燃液体,有特殊气味。其蒸汽与空气混合,能形成爆炸性混合物。" - +"相对密度为0.78~0.97,闪点小于-18℃,燃点为260℃,爆炸极限%(V/V)为1.2~6.8。不溶于水,溶于多数有机溶剂,主要成分为烷烃的-C4~C6-成分。蒸汽比空气重,沿地面扩散并易积存于低洼处,遇火源会着火回燃。" - +"能够通过呼吸道吸入、皮肤接触、食入等方式进入体内,石脑油蒸气可引起眼及上呼吸道刺激症状。如浓度过高,几分钟即可引起呼吸困难、紫绀等缺氧症状。"}, - {name:"消防水源及消防设施情况",xinxi:"该码头设施的消防用水采用两路供水,一路由后方甲醇项目厂区2 座各为容量4000m3 的消防水池提供,另外一路由后方精细化工项目厂区内2 座各为容量10000m3的消防水池提供,由2 条管" - +"径DN400mm 的消防供水干管接至码头,消防管网供水能力为600L/S,压力0.7~1.2MPa。码头设置46 套消防栓箱、1 套水幕系统、2 套ZPF3000 干粉灭火系统、8 座消防炮塔(每座炮塔上有" - +"电动遥控消防泡沫炮和水炮各一门,消防水炮和消防泡沫炮流量均为80L/s),备有抗溶性水成膜泡沫25 吨,存储在泡沫泵房内,通过比例混合器直接进入泡沫管线,向泡沫栓供给。码头周边" - +"1000m 范围内有可用市政消火栓10 个(园区三路2 个,疏港北路2 个,疏港三中路6 个),压力为0.2~0.3MPa,另距离码头约300m处有华能电厂码头可作为海水取水点。"} - ]} - ]} - ] - zongdata - centerdata + tandata = [ + { + key: 0, + zongdata: [ + { + name: "基本信息", + xinxidata: [ + { + name: "单位基本情况", + xinxi: + "江苏德桥化工仓储有限公司位于江苏省靖江市新港园区,是由新加坡恒阳石化物流有限公司投资组建的液体石化产品储运公司," + + "占地面积31.5万m2,现有员工130人,罐区13个、储罐139个,储存能力约58.3万m3。事故发生时储存有汽油、石脑油、甲醇、二氯乙烷、三氯乙烯、四氯乙烯、" + + "液化烃、芳烃、醋酸乙酯、醋酸丁酯、冰醋酸等25种危化品,共计21.12万吨,其中:油品约14万吨、液态化学品近7万吨、主要组分为C3、C4的液化烃约1420吨。" + + "事故单位北侧400m为村庄,东侧120m为储存能力52万m3、22个易燃易爆危化品储罐的联合安能石化有限公司,南侧300m为长江主航道,西侧50m为长江丹华港。", + }, + { + name: "主要工艺流程", + xinxi: + "德桥化工仓储有限公司是典型的危化品储运企业,主要从事液态散化、油品及液化气体的仓储中转、分拨、灌装业务。厂区设有2个软管交换站," + + "作为物料集中配输中心,通过输送管线分别连接长江码头、罐区储罐和厂区装卸台,实现危化品物料从码头—罐区—装卸台间的进出双向输转。其中,1号交换站:设有发船泵5台、" + + "发车泵30台,对应11、12、21、22罐区60个储罐的物料分输;2号交换站:设有发船泵6台、发车泵36台,对应13、14、15、23、24、25罐区58个储罐的物料分输。" + + "事故所在的2号交换站,位于厂区中间,24罐区北侧,为半敞开式框架结构,建筑面积1482m2,交换站下层管廊设有码头管线12根,连接长江码头,长度741-1102m、" + + "管径200-300mm;上层管廊设有发车管线36根,连接厂区装卸台,长度477-601m、管径100mm;底部分布有储罐内管线58根,分别连向各罐区储罐的罐根,因各罐区位置不同," + + "管线长度也不一样,总长约为1.1km。事故发生时,长江码头上的码头海油318(船名)、赣华强化016(船名),正在通过2号交换站,分别利用码头206号管线(管径250mm)、" + + "305号管线(管径200mm)进行卸汽油至2411储罐、卸醋酸乙酯至2307储罐的作业。其他10条管线内有残留物料。", + }, + { + name: "重点危险罐区", + xinxi: + "厂区危险等级最高的物料:燃烧或爆炸能产生剧毒光气的2406号二氯乙烷罐(存量4274吨)、1108号三氯乙烯罐(存量1988吨)和1105、1109、" + + "2210、2213、2214号四氯乙烯罐(存量9315吨)以及燃烧爆炸后威力巨大、主要组分为C3、C4 的901-926号液化烃罐(存量1536吨)。二氯乙烷:无色或浅黄色透明液体,有类似氯仿的气味," + + "微溶于水,可混溶于醇、醚、氯仿等,主要用于作蜡、脂肪、橡胶等的溶剂及谷物杀虫剂;属高毒类,对眼睛及呼吸道有刺激作用,吸入可引起肺水肿,抑制中枢神经系统、刺激胃肠道和引起肝、肾及肾上腺损害;" + + "其蒸气与空气形成爆炸性混合物,遇明火、高热能引起燃烧爆炸,与氧化剂能发生强烈反应,受高热分解产生有毒的腐蚀性气体。熔点-35.7℃、闪点13℃、沸点83.5℃、饱和蒸气压13.33Kpa/29.4℃,爆炸极限6.2%-16%。" + + "有害燃烧产物:一氧化碳、二氧化碳、氯化氢、光气。三氯乙烯:无色透明液体,有似氯仿的气味,不溶于水,可混溶于乙醇、乙醚等多数有机溶剂,主要用于脱脂、冷冻、农药、香料、橡胶工业、洗涤织物等;吸入后出现头痛、" + + "头晕、酩酊感、嗜睡等,重者发生谵妄、抽搐,甚至昏迷、呼吸麻痹或循环衰竭;其蒸气与空气形成爆炸性混合物,遇明火、高热能引起燃烧爆炸,与强氧化剂可发生反应,受高热分解产生有毒的腐蚀性气体。熔点-87.1℃、闪点32.2℃、" + + "沸点87.1℃、饱和蒸气压13.33Kpa/32℃,爆炸极限12.5%-90%。有害燃烧产物:一氧化碳、二氧化碳、氯化氢、光气。" + + "四氯乙烯:无色液体,有氯仿样气味,不溶于水,可混溶于乙醇、乙醚等多数有机溶剂,主要用作溶剂;吸入急性中毒者有上呼吸道刺激症状、流泪、流涎,随之出现头晕、头痛、恶心、运动失调及酒醉样症状;一般不会燃烧," + + "但长时间暴露在明火及高温下仍能燃烧;若遇高热可发生剧烈分解,引起容器破裂或爆炸事故;受高热分解产生有毒的腐蚀性气体。熔点-22.2℃、沸点121.2℃、饱和蒸气压2.11Kpa/20℃。有害燃烧产物:氯化氢、光气。", + }, + { + name: "着火区域情况", + xinxi: + "1、起火区域。起火位置为2号交换站。事故发生时,2号交换站进出料管线内存有汽油、石脑油、甲醇、芳烃、醋酸乙酯、醋酸丁酯、冰醋酸等物料,与其相连的罐区共存储12种、约15.8万吨的危化品。" + + "后期起火的2401罐所在罐区,位于厂区中部,共有12个储罐,呈东、西两排分布,罐区防火堤长170m、宽70m、高1.1m,罐组隔堤高1m,最小罐间距10m。其中,2401-2408号为内浮顶罐、2409-2412号为拱顶罐,2401、2402罐罐容2500m3," + + "其余均为3750m3。事故发生时,2401、2402、2403、2404、2407、2409、2410、2411罐储存汽油共计13482吨,2408、2412罐储存甲醇共计1895吨,2405罐储存汽油添加剂MTBE(又称甲基叔丁基醚)1675吨,2406罐储存二氯乙烷4274吨。" + + "2、毗邻情况。距离着火区域南侧7-8m为2401-2412罐区,储存裂解汽油、石脑油、甲醇、二氯乙烷等约1.8万吨;北侧66m为1301-1308罐区,储存甲醇约2.3万吨;东侧36m为2301-2316罐区,储存醋酸乙酯、醋酸丁酯、冰醋酸等约1.6万吨;" + + "西侧36m为2501-2504罐区,储存混合芳烃约1.5万吨;西侧100m为液化烃罐区,储存主要组分为C3、C4的液化烃约1536吨。", + }, + { + name: "单位消防设施及水源情况", + xinxi: + "事故单位设有消防水池1个,容积4864m3;消防水泵房位于厂区东侧,设有消防水泵3台,每台功率480kW、流量250L∕s、扬程130m;消防给水管网为环状、管径500mm,采用稳高压系统,平时压力0.7Mpa;" + + "厂区共有消火栓132只、固定水炮54门。泡沫站位于2号交换站北侧,设有泡沫储罐2座,储存3%型抗溶性水成膜泡沫18吨,泡沫混合液主管道管径200-250mm。各罐区均设有水喷淋冷却系统,除液化烃罐区外,其他罐区还设有泡沫灭火系统;" + + "1、2号交换站未设置自动消防设施。厂区四面有人工河流(护仓河)环绕,南临长江航道,西连丹华港,均可作为消防取水码头。", + }, + { + name: "单位及周边消防力量情况", + xinxi: + "德桥化工仓储有限公司只建有微型消防站,没有企业专职消防队。周边20km范围有1个现役消防队、1个政府专职消防队,共有消防车11辆、队员53人,总载水量59吨、泡沫量12.4吨,距离最近的新港城专职队约5公里。", + }, + { + name: "当日气象情况", + xinxi: + "气象资料显示:22日-23日,白天多云,夜里多云转阴有小雨,东南风3-4级,最低气温15-16℃,最高气温26-27℃。", + }, + ], + }, + { + name: "事故特点", + xinxidata: [ + { + name: "化学品种类多,危险性大", + xinxi: + "事故厂区储存有汽油、石脑油、甲醇、二氯乙烷、三氯乙烯、四氯乙烯、液化烃、芳烃、醋酸乙酯、" + + "醋酸丁酯等各类危化品共计25种、21万余吨,且分储在13个罐区内。库区、罐区、罐组、罐与罐的安全间距小,同一罐区、罐组内存有多种易燃易爆、" + + "有毒有害物料,成分复杂,风险极高。特别是厂区储存4274吨二氯乙烷、1988吨三氯乙烯、9315吨四氯乙烯,一旦遇到高热或发生爆炸、燃烧,会快速释放大量的剧毒光气。", + }, + { + name: "储罐类型复杂,处置难度高", + xinxi: + "罐区内有拱顶、内浮顶、全压力球型、半冷冻球型等多种储罐类型,储存物料有油、烷烃、醇、酯等," + + "处置方法和灭火药剂类型不同,特别是厂区南侧的二氯乙烷、东北侧的三氯乙烯和四氯乙烯罐以及主要组分为C3、C4的液化烃罐区,危险性大、处置难度高。", + }, + { + name: "地势落差大,流淌火蔓延快", + xinxi: + "厂区地势“中间高、南北低”,地面绝对标高相差约1.55m,道路坡度近1%。发生爆炸后,位于厂区中部的2号交换站上方管线被拉断," + + "大量易燃易爆物料外泄并沿地势急速流淌燃烧,将邻近罐区两侧的冷却管线和泡沫灭火管线烧毁。扑救过程中,大面积流淌火先后5次突破灭火防线,烧毁部分器材装备,严重威胁参战官兵生命安全。", + }, + { + name: "周边环境复杂,指挥决策难度大", + xinxi: + "事故单位距离长江主航道仅300m,有相邻的危险品码头2个,事发时正在作业的危险品运输船只2艘,其他危险品船只若干;" + + "周边5公里范围有19个村镇6万余名群众。加之事故单位有139个危化品储罐,与其一路之隔的联合安能化工有限公司还有22个、总储量达52万m3的易燃易爆物料储罐,火势一旦失控,极易引起连锁反应,给周边数十平方公里区域和长江水域带来不可估量的灾难。", + }, + ], + }, + { + name: "处置过程", + xinxidata: [ + { + name: "辖区力量到场", + xinxi: + "4月22日7时许,江苏德桥仓储有限公司组织承包商(华东建设安装有限公司)3名工人进入厂区2号交换站进行检修作业;" + + "8时10分,在未实施有效监护的情况下动火作业;9时13分,因作业产生的明火引起2号交换站排污沟内残留油体燃烧,烧裂正在进料作业的206、305号管线" + + "与储罐间的连接软管,造成管线内的裂解汽油和醋酸乙酯大量外泄燃烧;现场人员关闭了206、305号管线的紧急切断阀,并进行自救;9时16分,DCS系统发出指令," + + "关闭与2号交换站相连的物料输送管道的电动阀;9时18分,现场人员撤离前对2401罐未完全关闭的电动阀实施手动关阀(旋转了4圈);9时18分55秒、9时19分38秒," + + "大火烧裂交换站部分管线,物料外泄加剧,先后发生2次较大规模爆炸;9时26分,事故单位向119报警。9时34分至49分,辖区中队新港城专职队和靖江中队相继到场。" + + "此时,2号交换站一片火海,燃烧面积约2000㎡,火焰高达几十米,上层管廊出现局部坍塌。经询问单位技术人员,厂区所有生产系统已紧急停车,着火区域及邻近罐区的消防泵、" + + "喷淋系统和固定炮已开启,燃烧物质为醇、脂、油类等易燃液体(主要为206、305号管线内的裂解汽油和醋酸乙酯)。到场力量迅速进行战斗部署:新港城专职队一号车泡沫水罐车" + + "停靠1号交换站附近,从着火区域东侧架设1门移动炮阻截火势、1门移动炮冷却2402罐;二号车水罐车占据氮气站附近消火栓,向一号车供水;三号车抢险救援车停靠厂区东门外," + + "负责外围警戒和增援车辆引导。靖江中队一号车压缩空气泡沫车停靠南侧2411罐附近,从着火区域西南侧架设1门移动炮冷却2401罐(后期改为2支泡沫枪灭火);二号车泡沫水罐车占据" + + "南侧人工河,向一号车供水;三号车高喷车停靠西侧2501罐附近,从着火区域西北侧压制火势;四号车泡沫水罐车占据西侧926罐附近消火栓,向三号车供水;五号车泡沫水罐车占据北侧人工河," + + "从着火区域北侧架设1门移动炮阻截火势;六号车抢险救援车停靠厂区东门外,负责外围警戒和增援车辆引导。10时40分,2号交换站发生第三次爆炸,站内承重结构严重受损,管廊呈V型坍塌," + + "与装卸台相连的36条管线以及与码头相连的12条管线被拉断,大量带压物料加速外泄,顺地势沿罐区东、西两侧道路急速流淌,瞬间形成“全路面”流淌火。现场指挥员立即下达紧急撤退命令," + + "参战官兵按照既定路线,迅速撤离至邻近的2502罐南侧未使用的罐区防火堤内。在西南侧承担主攻任务的靖江中队泡沫车驾驶员朱军军,为保证火场供水不间断、掩护战友及时撤退、抢救车辆装备,被流淌火围困,瞬间被大火吞噬,壮烈牺牲。", + }, + { + name: "支队增援力量到场", + xinxi: + "10时50分,支队全勤指挥部和特勤、泰兴、通扬路中队到场。此时,交换站及其东、南、西侧道路的流淌火近5000m2,火焰高度约40-50m,严重威胁位于" + + "厂区南侧的液化烃输送管道及24、25罐区的16个储罐安全。指挥部立即组织力量从东、南、西侧部署1门暴雪泡沫炮、2支泡沫枪梯次掩护、强攻推进压制地面流淌火,并重新部署2门移动炮在西侧" + + "道路设置阻截阵地。同时,组织相继到场的姜堰、兴化、滨江、春晖路中队,分别从着火区域西南、东北、东南方向共增设6门移动炮,阻截火势,强行对邻近的2401、2402、2403、2404、2502罐实施冷却、抑制爆炸。", + }, + { + name: "总队增援力量到场", + xinxi: + "总队全勤指挥部出动途中,周详总队长通过指挥中心和移动视频终端实时跟踪灾情发展态势、了解战斗部署情况,并及时向前方指挥员下达指示要求:一是迅速查明燃烧物料的种类、性质和储量;" + + "二是力量到场后不得盲目靠近事故核心区,应边行进边侦检,在相对安全区域设置移动炮、车载炮等阵地,确保官兵自身安全;三是组织单位技术人员采取关阀断料、紧急停车、氮封保护、启动固定消防设施等工艺措施,有效控制灾情发展;" + + "四是根据火场态势和力量到场情况,集中全力加强对着火区域邻近罐体的冷却,防止火势扩大蔓延;五是及时关闭罐区雨排系统,安排力量提前筑堤设防,防止流淌火蔓延;六是派出安全哨,实时观察灾情发展态势,不间断监测罐体结构变化和" + + "罐壁温度,明确紧急撤离路线。11时50分至12时,总队全勤指挥部和周详总队长相继到达现场,第一时间在距离2号交换站120m的配电房附近设立火场总指挥部,由周详总队长担任总指挥、高宁宇参谋长担任前沿指挥,朱晖副参谋长负责火情侦察" + + "和通信保障、王士军副参谋长负责统筹协调和药剂保障,责令事故单位指派熟悉厂区情况和工艺安全的技术人员到指挥部全程值守,同时架设无人机高空侦察。指挥部第一时间调取厂区平面图和DCS系统实时监测数据,并围绕着火区域进行火情侦察," + + "确认着火区域南侧为混存裂解汽油、石脑油和燃烧爆炸产生剧毒光气的二氯乙烷罐区;北侧为甲醇罐区;东侧为冰醋酸、醋酸乙酯罐区;西侧为混合芳烃及主要组分为C3、C4的液化烃罐区。无人机航拍发现,2号交换站燃烧猛烈,直接烘烤南侧2401、" + + "2402罐和西侧2502、2504罐;东、西两侧道路形成大面积流淌火迅速向南蔓延;2401-2404罐组防火隔堤内充满流淌火。根据DCS系统监测和无人机侦察结果,考虑到现场力量与灾情态势不对等的现状,指挥部确定了“控制燃烧、冷却抑爆、筑堤设防、" + + "全程监测”的战术原则,并研究制定七项处置措施:一是明确将2406罐和液化烃罐区作为保护重点,集中力量冷却南侧的2401、2402、2403、2404罐和西侧2502、2504罐,阻止火势蔓延;二是组织力量在着火区域东南、西南、西北方向道路上筑堤设防," + + "防止地面流淌火蔓延,威胁战斗阵地和官兵生命安全;三是核查着火罐区关阀断料情况;四是密切监视邻近储罐的结构变化,时刻监测罐体温度以及厂区可燃、有毒气体浓度;五是组织力量接应灭火药剂、装备器材厂家,做好向战斗阵地的输送投放;六是通知" + + "交通部门对长江航道采取禁航措施,撤离事故码头上下游船舶;七是通知环保部门做好防范水域污染的应对措施。12时05分至13时10分,无锡、南通、扬州支队增援力量相继到场。指挥部命令:泰州支队占据着火区域西北侧阵地,继续阻截流淌火向西侧芳烃罐区" + + "蔓延,重点冷却2502、2504罐,防止火势威胁液化烃罐区;无锡支队在着火区域东、西侧道路及南侧设置阵地,扑灭地面流淌火,加强冷却2401、2402、2403、2404罐进行,死保2406罐;扬州支队占据着火区域北侧阵地,阻截流淌火蔓延,加强冷却1307、1406罐;" + + "南通支队2套远程供水泵组分别利用东南侧消防水池和北侧人工河,向无锡和泰州支队阵地供水。12时15分许,着火区域接连传出十几声“嘭嘭”的爆炸声。侦察发现,由于长时间火焰烧烤,与2号交换站相连的部分进出料管线及盲板炸裂,管线内残存的汽油、甲醇、芳烃、" + + "醋酸乙酯、冰醋酸等物料大量外泄(约260吨)。随着火势猛烈燃烧,流淌火再次向东、西两侧排水明渠和道路翻腾外溢,并流淌至厂区南侧人工河流,同时越过西侧道路向芳烃罐区蔓延,2502、2504罐被浓烈的烟火笼罩,2502罐保温层局部脱落。根据火情,指挥部调整" + + "力量部署:在2502罐南侧未使用的罐区防火堤内设置4支泡沫枪阻截扑灭堤外流淌火;在2405—2408罐组防火堤内架设4门移动炮,加强对2403、2404罐冷却控制,继续死保2406罐;在西北侧架设2门移动炮,加强冷却2502、2504罐;在厂区南侧河面上,利用15m拉梯搭建" + + "紧急撤离通道;依托罐区道路和防火堤,从东南、西南、西北三个方向利用沙袋构筑防护堤。同时,考虑2406罐存在爆炸危险,为在紧急情况下掩护官兵撤退,指挥部调集2台涡喷消防车增援现场。随即,指挥部前移至距离着火点30m左右的地点。" + + "12时30分,省委常委、政法委书记、公安厅厅长王立科,省公安厅副厅长程建东到达现场,实地勘察灾情。王立科书记就事故处置工作提出六点要求:一是始终将参战官兵安全放在第一位,加强个人防护;二是发挥厂方技术人员作用,科学制定处置方案;" + + "三是全力控制灾情扩大,做好长时间作战准备;四是如实发布信息,客观规范舆论导向;五是加强外围警戒,严禁无关人员进入现场;六是尽快组织专家评估灾情发展态势。" + + "13时30分至17时45分,常州、苏州、镇江、南京、盐城支队和总队培训基地、公安消防部队士官学校的增援力量陆续到场。指挥部随即将整个火场划分为前、后方两个战区。" + + "前方以事故区域为中心,划分东、西、南、北四个战斗段,要求着火区域必须使用“全泡沫”灭火与冷却。西侧阵地:泰州、苏州、南通、镇江支队和总队培训基地部署4门移动炮、" + + "1门车载炮、1门高喷炮,阻截火势,加强对2401、2403、2502罐冷却,重点保护液化烃罐区。南侧阵地:无锡、常州支队部署8门移动炮,阻截火势,加强对2401、2402、2403、" + + "2404、2405、2406罐冷却,持续死保2406号二氯乙烷罐。东侧阵地:南京、常州、盐城、泰州支队部署8门移动炮,阻截火势,加强对2401、2402、2404、2301、2303罐冷却。" + + "北侧阵地:南京、扬州、泰州、南通、苏州支队部署10门移动炮、2门高喷炮、2门暴雪泡沫炮,阻截火势,加强对1307、1308罐冷却。" + + "后方调集全省10套远程供水泵组、4辆泡沫原液供给车、40台泡沫输转泵、1200吨抗溶性泡沫,依托厂区人工河和长江航道设立取水点,设置2个泡沫补给点,全力保障火场不间断供水、" + + "供液。远程供水:常州、无锡支队2套泵组利用厂区东南侧消防水池,向南侧、东侧阵地供水;苏州支队1套泵组利用北侧人工河,向北侧阵地供水;南通支队3套泵组分别利用厂区东南侧消防" + + "水池、北侧人工河和南面长江干道,向南侧、北侧阵地供水;扬州支队1套泵组利用北侧人工河,向北侧阵地供水;泰州支队2套泵组分别利用南侧人工河和长江主干道,向消防水池和东侧阵地供水;" + + "培训基地1套泵组利用北侧人工河,向西侧阵地供水。泡沫供给:分别在东、西门附近设置2个泡沫补给点,采取泡沫原液供给车输转、泡沫输转泵输转、人工搬运等多种方法,向各战斗阵地不间断补给泡沫药剂。" + + "14时50分,指挥部决定:组织公安消防部队士官学校132名官兵,分别在东、西、北侧进攻路线上布设第二道防护堤,组织力量死看死守,牢牢将火势控制在交换站周边区域内。" + + "16时11分,2号交换站火势突然急剧增大,巨大的火球腾空而起,近百米高的浓烟烈火笼罩厂区上空,东、西两侧部分道路和2401-2404罐防火隔堤内瞬间布满流淌火。加之厂区邻近" + + "长江、风向多次突变,固定泡沫站被大火完全吞噬,强大的热辐射对邻近2号交换站北侧的甲醇和西北侧的芳烃等罐区安全构成了极大的威胁,人员难以靠近。指挥部根据物料泄漏量、" + + "流淌速度及燃烧时间推断,2401-2404罐组存在储罐阀门未完全关闭,提出了“加强筑堤保护、全力阻截流淌火、持续强化冷却、伺机抵近关阀”的针对性措施。鉴于1307、1308罐体外壁温度均已超过300℃," + + "命令北侧阵地的扬州、泰州、苏州支队尽全力冷却1307、1308甲醇罐。" + + "16时45分,紧急调集的2万米水带、30门移动炮、100套隔热服、30台泡沫输转泵、300套防毒面具全部到场,做好了打持久战的准备。" + + "18时,指挥部根据兵力部署、火场态势和泡沫药剂、水源准备情况,发动第一次总攻,共部署30门移动炮、3门高喷炮、1门车载炮、2门暴雪泡沫炮、21支泡沫管枪强攻灭火。" + + "18时30分,交换站东、西两侧地面流淌火被陆续扑灭,前期丢失的部分阵地重新占领,灭火力量与灾情态势相对均衡,火场进入拉锯相持阶段。" + + "18时40分,指挥部明确四项措施:一是各阵地灭火冷却强度保持均衡;二是确保泡沫药剂、油料、供水不间断;三是加紧筑堤,巩固阵地;四是战斗预备队做好轮换准备。" + + "19时许,淮安、宿迁、连云港、徐州4个支队,中石化华东片区的扬子石化、金陵石化、仪征化纤、南化公司、管道分公司、高桥石化6个企业专职消防队,共51辆重型泡沫车、342名队员," + + "以及总队2套单车400L/s的超重型化工编队,到达现场。按照指挥部要求,立即组成战斗预备队,做好随时轮换投入战斗的准备。" + + "19时45分,伴随着几声巨响,数个火球接连腾起,管道再次爆裂,交换站东、西两侧道路再次出现大面积流淌火,2401罐顶鼓起,呼吸阀和泡沫产生器罐壁连接处起火," + + "呈火炬型燃烧。指挥部要求前沿指挥长密切监控火情,必要时有权决定撤退,确保安全。囿于高喷车难以抵近作战、移动炮和车载炮射程不足,指挥部要求加大供给强度,加强2401罐冷却,责成企业调集氮气车沿2401罐的东南侧道路停靠,强制向2401罐实施充氮保护。", + }, + { + name: "部局领导到场", + xinxi: + "20时10分,罗永强副局长一行到达现场。在听取情况汇报、查看无人机视频后,罗永强副局长率领部局专家组深入现场,抵近着火点侦察,与化工专家研判商讨后," + + "作出战斗部署:一是即将到场的上海增援力量配合无锡支队在重点防御的西南侧阵地展开战斗;二是再次确认所有储罐阀门关闭情况;三是调用高喷车对受火势威胁较大的1307、1308罐进一步强化冷却。" + + "20时30分,上海总队汪永明副总队长率领增援力量到场。根据罗永强副局长指示,组织力量从着火区域西南侧架设6门移动炮,协助无锡支队阻截交换站火势,并对2401、2403罐实施冷却。" + + "21时50分,部消防局于建华局长带领工作组到达现场,详细听取现场情况汇报,深入前沿阵地勘察火情,准确研判火灾发展态势,迅速召集各战斗段指挥员和事故单位工程技术人员,提出五项处置措施:" + + "一是保持足够力量对着火邻近储罐进行大强度冷却,确保不发生问题;二是从临近地区调集氮气,架设临时管线,对受火势威胁的储罐进行充氮保护;三是外接临时电源,启动西侧半冷冻球罐冰机;" + + "四是备足力量和药剂,择机对交换站及罐区实施强攻灭火;五是树立底线意识,组织疏散半径5公里范围内的群众。" + + "根据于建华局长指示,4个战斗区段分别增设1门移动炮加强对邻近罐冷却;组织对2401-2404罐组防火堤进行凿孔导流,降低液面、防止漫堤;" + + "加强对2401-2404罐补充氮气保护;协调当地政府疏散周边5公里范围内的群众;各战斗阵地迅速补足泡沫和油料,组织预备力量轮换,做好总攻准备。" + + "23日0时左右,2号交换站内火势仍呈喷射状燃烧。根据现场情况,于建华局长召集专家分析认定,罐区内仍有管线阀门未关闭,随即要求0时至1时再次发动总攻,为关阀断料创造条件。" + + "0时30分,各阵地共部署42门移动炮、1门高喷炮、2门车载炮、2门暴雪泡沫炮、21支泡沫管枪,对着火区域及邻近罐区发起第二次总攻,2401-2404罐组内的流淌火、" + + "2401罐顶呼吸阀和泡沫产生器罐壁连接处的明火被全部扑灭,2号交换站火势有所减弱。前沿侦察小组冒着强辐射热,抵近火场最前沿,反复观察火情,认为现场已具备关阀条件," + + "当即向于建华局长报告。于建华局长当机立断、果断决策,命令实施关阀断料。随后,罗永强副局长亲自排查罐区管线,制定关阀方案,指挥南京支队关阀攻坚小组," + + "在雾状水掩护下深入罐区防火堤内实施关阀断料。0时40分,2403、2404罐的进出料阀门被彻底关闭。" + + "1时10分,2401罐的进出料阀门被彻底关闭。随后,火势明显减弱。指挥部命令,在保证冷却力量的前提下,各战斗段抢抓战机,梯次掩护推进,全力围剿火势。3时10分,大火被彻底扑灭。", + }, + { + name: "冷却监护、移交现场", + xinxi: + "大火扑灭后,现场指挥部命令参战力量继续向着火区域液面喷射泡沫,增加泡沫覆盖厚度,防止复燃。同时继续冷却相邻罐体、持续降温," + + "安排专人对罐体温度和水样、空气进行不间断检测。4时25分,2401、2403、2404罐壁温度降至40℃以下,其它罐降至20℃左右,空气、水体检测结果基本正常。" + + "9时30分,指挥部召集参战队伍指挥员进行战斗小结,明确苏州、无锡、南通、镇江、扬州5个支队,25辆消防车、150名官兵留守现场,配合泰州支队实施监护,其余力量陆续返回。" + + "25日12时,现场所有储罐温度均降至常温,增援支队全部撤回,泰州支队17辆消防车、102名官兵继续监护。", + }, + ], + }, + { + name: "几点体会", + xinxidata: [ + { + name: "领导高度重视、正确指挥是先决条件", + xinxi: + "事故发生后,按照习近平总书记、李克强总理作出的批示指示,郭声琨部长,黄明、李伟副部长坐镇公安部指挥中心," + + "通过音视频系统指导现场处置工作,尤其是李伟副部长全程、实时跟踪指导一线战斗行动,明确了5条富有实效的战斗措施,为整个灭火救援战斗提供了科学遵循。江苏省委书记罗志军、" + + "省长石泰峰,省委常委、政法委书记、公安厅厅长王立科,公安部消防局局长于建华、副局长罗永强深入火场前沿阵地,指导事故处置工作,鼓舞士气、凝聚警心,为全体参战官兵注入了强大的精神动力。" + + "特别是于建华局长、罗永强副局长率先垂范、靠前指挥,准确研判、抢抓战机、果断决策,采取了一系列行之有效的灭火措施,从根本上遏制了火灾态势,为最终圆满打赢了这场险象环生的战斗起到了决定性作用。", + }, + { + name: "力量调集充分、响应迅速是有力支撑", + xinxi: + "针对石油化工火灾的特殊复杂性和灾情预判情况,总队第一时间提请省政府启动重特大灾害事故应急处置预案,按火灾最高等级调集全省13个支队和总队培训基地28个化工编队、" + + "4个战勤保障编队、10套远程供水泵组、124辆大功率泡沫水罐车、161门移动炮、1200吨抗溶性泡沫以及通信、侦检、洗消等装备器材,部消防局紧急调派公安消防部队士官学校和上海总队40辆车、332名官兵到场增援,为打好初战控制、有效遏制灾情扩大提供了有力保障。", + }, + { + name: "发挥专家作用、科学施救是关键所在", + xinxi: + "事故发生后,部消防局和总队紧急调派化工灭火专家遂行出动、辅助决策。专家组根据侦察结果,实时评估灾情发展态势和罐体设备安全,及时提出了筑堤设防、全力冷却、" + + "注氮排险等处置建议。尤其是公安部灭火救援专家组郝伟同志,在事故单位2次关阀未果的情况下,多次抵近罐区侦察,与罗永强副局长一起全程指导攻坚组关阀,对成功扑灭大火起到了十分关键的作用。", + }, + { + name: "应急联动高效、保障有力是重要基础", + xinxi: + "事故发生后,省、市两级市政府迅速启动应急预案和联动机制,公安、安监、交通、气象、卫生、供水、供电、环保等部门第一时间响应,调集了客运车、环境检测车、" + + "120救护车、叉车、运沙车等各种车辆40余辆和砂土、水泥等应急物资,协同开展了外围警戒、人员疏散、物资保障、环境监测、医疗急救等工作。总、支队两级战勤保障和应急通信力量遂行作战,调集战勤保障车辆22辆、" + + "器材装备600余件套、水带2万多米、泡沫灭火剂约1200吨、油料约52吨,综合利用4G球机、3G单兵、卫星通信指挥车、无人机等设备,实时采集全景视频、火点分布、罐体温度等数据,不间断上传重点部位图像,为现场指挥决策提供了科学参考。", + }, + { + name: "官兵英勇顽强、舍生忘死是根本保证", + xinxi: + "面对高温、浓烟、毒害气体和随时可能发生的爆炸,参战官兵从将军到士兵无一人退缩,始终战斗在灭火最前沿,面对生与死的考验,表现出应有的血性和担当。在多次进攻受阻的情况下,全体参战官兵顶着巨大压力,敢打敢拼、死守“红线”,与大火展开拉锯战、攻坚战,彰显了消防铁军英勇善战、敢打必胜的战斗精神。", + }, + ], + }, + ], + }, + { + key: 1, + zongdata: [ + { + name: "基本信息", + xinxidata: [ + { + name: "码头基本情况", + xinxi: + "八所港危化品码头位于东方市滨海南路,东侧为中海石油建滔化工有限公司化工厂区(甲醇项目)、中海油东方石化有限责任公司化工厂区" + + "(DCC项目),西侧、北侧、南侧为大海。码头设置3个泊位,1号泊位为10000吨级,2号泊位为5000吨级,3号泊位为50000吨级。该码头目前运营工业园区六家公司的产品," + + "共有甲醇、原油、汽油、柴油、LPG、丙烯、MTBE等16种作业介质,年吞吐量约为520万吨。", + }, + { + name: "事故油轮基本情况", + xinxi: + "“丰盛油8 号”船体总长99.87m,型宽14.2m,吃水深度7.1m," + + "满载为4800 吨。船体前端和中段共有10 个储油舱,分布在船体左右两侧,每个储油舱480 吨。船尾甲板以上共3 层,分别为驾驶室、船员舱和生活舱。船尾负二层为船员舱,负一层底舱为机" + + "舱,机舱和货舱之间为泵舱。事故发生时油轮已装油完毕正准备离港。", + }, + { + name: "石脑油理化性质", + xinxi: + "石脑油化学俗名为溶剂油、粗汽油,是一种无色或浅黄色易燃液体,有特殊气味。其蒸汽与空气混合,能形成爆炸性混合物。" + + "相对密度为0.78~0.97,闪点小于-18℃,燃点为260℃,爆炸极限%(V/V)为1.2~6.8。不溶于水,溶于多数有机溶剂,主要成分为烷烃的-C4~C6-成分。蒸汽比空气重,沿地面扩散并易积存于低洼处,遇火源会着火回燃。" + + "能够通过呼吸道吸入、皮肤接触、食入等方式进入体内,石脑油蒸气可引起眼及上呼吸道刺激症状。如浓度过高,几分钟即可引起呼吸困难、紫绀等缺氧症状。", + }, + { + name: "消防水源及消防设施情况", + xinxi: + "该码头设施的消防用水采用两路供水,一路由后方甲醇项目厂区2 座各为容量4000m3 的消防水池提供,另外一路由后方精细化工项目厂区内2 座各为容量10000m3的消防水池提供,由2 条管" + + "径DN400mm 的消防供水干管接至码头,消防管网供水能力为600L/S,压力0.7~1.2MPa。码头设置46 套消防栓箱、1 套水幕系统、2 套ZPF3000 干粉灭火系统、8 座消防炮塔(每座炮塔上有" + + "电动遥控消防泡沫炮和水炮各一门,消防水炮和消防泡沫炮流量均为80L/s),备有抗溶性水成膜泡沫25 吨,存储在泡沫泵房内,通过比例混合器直接进入泡沫管线,向泡沫栓供给。码头周边" + + "1000m 范围内有可用市政消火栓10 个(园区三路2 个,疏港北路2 个,疏港三中路6 个),压力为0.2~0.3MPa,另距离码头约300m处有华能电厂码头可作为海水取水点。", + }, + ], + }, + ], + }, + ]; + zongdata; + centerdata; //打开说话框 - isOpenTalk = false - openTalkDiv(){ - this.isOpenTalk = !this.isOpenTalk + isOpenTalk = false; + openTalkDiv() { + this.isOpenTalk = !this.isOpenTalk; } //详情页 - isshow=false//控制显隐 - ShowHide (key){ - console.log(this.tandata) - this.zongdata=this.tandata[key].zongdata - this.centerdata=this.zongdata[0].xinxidata - console.log(this.zongdata) - this.isshow=true + isshow = false; //控制显隐 + ShowHide(key) { + console.log(this.tandata); + this.zongdata = this.tandata[key].zongdata; + this.centerdata = this.zongdata[0].xinxidata; + console.log(this.zongdata); + this.isshow = true; } - ShoeFalse(){ - this.isshow=false + ShoeFalse() { + this.isshow = false; /* this.zongdata=null this.centerdata=null */ - this.zjxinxi="" - this.chooseleft=-1 - this.chooseid=0 + this.zjxinxi = ""; + this.chooseleft = -1; + this.chooseid = 0; } //点击弹窗头部 - chooseid=0 - clickHead(num){ - this.zjxinxi="" - this.chooseid=num - this.centerdata=this.zongdata[num].xinxidata - this.chooseleft=-1 - console.log(this.centerdata) + chooseid = 0; + clickHead(num) { + this.zjxinxi = ""; + this.chooseid = num; + this.centerdata = this.zongdata[num].xinxidata; + this.chooseleft = -1; + console.log(this.centerdata); } - + //点击弹窗左侧菜单栏 - zjxinxi - chooseleft - clickLift(key){ - this.chooseleft=key - console.log(key) - this.zjxinxi=this.centerdata[key].xinxi + zjxinxi; + chooseleft; + clickLift(key) { + this.chooseleft = key; + console.log(key); + this.zjxinxi = this.centerdata[key].xinxi; } - - } diff --git a/src/app/ui/similar-plans/similar-plans.component.ts b/src/app/ui/similar-plans/similar-plans.component.ts index 50ffc8f..6faa53c 100644 --- a/src/app/ui/similar-plans/similar-plans.component.ts +++ b/src/app/ui/similar-plans/similar-plans.component.ts @@ -45,9 +45,9 @@ export class SimilarPlansComponent implements OnInit { openDeatails(){ if(this.router.url == '/ui/similarPlans'){ - this.router.navigate(['ui/similarPlans/collectionTools'],{queryParams:{'usci':'B56498312911454698','planComponentId':'5fa3820af8eb762cb03c666d'}}) + this.router.navigate(['ui/similarPlans/collectionTools'],{queryParams:{'usci':'168541740680000000','planComponentId':'6475862544e5b20e1441ac25'}}) }else if (this.router.url == '/similarPlansList'){ - this.router.navigate(['similarPlans'],{queryParams:{'usci':'B56498312911454698','planComponentId':'5fa3820af8eb762cb03c666d'}}) + this.router.navigate(['similarPlans'],{queryParams:{'usci':'168541740680000000','planComponentId':'6475862544e5b20e1441ac25'}}) } } back(){