|
|
@ -4,11 +4,12 @@ |
|
|
|
* @Author: sueRimn |
|
|
|
* @Author: sueRimn |
|
|
|
* @Date: 2020-12-25 16:13:50 |
|
|
|
* @Date: 2020-12-25 16:13:50 |
|
|
|
* @LastEditors: sueRimn |
|
|
|
* @LastEditors: sueRimn |
|
|
|
* @LastEditTime: 2021-02-03 16:24:16 |
|
|
|
* @LastEditTime: 2021-02-05 09:46:54 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
import { Component, OnInit } from '@angular/core'; |
|
|
|
import { Component, Inject, OnInit } from '@angular/core'; |
|
|
|
import { FormControl } from '@angular/forms'; |
|
|
|
import { FormControl } from '@angular/forms'; |
|
|
|
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar'; |
|
|
|
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar'; |
|
|
|
|
|
|
|
import {MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog'; |
|
|
|
import { HttpClient } from '@angular/common/http' |
|
|
|
import { HttpClient } from '@angular/common/http' |
|
|
|
declare var CryptoJS |
|
|
|
declare var CryptoJS |
|
|
|
import { DomSanitizer } from '@angular/platform-browser'; |
|
|
|
import { DomSanitizer } from '@angular/platform-browser'; |
|
|
@ -22,7 +23,7 @@ declare var echarts: any; |
|
|
|
}) |
|
|
|
}) |
|
|
|
export class WaitExamineerComponent implements OnInit { |
|
|
|
export class WaitExamineerComponent implements OnInit { |
|
|
|
|
|
|
|
|
|
|
|
constructor(private http:HttpClient,public snackBar: MatSnackBar,private sanitizer: DomSanitizer) { |
|
|
|
constructor(private http:HttpClient,public snackBar: MatSnackBar,private sanitizer: DomSanitizer,public dialog: MatDialog) { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -101,7 +102,14 @@ export class WaitExamineerComponent implements OnInit { |
|
|
|
chuorzhong//判断初审还是终审
|
|
|
|
chuorzhong//判断初审还是终审
|
|
|
|
radioid//选中的id
|
|
|
|
radioid//选中的id
|
|
|
|
shenheTable=[]//选中要审核的对象
|
|
|
|
shenheTable=[]//选中要审核的对象
|
|
|
|
showtype=2//0:word,1:全景图,2:二维三维,3:重点单位
|
|
|
|
showtype//0:word,1:全景图,2:二维三维,3:重点单位
|
|
|
|
|
|
|
|
compantData={name:'',buildingTypes:[],address:''} |
|
|
|
|
|
|
|
organizationName |
|
|
|
|
|
|
|
planData |
|
|
|
|
|
|
|
id |
|
|
|
|
|
|
|
companyId |
|
|
|
|
|
|
|
fetchUrl |
|
|
|
|
|
|
|
companyName |
|
|
|
|
|
|
|
|
|
|
|
//获取表格数据
|
|
|
|
//获取表格数据
|
|
|
|
getAlltabledate(){ |
|
|
|
getAlltabledate(){ |
|
|
@ -146,32 +154,65 @@ export class WaitExamineerComponent implements OnInit { |
|
|
|
radioClick(e,item){ |
|
|
|
radioClick(e,item){ |
|
|
|
//e.target.parentElement.bgColor='#2196F3'
|
|
|
|
//e.target.parentElement.bgColor='#2196F3'
|
|
|
|
console.log(e,item) |
|
|
|
console.log(e,item) |
|
|
|
let filename:string |
|
|
|
this.id=item.id |
|
|
|
let fetchUrl |
|
|
|
this.fetchUrl='' |
|
|
|
|
|
|
|
|
|
|
|
this.http.get(`/api/PlanComponents/${item.itemId}`).subscribe((data:any)=>{ |
|
|
|
this.http.get(`/api/PlanComponents/${item.itemId}`).subscribe((data:any)=>{ |
|
|
|
|
|
|
|
this.companyId=data.companyId |
|
|
|
|
|
|
|
this.companyName=data.companyName |
|
|
|
if(data.planType!=2&&data.planType!=1){ |
|
|
|
if(data.planType!=2&&data.planType!=1){ |
|
|
|
fetchUrl=data.attachmentUrls[0] |
|
|
|
this.fetchUrl=data.attachmentUrls[0] |
|
|
|
var index=fetchUrl.indexOf("\/") |
|
|
|
var index=this.fetchUrl.indexOf("\/") |
|
|
|
if(fetchUrl.substr(0,index)=='psw'){ |
|
|
|
if(this.fetchUrl.substr(0,index)=='psw'){ |
|
|
|
this.showtype=1 |
|
|
|
this.showtype=1 |
|
|
|
window.setTimeout(()=>{ |
|
|
|
window.setTimeout(()=>{ |
|
|
|
const viewer = new Viewer({ |
|
|
|
const viewer = new Viewer({ |
|
|
|
container: document.querySelector('#viewer'), |
|
|
|
container: document.querySelector('#viewer'), |
|
|
|
panorama:'/api/Objects/PlanPlatform/'+ fetchUrl, |
|
|
|
panorama:'/api/Objects/PlanPlatform/'+ this.fetchUrl, |
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
}else{ |
|
|
|
}else{ |
|
|
|
this.showtype=0 |
|
|
|
this.lookWord() |
|
|
|
this.http.get(`/api/ObjectMetadata/PlanPlatform/${fetchUrl}`).subscribe((data:any)=>{ |
|
|
|
} |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
this.organizationName=item.organizationName |
|
|
|
|
|
|
|
this.getPlanData() |
|
|
|
|
|
|
|
//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){ |
|
|
|
|
|
|
|
this.shenheTable.push(item) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else{ |
|
|
|
|
|
|
|
for(var i=0;i<this.shenheTable.length;i++ ){ |
|
|
|
|
|
|
|
if(this.shenheTable[i].id==item.id){ |
|
|
|
|
|
|
|
this.shenheTable.splice(i,1) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/* this.chuorzhong=item.verifyState |
|
|
|
|
|
|
|
this.radioid=item.itemId */ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//毕升
|
|
|
|
|
|
|
|
lookWord(){ |
|
|
|
|
|
|
|
this.showtype=0 |
|
|
|
|
|
|
|
let filename:string |
|
|
|
|
|
|
|
this.http.get(`/api/ObjectMetadata/PlanPlatform/${this.fetchUrl}`).subscribe((data:any)=>{ |
|
|
|
filename=data.fileName
|
|
|
|
filename=data.fileName
|
|
|
|
let json={ |
|
|
|
let json={ |
|
|
|
doc: { |
|
|
|
doc: { |
|
|
|
docId: item.id,
|
|
|
|
docId: this.id,
|
|
|
|
title: filename, |
|
|
|
title: filename, |
|
|
|
//title: filename,
|
|
|
|
//title: filename,
|
|
|
|
fetchUrl: `http://${location.host}/api/Objects/PlanPlatform/`+fetchUrl |
|
|
|
fetchUrl: `http://${location.host}/api/Objects/PlanPlatform/`+this.fetchUrl |
|
|
|
}, |
|
|
|
}, |
|
|
|
user: { |
|
|
|
user: { |
|
|
|
uid: "test", |
|
|
|
uid: "test", |
|
|
@ -189,29 +230,57 @@ export class WaitExamineerComponent implements OnInit { |
|
|
|
this.iframeSrc=this.sanitizer.bypassSecurityTrustResourceUrl(this.src); |
|
|
|
this.iframeSrc=this.sanitizer.bypassSecurityTrustResourceUrl(this.src); |
|
|
|
//window.open(`http://121.5.10.84/apps/editor/openPreview?data=${base64}`)
|
|
|
|
//window.open(`http://121.5.10.84/apps/editor/openPreview?data=${base64}`)
|
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
}else{ |
|
|
|
getPlanData () { |
|
|
|
this.showtype=2 |
|
|
|
let header = {
|
|
|
|
this.src=`/planAudit/planpass?id=${data.companyId}&companyName=${data.companyName}&auditPlanId=${data.id}&auditStatus=${data.auditStatus}&planType=1` |
|
|
|
CompanyName: this.companyName || '', |
|
|
|
this.iframeSrc=this.sanitizer.bypassSecurityTrustResourceUrl(this.src); |
|
|
|
//AuditStatus: this.id || '',
|
|
|
|
//window.open(`/planAudit/planpass?id=${data.companyId}&companyName=${data.companyName}&auditPlanId=${data.id}&auditStatus=${data.auditStatus}&planType=1`)
|
|
|
|
PageSize: '100', |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(e.checked){ |
|
|
|
|
|
|
|
this.shenheTable.push(item) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
else{ |
|
|
|
console.log(header) |
|
|
|
for(var i=0;i<this.shenheTable.length;i++ ){ |
|
|
|
this.http.get('/api/PlanAudits',{params:header}).subscribe((data:any)=>{ |
|
|
|
if(this.shenheTable[i].id==item.id){ |
|
|
|
data.items.forEach(element => { |
|
|
|
this.shenheTable.splice(i,1) |
|
|
|
/* if (element.id===this.id) { |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} */ |
|
|
|
|
|
|
|
this.planData = element |
|
|
|
|
|
|
|
this.organizationName = element.committerOrganizationName |
|
|
|
|
|
|
|
this.handleData() |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//查看二维三维预案
|
|
|
|
|
|
|
|
thirdPartyURL |
|
|
|
|
|
|
|
planType |
|
|
|
|
|
|
|
handleData () { |
|
|
|
|
|
|
|
this.planType = this.planData.planMode |
|
|
|
|
|
|
|
let data = this.planData |
|
|
|
|
|
|
|
console.log(this.planData) |
|
|
|
|
|
|
|
if (this.planData.planMode==0) { //预案planMode=0时, 查看word
|
|
|
|
|
|
|
|
//this.lookWord()
|
|
|
|
|
|
|
|
} else if (this.planData.planMode==1) { //预案planMode=1时, 解析文档
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else if (this.planData.planMode==2) { //预案planMode=2时, 跳查看页面组件
|
|
|
|
|
|
|
|
sessionStorage.setItem("buildingTypeId", this.compantData.buildingTypes.length? this.compantData.buildingTypes[0].id: undefined); |
|
|
|
|
|
|
|
sessionStorage.setItem("companyId",this.companyId); |
|
|
|
|
|
|
|
sessionStorage.setItem("planId",this.id); |
|
|
|
|
|
|
|
sessionStorage.setItem("editable",'0'); |
|
|
|
|
|
|
|
} else if (this.planData.planMode==3) { //预案planMode=3时, 第三方网址
|
|
|
|
|
|
|
|
this.showtype=2 |
|
|
|
|
|
|
|
this.http.get(`/api/Plans/${data.companyId}`).subscribe((data:any)=>{ |
|
|
|
|
|
|
|
data && data.company? this.compantData = data.company : null |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
//this.dialog.open(show3D,{width:'1350px',height:'700px',data:{url:data.url}}); //打开图片弹窗
|
|
|
|
|
|
|
|
this.thirdPartyURL = this.sanitizer.bypassSecurityTrustResourceUrl(data.url) |
|
|
|
} |
|
|
|
} |
|
|
|
/* this.chuorzhong=item.verifyState |
|
|
|
|
|
|
|
this.radioid=item.itemId */ |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//打开三维预案弹窗
|
|
|
|
|
|
|
|
oopen3Dshow(){ |
|
|
|
|
|
|
|
this.dialog.open(show3D,{width:'1550px',height:'850px',data:{url:this.thirdPartyURL}}); |
|
|
|
} |
|
|
|
} |
|
|
|
//变更数据和全部数据切换按钮
|
|
|
|
//变更数据和全部数据切换按钮
|
|
|
|
buttonChange(){ |
|
|
|
buttonChange(){ |
|
|
@ -439,3 +508,17 @@ export class WaitExamineerComponent implements OnInit { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Component({ |
|
|
|
|
|
|
|
selector: 'app-wait-examineer-show3D', |
|
|
|
|
|
|
|
templateUrl: './show3D.html', |
|
|
|
|
|
|
|
styleUrls: ['./wait-examineer.component.scss'] |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
export class show3D{ |
|
|
|
|
|
|
|
constructor(private sanitizer: DomSanitizer,public dialogRef: MatDialogRef<show3D>,@Inject(MAT_DIALOG_DATA) public data,public dialog: MatDialog) {} |
|
|
|
|
|
|
|
ngOnInit(): void { |
|
|
|
|
|
|
|
console.log(this.data.url.changingThisBreaksApplicationSecurity) |
|
|
|
|
|
|
|
this.threedUrl=this.sanitizer.bypassSecurityTrustResourceUrl(this.data.url.changingThisBreaksApplicationSecurity) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
threedUrl |
|
|
|
|
|
|
|
} |