|
|
|
@ -15,6 +15,7 @@ import { Viewer } from 'photo-sphere-viewer';
|
|
|
|
|
import { STEPPER_GLOBAL_OPTIONS } from '@angular/cdk/stepper'; |
|
|
|
|
import Swiper from 'swiper'; |
|
|
|
|
import { resolve } from 'dns'; |
|
|
|
|
import { DomSanitizer } from '@angular/platform-browser'; |
|
|
|
|
declare var CryptoJS |
|
|
|
|
@Component({ |
|
|
|
|
selector: 'app-entry-plan-look', |
|
|
|
@ -22,7 +23,7 @@ declare var CryptoJS
|
|
|
|
|
styleUrls: ['./entry-plan-look.component.scss'] |
|
|
|
|
}) |
|
|
|
|
export class EntryPlanLookComponent implements OnInit { |
|
|
|
|
constructor(private http: HttpClient, private router: Router, private route: ActivatedRoute, private tree: TreeService, public dialog: MatDialog, public snackBar: MatSnackBar) { } |
|
|
|
|
constructor(private http: HttpClient, private router: Router, private route: ActivatedRoute, private tree: TreeService, public dialog: MatDialog, public snackBar: MatSnackBar, private sanitizer: DomSanitizer) { } |
|
|
|
|
pageEvent: PageEvent; |
|
|
|
|
private _transformer = (node, level: number) => { //初始化tree
|
|
|
|
|
return { |
|
|
|
@ -639,20 +640,31 @@ export class EntryPlanLookComponent implements OnInit {
|
|
|
|
|
//读取下载文件信息
|
|
|
|
|
readFile(element) { |
|
|
|
|
this.uploadFileLonging = element |
|
|
|
|
const dialogRef = this.dialog.open(DownloadFile, { |
|
|
|
|
width: "435px", |
|
|
|
|
// height:"410px",
|
|
|
|
|
data: { fileUrls: element.attachmentUrls, compantData: this.unitdata.unitname, element: element } |
|
|
|
|
}); |
|
|
|
|
dialogRef.afterClosed().subscribe( |
|
|
|
|
data => { |
|
|
|
|
if (data) { |
|
|
|
|
this.downloadFileName = data.fileName |
|
|
|
|
this.download = data |
|
|
|
|
this.downloadFile() |
|
|
|
|
console.log(element) |
|
|
|
|
if(element.planType==16&&(element.planMode==4||element.planMode==2)){ |
|
|
|
|
const dialogRef = this.dialog.open(wenbenUpload, { |
|
|
|
|
width: "650px", |
|
|
|
|
height:"710px", |
|
|
|
|
data: {src:`/planManagement/createplanonlinefive?navIsOpen=false&companyId=${this.companyId}&planName=${element.name}&unitName=${this.unitdata.unitname}&planCategory=${element.planCategory}&planId=${element.id}&unitTypeId=${this.compantData.buildingTypes[0].id}&orName=${this.compantData.organizationName}&orId=${this.compantData.organizationId}&pattern=false&xiazai=true`} |
|
|
|
|
}); |
|
|
|
|
//window.open(`/planManagement/createplanonlinefive?navIsOpen=false&companyId=${this.companyId}&planName=${element.name}&unitName=${this.unitdata.unitname}&planCategory=${element.planCategory}&planId=${element.id}&unitTypeId=${this.compantData.buildingTypes[0].id}&orName=${this.compantData.organizationName}&orId=${this.compantData.organizationId}&pattern=false&xiazai=true`)
|
|
|
|
|
}else{ |
|
|
|
|
const dialogRef = this.dialog.open(DownloadFile, { |
|
|
|
|
width: "435px", |
|
|
|
|
// height:"410px",
|
|
|
|
|
data: { fileUrls: element.attachmentUrls, compantData: this.unitdata.unitname, element: element } |
|
|
|
|
}); |
|
|
|
|
dialogRef.afterClosed().subscribe( |
|
|
|
|
data => { |
|
|
|
|
if (data) { |
|
|
|
|
this.downloadFileName = data.fileName |
|
|
|
|
this.download = data |
|
|
|
|
this.downloadFile() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
); |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//初始化下载
|
|
|
|
@ -1681,7 +1693,7 @@ export class editUpload{
|
|
|
|
|
constructor(private http: HttpClient, public dialogRef: MatDialogRef<editUpload>, @Inject(MAT_DIALOG_DATA) public data, public snackBar: MatSnackBar) { } |
|
|
|
|
planName: any//预案名称
|
|
|
|
|
ngOnInit(): void { |
|
|
|
|
console.log(this.data) |
|
|
|
|
//console.log(this.data)
|
|
|
|
|
} |
|
|
|
|
onNoClick(): void { |
|
|
|
|
this.dialogRef.close(); |
|
|
|
@ -1694,7 +1706,10 @@ export class editUpload{
|
|
|
|
|
objectName: any; //上传对象名
|
|
|
|
|
uploadId: any; //上传分块上传事件编号
|
|
|
|
|
lastyuanData //之前的预案数据
|
|
|
|
|
|
|
|
|
|
//上传
|
|
|
|
|
upload() { |
|
|
|
|
document.getElementById('up').click() |
|
|
|
|
} |
|
|
|
|
//上传文件input
|
|
|
|
|
filechange(e) { |
|
|
|
|
this.file = e.target.files[0] || null //上传的文件
|
|
|
|
@ -1852,3 +1867,19 @@ filechange(e) {
|
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//在线编制文本预案下载
|
|
|
|
|
@Component({ |
|
|
|
|
selector: 'wenbenUpload', |
|
|
|
|
templateUrl: './upNew.html', |
|
|
|
|
styleUrls: ['./entry-plan-look.component.scss'] |
|
|
|
|
}) |
|
|
|
|
export class wenbenUpload{ |
|
|
|
|
constructor(private http: HttpClient, public dialogRef: MatDialogRef<wenbenUpload>, @Inject(MAT_DIALOG_DATA) public data, public snackBar: MatSnackBar, private sanitizer: DomSanitizer) { } |
|
|
|
|
ngOnInit(): void { |
|
|
|
|
console.log(this.data) |
|
|
|
|
window.setTimeout(()=>{ |
|
|
|
|
this.dialogRef.close(); |
|
|
|
|
},5000) |
|
|
|
|
} |
|
|
|
|
src=this.sanitizer.bypassSecurityTrustResourceUrl(this.data.src); |
|
|
|
|
} |
|
|
|
|