|
|
|
@ -79,6 +79,17 @@ export class RealisticPictureComponent implements OnInit {
|
|
|
|
|
} |
|
|
|
|
}).subscribe((data: any) => { |
|
|
|
|
this.allRealPicture = data |
|
|
|
|
this.allRealPicture.unshift({ |
|
|
|
|
companyId: sessionStorage.getItem('companyId'), |
|
|
|
|
id: '重点部位', |
|
|
|
|
name: "重点部位", |
|
|
|
|
realityImages: null |
|
|
|
|
}, { |
|
|
|
|
companyId: sessionStorage.getItem('companyId'), |
|
|
|
|
id: '安全出口', |
|
|
|
|
name: "安全出口", |
|
|
|
|
realityImages: null |
|
|
|
|
}) |
|
|
|
|
this.selectReal = data[this.selectRealIndex] |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
@ -93,7 +104,7 @@ export class RealisticPictureComponent implements OnInit {
|
|
|
|
|
pageSize: this.pageSize, |
|
|
|
|
} |
|
|
|
|
this.http.get('/api/CompanySafetyExits/GetCompanySafetyExitImages', { params: params }).subscribe((data: any) => { |
|
|
|
|
console.log('当前单位安全出口', data) |
|
|
|
|
// console.log('当前单位安全出口', data)
|
|
|
|
|
this.allImages = data.items |
|
|
|
|
this.length = data.totalCount |
|
|
|
|
this.pageSize = this.pageSize |
|
|
|
@ -220,6 +231,17 @@ export class RealisticPictureComponent implements OnInit {
|
|
|
|
|
} |
|
|
|
|
}).subscribe((data: any) => { |
|
|
|
|
this.allRealPicture = data |
|
|
|
|
this.allRealPicture.unshift({ |
|
|
|
|
companyId: sessionStorage.getItem('companyId'), |
|
|
|
|
id: '重点部位', |
|
|
|
|
name: "重点部位", |
|
|
|
|
realityImages: null |
|
|
|
|
}, { |
|
|
|
|
companyId: sessionStorage.getItem('companyId'), |
|
|
|
|
id: '安全出口', |
|
|
|
|
name: "安全出口", |
|
|
|
|
realityImages: null |
|
|
|
|
}) |
|
|
|
|
this.selectReal = data[this.selectRealIndex] |
|
|
|
|
this.allImages = [] |
|
|
|
|
this.getAllRealPicture() |
|
|
|
@ -522,7 +544,7 @@ export class previewImg {
|
|
|
|
|
}) |
|
|
|
|
export class addRealPicture { |
|
|
|
|
|
|
|
|
|
constructor(private router: Router, private route: ActivatedRoute, private http: HttpClient, public dialog: MatDialog, public dialogRef: MatDialogRef<addRealPicture>) { } |
|
|
|
|
constructor(private router: Router, private route: ActivatedRoute, private http: HttpClient, public dialog: MatDialog, public dialogRef: MatDialogRef<addRealPicture>, public snackBar: MatSnackBar) { } |
|
|
|
|
|
|
|
|
|
ngOnInit(): void { |
|
|
|
|
this.companyId = sessionStorage.getItem('companyId') |
|
|
|
@ -537,9 +559,16 @@ export class addRealPicture {
|
|
|
|
|
name: e.name, |
|
|
|
|
companyId: companyId |
|
|
|
|
} |
|
|
|
|
this.http.post('/api/RealityImageGroups', data).subscribe(data => { |
|
|
|
|
this.dialogRef.close(data); |
|
|
|
|
}) |
|
|
|
|
if(e.name == '安全出口' || e.name == '重点部位'){ |
|
|
|
|
let config = new MatSnackBarConfig(); |
|
|
|
|
config.verticalPosition = 'top'; |
|
|
|
|
config.duration = 3000 |
|
|
|
|
this.snackBar.open('不允许创建名为安全出口或者重点部位的文件夹', '确定', config); |
|
|
|
|
}else{ |
|
|
|
|
this.http.post('/api/RealityImageGroups', data).subscribe(data => { |
|
|
|
|
this.dialogRef.close(data); |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
@ -555,7 +584,7 @@ export class addRealPicture {
|
|
|
|
|
export class editRealPicture { |
|
|
|
|
|
|
|
|
|
constructor(private router: Router, private route: ActivatedRoute, private http: HttpClient, public dialog: MatDialog, public dialogRef: MatDialogRef<editRealPicture>, |
|
|
|
|
@Inject(MAT_DIALOG_DATA) public data) { } |
|
|
|
|
@Inject(MAT_DIALOG_DATA) public data, public snackBar: MatSnackBar) { } |
|
|
|
|
|
|
|
|
|
ngOnInit(): void { |
|
|
|
|
this.name = this.data.name |
|
|
|
@ -571,6 +600,12 @@ export class editRealPicture {
|
|
|
|
|
name: e.name, |
|
|
|
|
companyId: companyId |
|
|
|
|
} |
|
|
|
|
if(e.name == '安全出口' || e.name == '重点部位'){ |
|
|
|
|
let config = new MatSnackBarConfig(); |
|
|
|
|
config.verticalPosition = 'top'; |
|
|
|
|
config.duration = 3000 |
|
|
|
|
this.snackBar.open('文件名不允许为安全出口或者重点部位', '确定', config); |
|
|
|
|
}else |
|
|
|
|
this.http.put(`/api/RealityImageGroups/${this.data.id}`, data).subscribe(data => { |
|
|
|
|
this.dialogRef.close('success'); |
|
|
|
|
}) |
|
|
|
|