|
|
|
@ -4,7 +4,7 @@
|
|
|
|
|
* @Author: sueRimn |
|
|
|
|
* @Date: 2020-12-25 16:13:50 |
|
|
|
|
* @LastEditors: sueRimn |
|
|
|
|
* @LastEditTime: 2021-01-29 15:45:27 |
|
|
|
|
* @LastEditTime: 2021-02-02 15:05:56 |
|
|
|
|
*/ |
|
|
|
|
import { Component, OnInit } from '@angular/core'; |
|
|
|
|
import { FormControl } from '@angular/forms'; |
|
|
|
@ -80,7 +80,6 @@ export class WaitExamineerComponent implements OnInit {
|
|
|
|
|
this.indexbar.dispose() */ |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
wordShow=true |
|
|
|
|
iframeSrc |
|
|
|
|
src='' |
|
|
|
|
|
|
|
|
@ -102,7 +101,7 @@ export class WaitExamineerComponent implements OnInit {
|
|
|
|
|
chuorzhong//判断初审还是终审
|
|
|
|
|
radioid//选中的id
|
|
|
|
|
shenheTable=[]//选中要审核的对象
|
|
|
|
|
showAllimg=false |
|
|
|
|
showtype=0//0:word,1:全景图,2:二维三维,3:重点单位
|
|
|
|
|
|
|
|
|
|
//获取表格数据
|
|
|
|
|
getAlltabledate(){ |
|
|
|
@ -146,52 +145,61 @@ export class WaitExamineerComponent implements OnInit {
|
|
|
|
|
//radio点击事件
|
|
|
|
|
radioClick(e,item){ |
|
|
|
|
//e.target.parentElement.bgColor='#2196F3'
|
|
|
|
|
//console.log(e,item)
|
|
|
|
|
console.log(e,item) |
|
|
|
|
let filename:string |
|
|
|
|
let fetchUrl |
|
|
|
|
this.http.get(`/api/PlanComponents/${item.itemId}`).subscribe((data:any)=>{ |
|
|
|
|
fetchUrl=data.attachmentUrls[0] |
|
|
|
|
if(fetchUrl.substr(0,3)=='psw'){ |
|
|
|
|
this.wordShow=false |
|
|
|
|
this.showAllimg=true |
|
|
|
|
window.setTimeout(()=>{ |
|
|
|
|
const viewer = new Viewer({ |
|
|
|
|
container: document.querySelector('#viewer'), |
|
|
|
|
panorama:'/api/Objects/PlanPlatform/'+ fetchUrl, |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
console.log(data) |
|
|
|
|
|
|
|
|
|
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={ |
|
|
|
|
doc: { |
|
|
|
|
docId: item.id,
|
|
|
|
|
title: filename, |
|
|
|
|
//title: filename,
|
|
|
|
|
fetchUrl: `http://${location.host}/api/Objects/PlanPlatform/`+fetchUrl |
|
|
|
|
}, |
|
|
|
|
user: { |
|
|
|
|
uid: "test", |
|
|
|
|
nickName: "test", |
|
|
|
|
avatar: "", |
|
|
|
|
privilege: [ |
|
|
|
|
'FILE_READ','FILE_DOWNLOAD', 'FILE_PRINT'
|
|
|
|
|
], |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
var stringjson=JSON.stringify(json) |
|
|
|
|
var wordArray = CryptoJS.enc.Utf8.parse(stringjson); |
|
|
|
|
var base64 = CryptoJS.enc.Base64.stringify(wordArray); |
|
|
|
|
this.src=`http://121.5.10.84/apps/editor/openPreview?data=${base64}` |
|
|
|
|
this.iframeSrc=this.sanitizer.bypassSecurityTrustResourceUrl(this.src); |
|
|
|
|
//window.open(`http://121.5.10.84/apps/editor/openPreview?data=${base64}`)
|
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}else{ |
|
|
|
|
this.wordShow=true |
|
|
|
|
this.showAllimg=false |
|
|
|
|
this.http.get(`/api/ObjectMetadata/PlanPlatform/${fetchUrl}`).subscribe((data:any)=>{ |
|
|
|
|
filename=data.fileName
|
|
|
|
|
let json={ |
|
|
|
|
doc: { |
|
|
|
|
docId: item.id,
|
|
|
|
|
title: filename, |
|
|
|
|
//title: filename,
|
|
|
|
|
fetchUrl: `http://${location.host}/api/Objects/PlanPlatform/`+fetchUrl |
|
|
|
|
}, |
|
|
|
|
user: { |
|
|
|
|
uid: "test", |
|
|
|
|
nickName: "test", |
|
|
|
|
avatar: "", |
|
|
|
|
privilege: [ |
|
|
|
|
'FILE_READ','FILE_DOWNLOAD', 'FILE_PRINT'
|
|
|
|
|
], |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
var stringjson=JSON.stringify(json) |
|
|
|
|
var wordArray = CryptoJS.enc.Utf8.parse(stringjson); |
|
|
|
|
var base64 = CryptoJS.enc.Base64.stringify(wordArray); |
|
|
|
|
this.src=`http://121.5.10.84/apps/editor/openPreview?data=${base64}` |
|
|
|
|
this.iframeSrc=this.sanitizer.bypassSecurityTrustResourceUrl(this.src); |
|
|
|
|
//window.open(`http://121.5.10.84/apps/editor/openPreview?data=${base64}`)
|
|
|
|
|
}) |
|
|
|
|
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`)
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
if(e.checked){ |
|
|
|
|