|
|
|
@ -4,7 +4,7 @@
|
|
|
|
|
* @Author: sueRimn |
|
|
|
|
* @Date: 2020-12-25 16:13:50 |
|
|
|
|
* @LastEditors: sueRimn |
|
|
|
|
* @LastEditTime: 2021-03-17 10:32:49 |
|
|
|
|
* @LastEditTime: 2021-03-17 14:08:07 |
|
|
|
|
*/ |
|
|
|
|
import { Component, Inject, OnInit } from '@angular/core'; |
|
|
|
|
import { FormControl } from '@angular/forms'; |
|
|
|
@ -333,7 +333,7 @@ export class WaitExamineerComponent implements OnInit {
|
|
|
|
|
|
|
|
|
|
//打开三维预案弹窗
|
|
|
|
|
oopen3Dshow(){ |
|
|
|
|
this.dialog.open(show3D,{width:'1650px',height:'850px',data:{url:this.thirdPartyURL,twoOrthree:this.twoOrthree}}); |
|
|
|
|
this.dialog.open(show3D,{width:'1650px',height:'850px',data:{url:this.thirdPartyURL,twoOrthree:this.twoOrthree,radioid:this.radioid}}); |
|
|
|
|
} |
|
|
|
|
//变更数据和全部数据切换按钮
|
|
|
|
|
buttonChange(){ |
|
|
|
@ -351,89 +351,14 @@ export class WaitExamineerComponent implements OnInit {
|
|
|
|
|
if(this.shenheTable.length==0){ |
|
|
|
|
this.snackBar.open('请勾选要审核的条目!','确定',config); |
|
|
|
|
} |
|
|
|
|
//else{this.dialog.open(remark,{width:'460px',height:'260px',data:{shenhedata:this.shenheTable}});}
|
|
|
|
|
//单个审核
|
|
|
|
|
else if(this.shenheTable.length == 1){ |
|
|
|
|
//重点单位审核
|
|
|
|
|
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].contentType == 12 || this.shenheTable[0].contentType == 13 || this.shenheTable[0].contentType == 14){ |
|
|
|
|
console.log(1111,this.shenheTable[0]) |
|
|
|
|
let body:any = { |
|
|
|
|
id:this.shenheTable[0].id, |
|
|
|
|
itemId:this.shenheTable[0].itemId, |
|
|
|
|
verifyState:4, |
|
|
|
|
contentType:this.shenheTable[0].contentType, |
|
|
|
|
title:this.shenheTable[0].title |
|
|
|
|
} |
|
|
|
|
this.http.put(`/api/ContentVerifies`,body).subscribe(data=>{ |
|
|
|
|
this.snackBar.open('操作成功!','确定',config); |
|
|
|
|
this.showtype = -1 |
|
|
|
|
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() |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
this.shenheTable=[] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
//批量审核
|
|
|
|
|
else{ |
|
|
|
|
let isTrue = window.confirm('确定同意选中条目的审核吗?') |
|
|
|
|
if(isTrue){ |
|
|
|
|
if(this.shenheTable[0].contentType==11||this.shenheTable[0].contentType==12){ //批量审批水源和重点单位
|
|
|
|
|
for(var i=0;i<this.shenheTable.length;i++){ |
|
|
|
|
var body={ |
|
|
|
|
id:this.shenheTable[i].id, |
|
|
|
|
itemId:this.shenheTable[i].itemId, |
|
|
|
|
verifyState:4 |
|
|
|
|
} |
|
|
|
|
companyAgreeList.push(body) |
|
|
|
|
} |
|
|
|
|
this.http.put(`/api/ContentVerifies/Batch`,companyAgreeList).subscribe(data=>{ |
|
|
|
|
this.snackBar.open('操作成功!','确定',config); |
|
|
|
|
this.getAlltabledate() |
|
|
|
|
}) |
|
|
|
|
}else{ //批量审核预案
|
|
|
|
|
for(var i=0;i<this.shenheTable.length;i++){ |
|
|
|
|
var cart={ |
|
|
|
|
planComponentId:this.shenheTable[i].itemId, |
|
|
|
|
auditStatus:this.shenheTable[i].verifyState==3?2:16, |
|
|
|
|
auditOpinion:'' |
|
|
|
|
} |
|
|
|
|
agreeList.push(cart) |
|
|
|
|
} |
|
|
|
|
this.http.put(`/api/PlanAudits/Batch`,agreeList).subscribe(data=>{ |
|
|
|
|
this.snackBar.open('操作成功!','确定',config); |
|
|
|
|
this.getAlltabledate() |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
const dialogRef =this.dialog.open(remark,{width:'460px',height:'290px',data:{shenhedata:this.shenheTable,type:1,radioid:this.radioid}}); |
|
|
|
|
dialogRef.afterClosed().subscribe(result => { |
|
|
|
|
this.shenheTable=[] |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
this.getAlltabledate() |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
//拒绝操作
|
|
|
|
|
refuse(){ |
|
|
|
@ -445,86 +370,12 @@ export class WaitExamineerComponent implements OnInit {
|
|
|
|
|
if(this.shenheTable.length==0){ |
|
|
|
|
this.snackBar.open('请选择要审核的预案!','确定',config); |
|
|
|
|
} |
|
|
|
|
//单个审核拒绝
|
|
|
|
|
else if(this.shenheTable.length==1){ |
|
|
|
|
let isTrue = window.confirm('确定拒绝选中条目的审核吗?') |
|
|
|
|
if(isTrue){ |
|
|
|
|
//重点单位审核拒绝
|
|
|
|
|
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].contentType == 12 || this.shenheTable[0].contentType == 13 || this.shenheTable[0].contentType == 14){ |
|
|
|
|
let body:any = { |
|
|
|
|
id:this.shenheTable[0].id, |
|
|
|
|
itemId:this.shenheTable[0].itemId, |
|
|
|
|
verifyState:5, |
|
|
|
|
contentType:this.shenheTable[0].contentType, |
|
|
|
|
title:this.shenheTable[0].title |
|
|
|
|
} |
|
|
|
|
this.http.put(`/api/ContentVerifies`,body).subscribe(data=>{ |
|
|
|
|
this.showtype = -1 |
|
|
|
|
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() |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
this.shenheTable=[] |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//批量审核
|
|
|
|
|
else{ |
|
|
|
|
let isTrue = window.confirm('确定拒绝选中条目的审核吗?') |
|
|
|
|
if(isTrue){ |
|
|
|
|
if(this.shenheTable[0].contentType==11||this.shenheTable[0].contentType==12){ //批量审批水源和重点单位
|
|
|
|
|
for(var i=0;i<this.shenheTable.length;i++){ |
|
|
|
|
var body={ |
|
|
|
|
id:this.shenheTable[i].id, |
|
|
|
|
itemId:this.shenheTable[i].itemId, |
|
|
|
|
verifyState:5 |
|
|
|
|
} |
|
|
|
|
companyrefuseList.push(body) |
|
|
|
|
} |
|
|
|
|
this.http.put(`/api/ContentVerifies/Batch`,companyrefuseList).subscribe(data=>{ |
|
|
|
|
this.snackBar.open('操作成功!','确定',config); |
|
|
|
|
this.getAlltabledate() |
|
|
|
|
}) |
|
|
|
|
}else{ |
|
|
|
|
for(var i=0;i<this.shenheTable.length;i++){ |
|
|
|
|
var cart={ |
|
|
|
|
planComponentId:this.shenheTable[i].itemId, |
|
|
|
|
auditStatus:this.shenheTable[i].verifyState==3?4:32, |
|
|
|
|
auditOpinion:'' |
|
|
|
|
} |
|
|
|
|
refuseList.push(cart) |
|
|
|
|
} |
|
|
|
|
this.http.put(`/api/PlanAudits/Batch`,refuseList).subscribe(data=>{ |
|
|
|
|
this.snackBar.open('操作成功!','确定',config); |
|
|
|
|
this.getAlltabledate() |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
const dialogRef =this.dialog.open(remark,{width:'460px',height:'290px',data:{shenhedata:this.shenheTable,type:2,radioid:this.radioid}}); |
|
|
|
|
dialogRef.afterClosed().subscribe(result => { |
|
|
|
|
this.shenheTable=[] |
|
|
|
|
} |
|
|
|
|
this.getAlltabledate() |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
//this.shenheTable=[]
|
|
|
|
|
|
|
|
|
@ -692,9 +543,210 @@ export class show3D{
|
|
|
|
|
styleUrls: ['./wait-examineer.component.scss'] |
|
|
|
|
}) |
|
|
|
|
export class remark{ |
|
|
|
|
constructor(private sanitizer: DomSanitizer,public dialogRef: MatDialogRef<show3D>,@Inject(MAT_DIALOG_DATA) public data,public dialog: MatDialog) {} |
|
|
|
|
constructor(private http:HttpClient,private sanitizer: DomSanitizer,public dialogRef: MatDialogRef<remark>,@Inject(MAT_DIALOG_DATA) public data,public dialog: MatDialog,public snackBar: MatSnackBar) {} |
|
|
|
|
ngOnInit(): void { |
|
|
|
|
console.log(this.data) |
|
|
|
|
this.shenheTable=this.data.shenhedata |
|
|
|
|
this.radioid=this.data.radioid |
|
|
|
|
} |
|
|
|
|
companyrefuseList=[] |
|
|
|
|
refuseList=[] |
|
|
|
|
shenheTable=[] |
|
|
|
|
companyAgreeList=[] |
|
|
|
|
agreeList=[] |
|
|
|
|
remark |
|
|
|
|
radioid |
|
|
|
|
//取消
|
|
|
|
|
close(){ |
|
|
|
|
this.dialogRef.close() |
|
|
|
|
} |
|
|
|
|
//确定
|
|
|
|
|
define(){ |
|
|
|
|
const config = new MatSnackBarConfig(); |
|
|
|
|
config.verticalPosition = 'top'; |
|
|
|
|
config.duration = 3000 |
|
|
|
|
if(this.data.type==1){ |
|
|
|
|
//同意操作
|
|
|
|
|
console.log(this.shenheTable) |
|
|
|
|
//单个审核
|
|
|
|
|
if(this.shenheTable.length == 1){ |
|
|
|
|
//重点单位审核
|
|
|
|
|
if(this.shenheTable[0].contentType == 11){ |
|
|
|
|
let body:any = { |
|
|
|
|
id:this.shenheTable[0].id, |
|
|
|
|
itemId:this.shenheTable[0].itemId, |
|
|
|
|
verifyState:4, |
|
|
|
|
contentType:11, |
|
|
|
|
remark:this.remark||'', |
|
|
|
|
title:this.shenheTable[0].title+'基本信息' |
|
|
|
|
} |
|
|
|
|
this.http.put(`/api/ContentVerifies`,body).subscribe(data=>{ |
|
|
|
|
this.snackBar.open('操作成功!','确定',config); |
|
|
|
|
this.dialogRef.close() |
|
|
|
|
//this.getAlltabledate()
|
|
|
|
|
}) |
|
|
|
|
}else if(this.shenheTable[0].contentType == 12 || this.shenheTable[0].contentType == 13 || this.shenheTable[0].contentType == 14){ |
|
|
|
|
console.log(1111,this.shenheTable[0]) |
|
|
|
|
let body:any = { |
|
|
|
|
id:this.shenheTable[0].id, |
|
|
|
|
itemId:this.shenheTable[0].itemId, |
|
|
|
|
verifyState:4, |
|
|
|
|
contentType:this.shenheTable[0].contentType, |
|
|
|
|
remark:this.remark||'', |
|
|
|
|
title:this.shenheTable[0].title |
|
|
|
|
} |
|
|
|
|
this.http.put(`/api/ContentVerifies`,body).subscribe(data=>{ |
|
|
|
|
this.snackBar.open('操作成功!','确定',config); |
|
|
|
|
//this.showtype = -1
|
|
|
|
|
this.dialogRef.close() |
|
|
|
|
//this.getAlltabledate()
|
|
|
|
|
}) |
|
|
|
|
}else{ |
|
|
|
|
//预案审核
|
|
|
|
|
if(this.shenheTable[0].verifyState==0){ |
|
|
|
|
let body:any={ |
|
|
|
|
auditStatus:16, |
|
|
|
|
auditOpinion:this.remark||'' |
|
|
|
|
} |
|
|
|
|
this.http.put(`/api/PlanAudits/${this.shenheTable[0].itemId}/First`,body).subscribe(data=>{ |
|
|
|
|
this.snackBar.open('操作成功!','确定',config); |
|
|
|
|
this.dialogRef.close() |
|
|
|
|
//this.getAlltabledate()
|
|
|
|
|
}) |
|
|
|
|
}else if(this.shenheTable[0].verifyState==3){ |
|
|
|
|
let body:any={ |
|
|
|
|
auditStatus:2, |
|
|
|
|
auditOpinion:this.remark||'' |
|
|
|
|
} |
|
|
|
|
this.http.put(`/api/PlanAudits/${this.radioid}`,body).subscribe(data=>{ |
|
|
|
|
this.snackBar.open('操作成功!','确定',config); |
|
|
|
|
this.dialogRef.close() |
|
|
|
|
//this.getAlltabledate()
|
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
this.shenheTable=[] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
//批量审核
|
|
|
|
|
else{ |
|
|
|
|
if(this.shenheTable[0].contentType==11||this.shenheTable[0].contentType==12){ //批量审批水源和重点单位
|
|
|
|
|
for(var i=0;i<this.shenheTable.length;i++){ |
|
|
|
|
var body={ |
|
|
|
|
id:this.shenheTable[i].id, |
|
|
|
|
itemId:this.shenheTable[i].itemId, |
|
|
|
|
verifyState:4, |
|
|
|
|
remark:this.remark |
|
|
|
|
} |
|
|
|
|
this.companyAgreeList.push(body) |
|
|
|
|
} |
|
|
|
|
this.http.put(`/api/ContentVerifies/Batch`,this.companyAgreeList).subscribe(data=>{ |
|
|
|
|
this.snackBar.open('操作成功!','确定',config); |
|
|
|
|
this.dialogRef.close() |
|
|
|
|
//this.getAlltabledate()
|
|
|
|
|
}) |
|
|
|
|
}else{ //批量审核预案
|
|
|
|
|
for(var i=0;i<this.shenheTable.length;i++){ |
|
|
|
|
var cart={ |
|
|
|
|
planComponentId:this.shenheTable[i].itemId, |
|
|
|
|
auditStatus:this.shenheTable[i].verifyState==3?2:16, |
|
|
|
|
auditOpinion:this.remark||'' |
|
|
|
|
} |
|
|
|
|
this.agreeList.push(cart) |
|
|
|
|
} |
|
|
|
|
this.http.put(`/api/PlanAudits/Batch`,this.agreeList).subscribe(data=>{ |
|
|
|
|
this.snackBar.open('操作成功!','确定',config); |
|
|
|
|
this.dialogRef.close() |
|
|
|
|
//this.getAlltabledate()
|
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
this.shenheTable=[] |
|
|
|
|
}
|
|
|
|
|
} |
|
|
|
|
else{ |
|
|
|
|
//单个审核拒绝
|
|
|
|
|
if(this.shenheTable.length==1){ |
|
|
|
|
//重点单位审核拒绝
|
|
|
|
|
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.dialogRef.close() |
|
|
|
|
//this.getAlltabledate()
|
|
|
|
|
}) |
|
|
|
|
}else if(this.shenheTable[0].contentType == 12 || this.shenheTable[0].contentType == 13 || this.shenheTable[0].contentType == 14){ |
|
|
|
|
let body:any = { |
|
|
|
|
id:this.shenheTable[0].id, |
|
|
|
|
itemId:this.shenheTable[0].itemId, |
|
|
|
|
verifyState:5, |
|
|
|
|
contentType:this.shenheTable[0].contentType, |
|
|
|
|
title:this.shenheTable[0].title |
|
|
|
|
} |
|
|
|
|
this.http.put(`/api/ContentVerifies`,body).subscribe(data=>{ |
|
|
|
|
//this.showtype = -1
|
|
|
|
|
this.snackBar.open('操作成功!','确定',config); |
|
|
|
|
this.dialogRef.close() |
|
|
|
|
}) |
|
|
|
|
}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.dialogRef.close() |
|
|
|
|
//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.dialogRef.close() |
|
|
|
|
//this.getAlltabledate()
|
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
this.shenheTable=[] |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
//批量审核
|
|
|
|
|
else{ |
|
|
|
|
if(this.shenheTable[0].contentType==11||this.shenheTable[0].contentType==12){ //批量审批水源和重点单位
|
|
|
|
|
for(var i=0;i<this.shenheTable.length;i++){ |
|
|
|
|
var bodyre={ |
|
|
|
|
id:this.shenheTable[i].id, |
|
|
|
|
itemId:this.shenheTable[i].itemId, |
|
|
|
|
verifyState:5 |
|
|
|
|
} |
|
|
|
|
this.companyrefuseList.push(bodyre) |
|
|
|
|
} |
|
|
|
|
this.http.put(`/api/ContentVerifies/Batch`,this.companyrefuseList).subscribe(data=>{ |
|
|
|
|
this.snackBar.open('操作成功!','确定',config); |
|
|
|
|
this.dialogRef.close() |
|
|
|
|
//this.getAlltabledate()
|
|
|
|
|
}) |
|
|
|
|
}else{ |
|
|
|
|
for(var i=0;i<this.shenheTable.length;i++){ |
|
|
|
|
var carts={ |
|
|
|
|
planComponentId:this.shenheTable[i].itemId, |
|
|
|
|
auditStatus:this.shenheTable[i].verifyState==3?4:32, |
|
|
|
|
auditOpinion:'' |
|
|
|
|
} |
|
|
|
|
this.refuseList.push(carts) |
|
|
|
|
} |
|
|
|
|
this.http.put(`/api/PlanAudits/Batch`,this.refuseList).subscribe(data=>{ |
|
|
|
|
this.snackBar.open('操作成功!','确定',config); |
|
|
|
|
this.dialogRef.close() |
|
|
|
|
//this.getAlltabledate()
|
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
this.shenheTable=[] |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |