|
|
|
@ -4,7 +4,7 @@
|
|
|
|
|
* @Author: sueRimn |
|
|
|
|
* @Date: 2020-12-25 10:19:31 |
|
|
|
|
* @LastEditors: sueRimn |
|
|
|
|
* @LastEditTime: 2021-04-22 10:47:06 |
|
|
|
|
* @LastEditTime: 2021-07-08 09:35:53 |
|
|
|
|
*/ |
|
|
|
|
import { Component, OnInit,Inject } from '@angular/core'; |
|
|
|
|
import { FormControl } from '@angular/forms'; |
|
|
|
@ -132,6 +132,7 @@ export class PlanRecordComponent implements OnInit {
|
|
|
|
|
LinkageForceDetailInfo:any//需要传递给子组件的联动力量信息
|
|
|
|
|
fireForceDetailInfo:any//需要传递给子组件的消防力量信息
|
|
|
|
|
postlevel:any |
|
|
|
|
bianzhi=false |
|
|
|
|
tableClick(e,item){ |
|
|
|
|
this.showtype = -1 |
|
|
|
|
//e.target.parentElement.bgColor='#2196F3'
|
|
|
|
@ -142,17 +143,20 @@ export class PlanRecordComponent implements OnInit {
|
|
|
|
|
this.fetchUrl='' |
|
|
|
|
this.viewer={} |
|
|
|
|
if(item.contentType == 11){ |
|
|
|
|
this.bianzhi=false |
|
|
|
|
window.setTimeout(()=>{ |
|
|
|
|
this.showtype = 3 |
|
|
|
|
sessionStorage.setItem('companyId',item.itemId) |
|
|
|
|
},0) |
|
|
|
|
}else if(item.contentType == 12){ |
|
|
|
|
this.bianzhi=false |
|
|
|
|
//水源
|
|
|
|
|
this.http.get(`/api/WaterSources/${item.itemId}`).subscribe((data)=>{ |
|
|
|
|
this.waterData = data |
|
|
|
|
this.showtype = 12 |
|
|
|
|
}) |
|
|
|
|
}else if(item.contentType == 13){ |
|
|
|
|
this.bianzhi=false |
|
|
|
|
//消防力量
|
|
|
|
|
this.http.get(`/api/CustomFireForce/${item.itemId}`).subscribe((data:any)=>{ |
|
|
|
|
if(data.forceType != 0){//如果是其他消防力量
|
|
|
|
@ -166,6 +170,7 @@ export class PlanRecordComponent implements OnInit {
|
|
|
|
|
this.showtype = 13 |
|
|
|
|
}) |
|
|
|
|
}else if(item.contentType == 14){ |
|
|
|
|
this.bianzhi=false |
|
|
|
|
//联动力量
|
|
|
|
|
this.http.get(`/api/LinkageForces/${item.itemId}`).subscribe((data:any)=>{ |
|
|
|
|
|
|
|
|
@ -177,38 +182,46 @@ export class PlanRecordComponent implements OnInit {
|
|
|
|
|
this.http.get(`/api/PlanComponents/${item.itemId}`).subscribe((data:any)=>{ |
|
|
|
|
this.companyId=data.companyId |
|
|
|
|
this.companyName=data.companyName |
|
|
|
|
if(data.planType!=2&&data.planType!=1){ |
|
|
|
|
this.fetchUrl=data.attachmentUrls[0] |
|
|
|
|
var index=this.fetchUrl.indexOf("\/") |
|
|
|
|
if(this.fetchUrl.substr(0,index)=='psw'){ |
|
|
|
|
this.showtype=1 |
|
|
|
|
var obj=document.getElementById('viewer') |
|
|
|
|
if(obj!=null){ |
|
|
|
|
obj.innerHTML='' |
|
|
|
|
if(data.planMode==2){ |
|
|
|
|
this.bianzhi=true |
|
|
|
|
this.src=`/planManagement/createplanonlinefive?navIsOpen=false&companyId=${data.companyId}&planName=${data.name}&unitName=${data.companyName}&planCategory=${data.planCategory}&planId=${data.id}&unitTypeId=${data.company.buildingTypes[0].id}&orName=${data.company.organizationName}&orId=${data.company.organizationId}&pattern=false` |
|
|
|
|
//this.src=`/keyUnit/viewunitinfoplan?id=${data.companyId}&orName=${data.company.organizationId}&orId=${data.company.organizationName}`
|
|
|
|
|
}else{ |
|
|
|
|
this.bianzhi=false |
|
|
|
|
if(data.planType!=2&&data.planType!=1){ |
|
|
|
|
this.fetchUrl=data.attachmentUrls[0] |
|
|
|
|
var index=this.fetchUrl.indexOf("\/") |
|
|
|
|
if(this.fetchUrl.substr(0,index)=='psw'){ |
|
|
|
|
this.showtype=1 |
|
|
|
|
var obj=document.getElementById('viewer') |
|
|
|
|
if(obj!=null){ |
|
|
|
|
obj.innerHTML='' |
|
|
|
|
} |
|
|
|
|
window.setTimeout(()=>{ |
|
|
|
|
this.viewer = new Viewer({ |
|
|
|
|
container: document.querySelector('#viewer'), |
|
|
|
|
panorama:'/api/Objects/PlanPlatform/'+ this.fetchUrl, |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
}else{ |
|
|
|
|
this.lookWord() |
|
|
|
|
} |
|
|
|
|
window.setTimeout(()=>{ |
|
|
|
|
this.viewer = new Viewer({ |
|
|
|
|
container: document.querySelector('#viewer'), |
|
|
|
|
panorama:'/api/Objects/PlanPlatform/'+ this.fetchUrl, |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
}else{ |
|
|
|
|
this.lookWord() |
|
|
|
|
this.organizationName=item.organizationName |
|
|
|
|
this.planData = data |
|
|
|
|
this.handleData() |
|
|
|
|
return |
|
|
|
|
|
|
|
|
|
//this.src=`/planAudit/planpass?id=${data.companyId}&companyName=${data.companyName}&auditPlanId=${data.id}&auditStatus=${data.auditStatus}&planType=1`
|
|
|
|
|
//this.iframeSrc=this.sanitizer.bypassSecurityTrustResourceUrl(this.src);
|
|
|
|
|
//window.open(`/planAudit/planpass?id=${data.companyId}&companyName=${data.companyName}&auditPlanId=${data.id}&auditStatus=${data.auditStatus}&planType=1`)
|
|
|
|
|
} |
|
|
|
|
}else{ |
|
|
|
|
this.organizationName=item.organizationName |
|
|
|
|
this.planData = data |
|
|
|
|
this.handleData() |
|
|
|
|
return |
|
|
|
|
|
|
|
|
|
//this.src=`/planAudit/planpass?id=${data.companyId}&companyName=${data.companyName}&auditPlanId=${data.id}&auditStatus=${data.auditStatus}&planType=1`
|
|
|
|
|
//this.iframeSrc=this.sanitizer.bypassSecurityTrustResourceUrl(this.src);
|
|
|
|
|
//window.open(`/planAudit/planpass?id=${data.companyId}&companyName=${data.companyName}&auditPlanId=${data.id}&auditStatus=${data.auditStatus}&planType=1`)
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|