|
|
@ -13,6 +13,7 @@ import {FormBuilder, FormGroup, Validators} from '@angular/forms'; |
|
|
|
import { async } from '@angular/core/testing'; |
|
|
|
import { async } from '@angular/core/testing'; |
|
|
|
import { Viewer } from 'photo-sphere-viewer'; |
|
|
|
import { Viewer } from 'photo-sphere-viewer'; |
|
|
|
import {STEPPER_GLOBAL_OPTIONS} from '@angular/cdk/stepper'; |
|
|
|
import {STEPPER_GLOBAL_OPTIONS} from '@angular/cdk/stepper'; |
|
|
|
|
|
|
|
import Swiper from 'swiper'; |
|
|
|
declare var CryptoJS |
|
|
|
declare var CryptoJS |
|
|
|
@Component({ |
|
|
|
@Component({ |
|
|
|
selector: 'app-entry-plan-look', |
|
|
|
selector: 'app-entry-plan-look', |
|
|
@ -103,7 +104,7 @@ export class EntryPlanLookComponent implements OnInit { |
|
|
|
} |
|
|
|
} |
|
|
|
//查看预案
|
|
|
|
//查看预案
|
|
|
|
lookPlan(e){ |
|
|
|
lookPlan(e){ |
|
|
|
if(e.planType == 16||e.planType == 4){
|
|
|
|
if(e.planType == 16||e.planType == 4||e.planType == 8){
|
|
|
|
// console.log(e.attachmentUrls)
|
|
|
|
// console.log(e.attachmentUrls)
|
|
|
|
var index=e.attachmentUrls[0].indexOf("\/") |
|
|
|
var index=e.attachmentUrls[0].indexOf("\/") |
|
|
|
if(e.attachmentUrls[0].substr(0,index)=='psw'){ |
|
|
|
if(e.attachmentUrls[0].substr(0,index)=='psw'){ |
|
|
@ -112,6 +113,12 @@ export class EntryPlanLookComponent implements OnInit { |
|
|
|
height:'800px', |
|
|
|
height:'800px', |
|
|
|
data: e.attachmentUrls[0] |
|
|
|
data: e.attachmentUrls[0] |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
}else if(e.attachmentUrls[0].substr(e.attachmentUrls[0].length-3,e.attachmentUrls[0].length)=='JPG'||e.attachmentUrls[0].substr(e.attachmentUrls[0].length-3,e.attachmentUrls[0].length)=='png'||e.attachmentUrls[0].substr(e.attachmentUrls[0].length-3,e.attachmentUrls[0].length)=='jpeg'){ |
|
|
|
|
|
|
|
let data = e |
|
|
|
|
|
|
|
const dialogRef = this.dialog.open(ImgDetails, {//调用open方法打开对话框并且携带参数过去
|
|
|
|
|
|
|
|
data:data.attachmentUrls, |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
dialogRef.afterClosed().subscribe(); |
|
|
|
} |
|
|
|
} |
|
|
|
else /* if(e.attachmentUrls[0].substr(e.attachmentUrls[0].length-4,e.attachmentUrls[0].length-1)=='docx'||e.attachmentUrls[0].substr(e.attachmentUrls[0].length-3,e.attachmentUrls[0].length)=='pdf' |
|
|
|
else /* if(e.attachmentUrls[0].substr(e.attachmentUrls[0].length-4,e.attachmentUrls[0].length-1)=='docx'||e.attachmentUrls[0].substr(e.attachmentUrls[0].length-3,e.attachmentUrls[0].length)=='pdf' |
|
|
|
||e.attachmentUrls[0].substr(e.attachmentUrls[0].length-3,e.attachmentUrls[0].length)=='doc'||e.attachmentUrls[0].substr(e.attachmentUrls[0].length-3,e.attachmentUrls[0].length)=='DOC' |
|
|
|
||e.attachmentUrls[0].substr(e.attachmentUrls[0].length-3,e.attachmentUrls[0].length)=='doc'||e.attachmentUrls[0].substr(e.attachmentUrls[0].length-3,e.attachmentUrls[0].length)=='DOC' |
|
|
@ -990,6 +997,8 @@ export class AddPlanone { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//下载文件弹出框
|
|
|
|
//下载文件弹出框
|
|
|
|
@Component({ |
|
|
|
@Component({ |
|
|
|
selector: 'downloadfile', |
|
|
|
selector: 'downloadfile', |
|
|
@ -1111,4 +1120,49 @@ export class PsViewer{ |
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//普通图片弹窗
|
|
|
|
|
|
|
|
@Component({ |
|
|
|
|
|
|
|
selector: 'imgdetails', |
|
|
|
|
|
|
|
templateUrl: './previewImg.html', |
|
|
|
|
|
|
|
styleUrls: ['./entry-plan-look.component.scss'] |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
export class ImgDetails{ |
|
|
|
|
|
|
|
constructor(private http:HttpClient,public dialog: MatDialog,public dialogRef: MatDialogRef<ImgDetails>, |
|
|
|
|
|
|
|
@Inject(MAT_DIALOG_DATA) public data) { } |
|
|
|
|
|
|
|
testSwiper: Swiper; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ngOnInit(): void { |
|
|
|
|
|
|
|
//console.log(this.data)
|
|
|
|
|
|
|
|
this.allImages = [] |
|
|
|
|
|
|
|
this.data.forEach(element => { |
|
|
|
|
|
|
|
element = `/api/Objects/PlanPlatform/${element}?x-oss-process=image/auto-orient,1` |
|
|
|
|
|
|
|
this.allImages.push(element) |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
//this.allImages.push(`${this.data.attachmentUrls[0]}?x-oss-process=image/auto-orient,1`)
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ngAfterViewInit() { |
|
|
|
|
|
|
|
this.testSwiper = new Swiper('.swiper-container', { |
|
|
|
|
|
|
|
lazy: true, |
|
|
|
|
|
|
|
direction: 'horizontal', |
|
|
|
|
|
|
|
loop: false, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 如果需要前进后退按钮
|
|
|
|
|
|
|
|
navigation: { |
|
|
|
|
|
|
|
nextEl: '.swiper-button-next', |
|
|
|
|
|
|
|
prevEl: '.swiper-button-prev', |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
allImages:any; //展示所有的图片
|
|
|
|
|
|
|
|
rotationAngle:number=0; //旋转角度
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//旋转图片
|
|
|
|
|
|
|
|
rotate () { |
|
|
|
|
|
|
|
this.rotationAngle = this.rotationAngle+90 |
|
|
|
|
|
|
|
if (this.rotationAngle === 360) {this.rotationAngle = 0} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |