|
|
|
@ -185,13 +185,16 @@ export class PlanRecordComponent implements OnInit {
|
|
|
|
|
this.http.get(`/api/PlanComponents/${item.itemId}`).subscribe((data: any) => { |
|
|
|
|
this.companyId = data.companyId |
|
|
|
|
this.companyName = data.companyName |
|
|
|
|
if (data.planMode == 2) { |
|
|
|
|
this.bianzhi = true |
|
|
|
|
this.src = `/planManagement/createplanonlinefive?navIsOpen=false&companyId=${data.companyId}&planName=${data.name}&unitName=${data.companyName}&planCategory=${data.planCategory}&planId=${data.id}&unitTypeId=${data.company.buildingTypes[0].id}&orName=${data.company.organizationName}&orId=${data.company.organizationId}&pattern=false` |
|
|
|
|
//this.src=`/keyUnit/viewunitinfoplan?id=${data.companyId}&orName=${data.company.organizationId}&orId=${data.company.organizationName}`
|
|
|
|
|
} else { |
|
|
|
|
this.bianzhi = false |
|
|
|
|
//this.bianzhi = false
|
|
|
|
|
if (data.planType != 2 && data.planType != 1) { |
|
|
|
|
if (data.planMode == 2) { |
|
|
|
|
this.showtype = 0 |
|
|
|
|
this.bianzhi = true |
|
|
|
|
this.src = `/CreatePlanOnlineFive?navIsOpen=false&companyId=${data.companyId}&planName=${data.name}&unitName=${data.companyName}&planCategory=${data.planCategory}&planId=${data.id}&unitTypeId=${data.company.buildingTypes[0].id}&orName=${data.company.organizationName}&orId=${data.company.organizationId}&pattern=false` |
|
|
|
|
this.iframeSrc = this.sanitizer.bypassSecurityTrustResourceUrl(this.src); |
|
|
|
|
//this.src=`/keyUnit/viewunitinfoplan?id=${data.companyId}&orName=${data.company.organizationId}&orId=${data.company.organizationName}`
|
|
|
|
|
} else{ |
|
|
|
|
this.bianzhi = false |
|
|
|
|
this.fetchUrl = data.attachmentUrls[0] |
|
|
|
|
var index = this.fetchUrl.indexOf("\/") |
|
|
|
|
if (this.fetchUrl.substr(0, index) == 'psw') { |
|
|
|
@ -211,6 +214,8 @@ export class PlanRecordComponent implements OnInit {
|
|
|
|
|
} else { |
|
|
|
|
this.lookWord() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
this.organizationName = item.organizationName |
|
|
|
|
this.planData = data |
|
|
|
@ -221,7 +226,7 @@ export class PlanRecordComponent implements OnInit {
|
|
|
|
|
//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`)
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -248,16 +253,15 @@ export class PlanRecordComponent implements OnInit {
|
|
|
|
|
//毕升
|
|
|
|
|
lookWord() { |
|
|
|
|
this.showtype = 0 |
|
|
|
|
let src |
|
|
|
|
let suffix = this.fetchUrl.split('.')[this.fetchUrl.split('.').length - 1].toLowerCase() |
|
|
|
|
if (suffix == 'docx' || suffix == 'doc') { |
|
|
|
|
let arr = this.fetchUrl.split('.') |
|
|
|
|
arr[arr.length - 1] = 'pdf' |
|
|
|
|
src = `/api/Objects/PlanPlatform/` + arr.join('.') |
|
|
|
|
this.src = `/api/Objects/PlanPlatform/` + arr.join('.') |
|
|
|
|
} else if (suffix == 'pdf') { |
|
|
|
|
src = `/api/Objects/PlanPlatform/` + this.fetchUrl |
|
|
|
|
this.src = `/api/Objects/PlanPlatform/` + this.fetchUrl |
|
|
|
|
} |
|
|
|
|
this.iframeSrc = this.sanitizer.bypassSecurityTrustResourceUrl(src); |
|
|
|
|
this.iframeSrc = this.sanitizer.bypassSecurityTrustResourceUrl(this.src); |
|
|
|
|
} |
|
|
|
|
//查看按钮跳转
|
|
|
|
|
lookNew() { |
|
|
|
@ -272,7 +276,6 @@ export class PlanRecordComponent implements OnInit {
|
|
|
|
|
this.compantData = { name: '', buildingTypes: [], address: '' } |
|
|
|
|
this.planType = this.planData.planMode |
|
|
|
|
let data = this.planData |
|
|
|
|
// console.log(data)
|
|
|
|
|
if (data.planType == 1) { |
|
|
|
|
this.twoOrthree = 2 |
|
|
|
|
} else if (data.planType == 2) { |
|
|
|
|