|
|
|
@ -4,7 +4,7 @@
|
|
|
|
|
* @Author: sueRimn |
|
|
|
|
* @Date: 2020-12-25 16:13:50 |
|
|
|
|
* @LastEditors: sueRimn |
|
|
|
|
* @LastEditTime: 2021-02-22 10:49:28 |
|
|
|
|
* @LastEditTime: 2021-03-02 10:29:47 |
|
|
|
|
*/ |
|
|
|
|
import { Component, Inject, OnInit } from '@angular/core'; |
|
|
|
|
import { FormControl } from '@angular/forms'; |
|
|
|
@ -103,7 +103,7 @@ export class WaitExamineerComponent implements OnInit {
|
|
|
|
|
chuorzhong//判断初审还是终审
|
|
|
|
|
radioid//选中的id
|
|
|
|
|
shenheTable=[]//选中要审核的对象
|
|
|
|
|
showtype//0:word,1:全景图,2:二维三维,3:重点单位
|
|
|
|
|
showtype=-1//0:word,1:全景图,2:二维三维,3:重点单位
|
|
|
|
|
compantData={name:'',buildingTypes:[],address:''} |
|
|
|
|
organizationName |
|
|
|
|
planData |
|
|
|
@ -122,7 +122,7 @@ export class WaitExamineerComponent implements OnInit {
|
|
|
|
|
verifyState:[0,3] |
|
|
|
|
} |
|
|
|
|
this.http.get("/api/ContentVerifies",{params:paramsdata}).subscribe((data:any)=>{ |
|
|
|
|
//console.log(data)
|
|
|
|
|
console.log(data) |
|
|
|
|
this.tableDate=data.items |
|
|
|
|
this.count=data.totalCount |
|
|
|
|
}) |
|
|
|
@ -154,48 +154,55 @@ export class WaitExamineerComponent implements OnInit {
|
|
|
|
|
//radio点击事件
|
|
|
|
|
viewer//全景图对象
|
|
|
|
|
radioClick(e,item){ |
|
|
|
|
this.showtype=-1 |
|
|
|
|
//e.target.parentElement.bgColor='#2196F3'
|
|
|
|
|
//console.log(e,item)
|
|
|
|
|
this.organizationName='' |
|
|
|
|
this.id=item.id |
|
|
|
|
this.fetchUrl='' |
|
|
|
|
this.viewer={} |
|
|
|
|
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='' |
|
|
|
|
} |
|
|
|
|
window.setTimeout(()=>{ |
|
|
|
|
this.viewer = new Viewer({ |
|
|
|
|
container: document.querySelector('#viewer'), |
|
|
|
|
panorama:'/api/Objects/PlanPlatform/'+ this.fetchUrl, |
|
|
|
|
if(item.contentType==11){ |
|
|
|
|
this.showtype=3 |
|
|
|
|
sessionStorage.setItem('companyId',item.itemId) |
|
|
|
|
}else{ |
|
|
|
|
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='' |
|
|
|
|
} |
|
|
|
|
window.setTimeout(()=>{ |
|
|
|
|
this.viewer = new Viewer({ |
|
|
|
|
container: document.querySelector('#viewer'), |
|
|
|
|
panorama:'/api/Objects/PlanPlatform/'+ this.fetchUrl, |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
}) |
|
|
|
|
}); |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
}else{ |
|
|
|
|
this.lookWord() |
|
|
|
|
} |
|
|
|
|
}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`)
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(e.checked){ |
|
|
|
|
this.shenheTable.push(item) |
|
|
|
@ -307,26 +314,42 @@ export class WaitExamineerComponent implements OnInit {
|
|
|
|
|
const config = new MatSnackBarConfig(); |
|
|
|
|
config.verticalPosition = 'top'; |
|
|
|
|
config.duration = 3000 |
|
|
|
|
/* if(this.chuorzhong==2){ |
|
|
|
|
this.snackBar.open('审核未通过,请修改后再来审核!','确定',config); |
|
|
|
|
} */ |
|
|
|
|
//console.log(this.shenheTable)
|
|
|
|
|
console.log(this.shenheTable) |
|
|
|
|
if(this.shenheTable.length==0){ |
|
|
|
|
this.snackBar.open('请选择要审核的预案!','确定',config); |
|
|
|
|
} |
|
|
|
|
//单个审核
|
|
|
|
|
else if(this.shenheTable.length==1){ |
|
|
|
|
if(this.shenheTable[0].verifyState==0){ |
|
|
|
|
this.http.put(`/api/PlanAudits/${this.shenheTable[0].itemId}/First`,{auditStatus:16}).subscribe(data=>{ |
|
|
|
|
this.snackBar.open('操作成功!','确定',config); |
|
|
|
|
this.getAlltabledate() |
|
|
|
|
}) |
|
|
|
|
}else if(this.shenheTable[0].verifyState==3){ |
|
|
|
|
this.http.put(`/api/PlanAudits/${this.radioid}`,{auditStatus:2}).subscribe(data=>{ |
|
|
|
|
//重点单位审核
|
|
|
|
|
if(this.shenheTable[0].contentType==11){ |
|
|
|
|
let body:any = { |
|
|
|
|
id:this.shenheTable[0].id, |
|
|
|
|
itemId:this.shenheTable[0].itemId, |
|
|
|
|
verifyState:4, |
|
|
|
|
contentType:11, |
|
|
|
|
title:this.shenheTable[0].title+'基本信息' |
|
|
|
|
} |
|
|
|
|
this.http.put(`/api/ContentVerifies`,body).subscribe(data=>{ |
|
|
|
|
this.snackBar.open('操作成功!','确定',config); |
|
|
|
|
this.getAlltabledate() |
|
|
|
|
}) |
|
|
|
|
}else{ |
|
|
|
|
//预案审核
|
|
|
|
|
if(this.shenheTable[0].verifyState==0){ |
|
|
|
|
this.http.put(`/api/PlanAudits/${this.shenheTable[0].itemId}/First`,{auditStatus:16}).subscribe(data=>{ |
|
|
|
|
this.snackBar.open('操作成功!','确定',config); |
|
|
|
|
this.getAlltabledate() |
|
|
|
|
}) |
|
|
|
|
}else if(this.shenheTable[0].verifyState==3){ |
|
|
|
|
this.http.put(`/api/PlanAudits/${this.radioid}`,{auditStatus:2}).subscribe(data=>{ |
|
|
|
|
this.snackBar.open('操作成功!','确定',config); |
|
|
|
|
this.getAlltabledate() |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
//批量审核
|
|
|
|
|
else{ |
|
|
|
|
for(var i=0;i<this.shenheTable.length;i++){ |
|
|
|
|
var cart={ |
|
|
|
@ -352,19 +375,38 @@ export class WaitExamineerComponent implements OnInit {
|
|
|
|
|
if(this.shenheTable.length==0){ |
|
|
|
|
this.snackBar.open('请选择要审核的预案!','确定',config); |
|
|
|
|
} |
|
|
|
|
//单个审核拒绝
|
|
|
|
|
else if(this.shenheTable.length==1){ |
|
|
|
|
if(this.shenheTable[0].verifyState==0){ |
|
|
|
|
this.http.put(`/api/PlanAudits/${this.shenheTable[0].itemId}/First`,{auditStatus:32}).subscribe(data=>{ |
|
|
|
|
this.snackBar.open('操作成功!','确定',config); |
|
|
|
|
this.getAlltabledate() |
|
|
|
|
}) |
|
|
|
|
}else if(this.shenheTable[0].verifyState==3){ |
|
|
|
|
this.http.put(`/api/PlanAudits/${this.radioid}`,{auditStatus:4}).subscribe(data=>{ |
|
|
|
|
//重点单位审核拒绝
|
|
|
|
|
if(this.shenheTable[0].contentType==11){ |
|
|
|
|
let body:any = { |
|
|
|
|
id:this.shenheTable[0].id, |
|
|
|
|
itemId:this.shenheTable[0].itemId, |
|
|
|
|
verifyState:5, |
|
|
|
|
contentType:11, |
|
|
|
|
title:this.shenheTable[0].title+'基本信息' |
|
|
|
|
} |
|
|
|
|
this.http.put(`/api/ContentVerifies`,body).subscribe(data=>{ |
|
|
|
|
this.snackBar.open('操作成功!','确定',config); |
|
|
|
|
this.getAlltabledate() |
|
|
|
|
}) |
|
|
|
|
}else{ |
|
|
|
|
//预案审核拒绝
|
|
|
|
|
if(this.shenheTable[0].verifyState==0){ |
|
|
|
|
this.http.put(`/api/PlanAudits/${this.shenheTable[0].itemId}/First`,{auditStatus:32}).subscribe(data=>{ |
|
|
|
|
this.snackBar.open('操作成功!','确定',config); |
|
|
|
|
this.getAlltabledate() |
|
|
|
|
}) |
|
|
|
|
}else if(this.shenheTable[0].verifyState==3){ |
|
|
|
|
this.http.put(`/api/PlanAudits/${this.radioid}`,{auditStatus:4}).subscribe(data=>{ |
|
|
|
|
this.snackBar.open('操作成功!','确定',config); |
|
|
|
|
this.getAlltabledate() |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
//批量审核
|
|
|
|
|
else{ |
|
|
|
|
for(var i=0;i<this.shenheTable.length;i++){ |
|
|
|
|
var cart={ |
|
|
|
|