|
|
|
@ -430,16 +430,30 @@ export class KeyUnitManagementComponent implements OnInit {
|
|
|
|
|
//勾选框事件
|
|
|
|
|
verifyState //判断是否可以修改
|
|
|
|
|
checkChange(e,element){ |
|
|
|
|
console.log(e) |
|
|
|
|
console.log(element) |
|
|
|
|
if(element.contentVerify!=null){ |
|
|
|
|
this.verifyState=element.contentVerify.verifyState |
|
|
|
|
|
|
|
|
|
}else{ |
|
|
|
|
this.verifyState=null |
|
|
|
|
} |
|
|
|
|
if(e.checked){ |
|
|
|
|
//this.deleteArr=element
|
|
|
|
|
this.deleteAll.push(element) |
|
|
|
|
}else{ |
|
|
|
|
for(var i=0;i<this.deleteAll.length;i++ ){ |
|
|
|
|
if(this.deleteAll[i].id==element.id){ |
|
|
|
|
this.deleteAll.splice(i,1) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
element.checked = e.checked |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
checkClick(element){ |
|
|
|
|
deleteArr//单个删除
|
|
|
|
|
deleteAll=[]//批量删除
|
|
|
|
|
checkClick(element,e){ |
|
|
|
|
if(element.contentVerify!=null){ |
|
|
|
|
if(element.contentVerify.verifyState==0||element.contentVerify.verifyState==3){ |
|
|
|
|
const config = new MatSnackBarConfig(); |
|
|
|
@ -448,6 +462,9 @@ export class KeyUnitManagementComponent implements OnInit {
|
|
|
|
|
this.snackBar.open('该单位正在审核不能选中','确定',config); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}else{ |
|
|
|
|
this.deleteArr=element |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//编辑单位信息
|
|
|
|
@ -510,11 +527,14 @@ export class KeyUnitManagementComponent implements OnInit {
|
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
//删除单位信息
|
|
|
|
|
deleteAudia=[]//批量删除提交数组
|
|
|
|
|
deleteunit(){ |
|
|
|
|
if(this.verifyState==0||this.verifyState==3){ |
|
|
|
|
this.deleteAudia=[] |
|
|
|
|
const config = new MatSnackBarConfig(); |
|
|
|
|
config.verticalPosition = 'top'; |
|
|
|
|
config.duration = 3000 |
|
|
|
|
console.log(this.deleteAll) |
|
|
|
|
if(this.verifyState==0||this.verifyState==3){ |
|
|
|
|
this.snackBar.open('审核中,不能删除','确定',config); |
|
|
|
|
}else{ |
|
|
|
|
let selectedunitArr = [] |
|
|
|
@ -525,29 +545,54 @@ export class KeyUnitManagementComponent implements OnInit {
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
if(selectedunitArr.length == 0){ |
|
|
|
|
const config = new MatSnackBarConfig(); |
|
|
|
|
config.verticalPosition = 'top'; |
|
|
|
|
config.duration = 3000 |
|
|
|
|
|
|
|
|
|
this.snackBar.open('请先选择要删除的单位','确定',config); |
|
|
|
|
} |
|
|
|
|
if(selectedunitArr.length != 1 && selectedunitArr.length != 0){ |
|
|
|
|
/* if(selectedunitArr.length != 1 && selectedunitArr.length != 0){ |
|
|
|
|
const config = new MatSnackBarConfig(); |
|
|
|
|
config.verticalPosition = 'top'; |
|
|
|
|
config.duration = 3000 |
|
|
|
|
this.snackBar.open('只能选择一个单位删除','确定',config); |
|
|
|
|
} |
|
|
|
|
if(selectedunitArr.length == 1){ //带着id跳到删除页面
|
|
|
|
|
let isTrue = confirm('您确定要删除吗') |
|
|
|
|
} */ |
|
|
|
|
if(this.deleteAll.length == 1){ //带着id跳到删除页面
|
|
|
|
|
let isTrue = confirm('您确定要提交删除审核吗') |
|
|
|
|
if(isTrue){ |
|
|
|
|
this.http.delete(`/api/Companies/${selectedunitArr[0]}`).subscribe(data=>{ |
|
|
|
|
const config = new MatSnackBarConfig(); |
|
|
|
|
config.verticalPosition = 'top'; |
|
|
|
|
config.duration = 3000 |
|
|
|
|
this.snackBar.open('删除成功','确定',config); |
|
|
|
|
this.getAllKeyUnit(); |
|
|
|
|
let body:any = { |
|
|
|
|
title:this.deleteAll[0].name, |
|
|
|
|
Operation:2, |
|
|
|
|
itemId:this.deleteAll[0].id, |
|
|
|
|
verifyState:3, |
|
|
|
|
contentType:11 |
|
|
|
|
} |
|
|
|
|
this.http.post(`/api/ContentVerifies`,body).subscribe(data=>{ |
|
|
|
|
this.snackBar.open('操作成功','确定',config); |
|
|
|
|
this.getAllKeyUnit() |
|
|
|
|
},err=>{ |
|
|
|
|
this.snackBar.open(err,'确定',config); |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}else if(this.deleteAll.length > 1){ |
|
|
|
|
let isTrue = confirm('您确定要提交删除审核吗') |
|
|
|
|
if(isTrue){ |
|
|
|
|
for(var i=0;i<this.deleteAll.length;i++ ){ |
|
|
|
|
let body:any = { |
|
|
|
|
title:this.deleteAll[i].name, |
|
|
|
|
Operation:2, |
|
|
|
|
itemId:this.deleteAll[i].id, |
|
|
|
|
verifyState:3, |
|
|
|
|
contentType:11 |
|
|
|
|
} |
|
|
|
|
this.deleteAudia.push(body) |
|
|
|
|
} |
|
|
|
|
console.log(this.deleteAudia) |
|
|
|
|
this.http.post(`/api/ContentVerifies/Batch`,this.deleteAudia).subscribe(data=>{ |
|
|
|
|
this.snackBar.open('操作成功','确定',config); |
|
|
|
|
this.getAllKeyUnit() |
|
|
|
|
},err=>{ |
|
|
|
|
this.snackBar.open(err,'确定',config); |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -844,7 +889,7 @@ export class companyAuditResult{
|
|
|
|
|
createTime='' |
|
|
|
|
organizationName=this.data.element.organizationName |
|
|
|
|
verifyTime='' |
|
|
|
|
remark=this.data.element.contentVerify.remark |
|
|
|
|
remark='' |
|
|
|
|
verifyOrganizationName |
|
|
|
|
verifyState=100 |
|
|
|
|
ngOnInit(): void { |
|
|
|
@ -855,6 +900,7 @@ export class companyAuditResult{
|
|
|
|
|
//this.remark=this.data.element.remark
|
|
|
|
|
this.verifyState=this.data.element.contentVerify.verifyState |
|
|
|
|
this.verifyOrganizationName=this.data.element.contentVerify.verifyOrganizationName |
|
|
|
|
this.remark=this.data.element.contentVerify.remark |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
onNoClick(): void { |
|
|
|
|