|
|
|
@ -4,13 +4,14 @@
|
|
|
|
|
* @Author: sueRimn |
|
|
|
|
* @Date: 2020-12-25 10:19:31 |
|
|
|
|
* @LastEditors: sueRimn |
|
|
|
|
* @LastEditTime: 2021-01-29 15:45:34 |
|
|
|
|
* @LastEditTime: 2021-02-02 15:57:09 |
|
|
|
|
*/ |
|
|
|
|
import { Component, OnInit } from '@angular/core'; |
|
|
|
|
import { FormControl } from '@angular/forms'; |
|
|
|
|
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar'; |
|
|
|
|
import { HttpClient } from '@angular/common/http' |
|
|
|
|
import { DomSanitizer } from '@angular/platform-browser'; |
|
|
|
|
import { Viewer } from 'photo-sphere-viewer'; |
|
|
|
|
declare var CryptoJS |
|
|
|
|
|
|
|
|
|
@Component({ |
|
|
|
@ -71,6 +72,8 @@ export class PlanRecordComponent implements OnInit {
|
|
|
|
|
endtime//结束时间
|
|
|
|
|
count//一共多少条
|
|
|
|
|
tableDate |
|
|
|
|
showPvt=false//全景图是否显示
|
|
|
|
|
showtype=0//0:word,1:全景图,2:二维三维,3:重点单位
|
|
|
|
|
|
|
|
|
|
//获取表格数据
|
|
|
|
|
getAlltabledate(){ |
|
|
|
@ -119,11 +122,24 @@ export class PlanRecordComponent implements OnInit {
|
|
|
|
|
//表格点击事件
|
|
|
|
|
tableClick(e,item){ |
|
|
|
|
//e.target.parentElement.bgColor='#2196F3'
|
|
|
|
|
//console.log(e,item)
|
|
|
|
|
let filename:string |
|
|
|
|
let fetchUrl |
|
|
|
|
this.http.get(`/api/PlanComponents/${item.itemId}`).subscribe((data:any)=>{ |
|
|
|
|
if(data.planType!=2&&data.planType!=1){ |
|
|
|
|
fetchUrl=data.attachmentUrls[0] |
|
|
|
|
var index=fetchUrl.indexOf("\/") |
|
|
|
|
if(fetchUrl.substr(0,index)=='psw'){ |
|
|
|
|
this.showtype=1 |
|
|
|
|
window.setTimeout(()=>{ |
|
|
|
|
const viewer = new Viewer({ |
|
|
|
|
container: document.querySelector('#viewer'), |
|
|
|
|
panorama:'/api/Objects/PlanPlatform/'+ fetchUrl, |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
}else{ |
|
|
|
|
this.showtype=0 |
|
|
|
|
this.http.get(`/api/ObjectMetadata/PlanPlatform/${fetchUrl}`).subscribe((data:any)=>{ |
|
|
|
|
filename=data.fileName
|
|
|
|
|
let json={ |
|
|
|
@ -149,6 +165,14 @@ export class PlanRecordComponent implements OnInit {
|
|
|
|
|
this.iframeSrc=this.sanitizer.bypassSecurityTrustResourceUrl(this.src); |
|
|
|
|
//window.open(`http://121.5.10.84/apps/editor/openPreview?data=${base64}`)
|
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}else{ |
|
|
|
|
this.showtype=2 |
|
|
|
|
this.src=`/planAudit/planpass?id=${data.companyId}&companyName=${data.companyName}&auditPlanId=${data.id}&auditStatus=${data.auditStatus}&planType=1` |
|
|
|
|
this.iframeSrc=this.sanitizer.bypassSecurityTrustResourceUrl(this.src); |
|
|
|
|
//window.open(`/planAudit/planpass?id=${data.companyId}&companyName=${data.companyName}&auditPlanId=${data.id}&auditStatus=${data.auditStatus}&planType=1`)
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|