|
|
|
@ -21,6 +21,16 @@ export class KeyUnitManagementComponent implements OnInit {
|
|
|
|
|
|
|
|
|
|
constructor(private http:HttpClient,private router:Router,private route:ActivatedRoute,private tree: TreeService,public dialog: MatDialog,public snackBar: MatSnackBar) { } |
|
|
|
|
|
|
|
|
|
padMore=true//pad收缩控制
|
|
|
|
|
padput=false//pad收起按钮
|
|
|
|
|
open="更多筛选条件" |
|
|
|
|
down="收起" |
|
|
|
|
imgsrcopen="../../../assets/images/routdown2.png" |
|
|
|
|
imgsrcdown="../../../assets/images/routup2.png" |
|
|
|
|
padInfo(){ |
|
|
|
|
this.padMore=!this.padMore |
|
|
|
|
this.padput=!this.padput |
|
|
|
|
} |
|
|
|
|
private _transformer = (node, level: number) => { //初始化tree
|
|
|
|
|
return { |
|
|
|
|
expandable: !!node.children && node.children.length > 0, |
|
|
|
@ -59,7 +69,7 @@ export class KeyUnitManagementComponent implements OnInit {
|
|
|
|
|
//表头排序
|
|
|
|
|
sortData (e) { |
|
|
|
|
let data = this.tabledataSource.filteredData; |
|
|
|
|
console.log(data.filteredData) |
|
|
|
|
//console.log(data.filteredData)
|
|
|
|
|
// data.filteredData.forEach(element => {
|
|
|
|
|
// if(element.key.indexOf(".") != -1){
|
|
|
|
|
// let typeArr = element.key.split('.')
|
|
|
|
@ -208,6 +218,11 @@ export class KeyUnitManagementComponent implements OnInit {
|
|
|
|
|
this.getOrganizations(); |
|
|
|
|
this.getUnittype(); |
|
|
|
|
this.getAllKeyUnit(); |
|
|
|
|
if(window.matchMedia("(max-width: 1290px)").matches){ |
|
|
|
|
this.padMore=true |
|
|
|
|
}else{ |
|
|
|
|
this.padMore=false |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//获得所有重点单位
|
|
|
|
|
|
|
|
|
@ -431,8 +446,6 @@ export class KeyUnitManagementComponent implements OnInit {
|
|
|
|
|
//勾选框事件
|
|
|
|
|
verifyState //判断是否可以修改
|
|
|
|
|
checkChange(e,element){ |
|
|
|
|
console.log(e) |
|
|
|
|
console.log(element) |
|
|
|
|
if(element.contentVerify!=null){ |
|
|
|
|
this.verifyState=element.contentVerify.verifyState |
|
|
|
|
|
|
|
|
@ -534,7 +547,7 @@ export class KeyUnitManagementComponent implements OnInit {
|
|
|
|
|
const config = new MatSnackBarConfig(); |
|
|
|
|
config.verticalPosition = 'top'; |
|
|
|
|
config.duration = 3000 |
|
|
|
|
console.log(this.deleteAll) |
|
|
|
|
//console.log(this.deleteAll)
|
|
|
|
|
if(this.verifyState==0||this.verifyState==3){ |
|
|
|
|
this.snackBar.open('审核中,不能删除','确定',config); |
|
|
|
|
}else{ |
|
|
|
@ -574,7 +587,7 @@ export class KeyUnitManagementComponent implements OnInit {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}else if(this.deleteAll.length > 1){ |
|
|
|
|
let isTrue = confirm('您确定要提交删除审核吗') |
|
|
|
|
let isTrue = confirm('重点单位删除需审核员审核,审核通过方可删除') |
|
|
|
|
if(isTrue){ |
|
|
|
|
for(var i=0;i<this.deleteAll.length;i++ ){ |
|
|
|
|
let body:any = { |
|
|
|
@ -586,7 +599,7 @@ export class KeyUnitManagementComponent implements OnInit {
|
|
|
|
|
} |
|
|
|
|
this.deleteAudia.push(body) |
|
|
|
|
} |
|
|
|
|
console.log(this.deleteAudia) |
|
|
|
|
|
|
|
|
|
this.http.post(`/api/ContentVerifies/Batch`,this.deleteAudia).subscribe(data=>{ |
|
|
|
|
this.snackBar.open('操作成功','确定',config); |
|
|
|
|
this.getAllKeyUnit() |
|
|
|
@ -748,7 +761,6 @@ export class KeyUnitManagementComponent implements OnInit {
|
|
|
|
|
} |
|
|
|
|
//审核结果
|
|
|
|
|
auditResult(element){ |
|
|
|
|
// console.log(element)
|
|
|
|
|
const dialogRef = this.dialog.open(companyAuditResult, { |
|
|
|
|
width:"400px", |
|
|
|
|
//height:"300px",
|
|
|
|
@ -866,7 +878,6 @@ export class upname{
|
|
|
|
|
id:this.oldid, |
|
|
|
|
name: this.unitname |
|
|
|
|
} |
|
|
|
|
console.log(paramsdata) |
|
|
|
|
this.http.put(`/api/Companies/${this.oldid}/UpdateName`,paramsdata).subscribe((data:any)=>{ |
|
|
|
|
this.snackBar.open("修改名字成功",'确定',config);
|
|
|
|
|
},err => { |
|
|
|
|