|
|
|
@ -108,7 +108,10 @@ export class EntryPlanLookComponent implements OnInit {
|
|
|
|
|
lookPlan(e) { |
|
|
|
|
console.log(e) |
|
|
|
|
if (e.planType == 16 || e.planType == 4 || e.planType == 8) { |
|
|
|
|
var index = e.attachmentUrls[0].indexOf("\/") |
|
|
|
|
if (e.planType == 16&&e.attachmentUrls == null){ |
|
|
|
|
window.open(`/planManagement/createplanonlinefive?navIsOpen=false&companyId=${this.companyId}&planName=${e.name}&unitName=${this.unitdata.unitname}&planCategory=${e.planCategory}&planId=${e.id}&unitTypeId=${this.compantData.buildingTypes[0].id}&orName=${this.compantData.organizationName}&orId=${this.compantData.organizationId}&pattern=false`) |
|
|
|
|
}else{ |
|
|
|
|
var index = e.attachmentUrls[0].indexOf("\/") |
|
|
|
|
if (e.attachmentUrls[0].substr(0, index) == 'psw') { |
|
|
|
|
const dialogRef = this.dialog.open(PsViewer, { |
|
|
|
|
width: '1500px', |
|
|
|
@ -123,6 +126,7 @@ export class EntryPlanLookComponent implements OnInit {
|
|
|
|
|
dialogRef.afterClosed().subscribe(); |
|
|
|
|
} else { |
|
|
|
|
let fetchUrl = e.attachmentUrls[0] |
|
|
|
|
//console.log(fetchUrl)
|
|
|
|
|
if (fetchUrl) { |
|
|
|
|
let suffix = fetchUrl.split('.')[fetchUrl.split('.').length - 1].toLowerCase() |
|
|
|
|
if (suffix == 'docx' || suffix == 'doc') { |
|
|
|
@ -137,10 +141,10 @@ export class EntryPlanLookComponent implements OnInit {
|
|
|
|
|
config.duration = 3000 |
|
|
|
|
this.snackBar.open('该文件类型暂不支持在线查看', '确定', config); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
window.open(`/planManagement/createplanonlinefive?navIsOpen=false&companyId=${this.companyId}&planName=${e.name}&unitName=${this.unitdata.unitname}&planCategory=${e.planCategory}&planId=${e.id}&unitTypeId=${this.compantData.buildingTypes[0].id}&orName=${this.compantData.organizationName}&orId=${this.compantData.organizationId}`) |
|
|
|
|
} |
|
|
|
|
}
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
if (e.planType == 1) { //如果是在线编辑
|
|
|
|
|
let id = e.id |
|
|
|
@ -179,7 +183,7 @@ export class EntryPlanLookComponent implements OnInit {
|
|
|
|
|
} |
|
|
|
|
else if (e.planType == 16) { |
|
|
|
|
if (e.attachmentUrls == null) { |
|
|
|
|
window.open(`/planManagement/createplanonlinefive?navIsOpen=false&companyId=${this.companyId}&planName=${e.name}&unitName=${this.unitdata.unitname}&planCategory=${e.planCategory}&planId=${e.id}&unitTypeId=${this.compantData.buildingTypes[0].id}&orName=${this.compantData.organizationName}&orId=${this.compantData.organizationId}`) |
|
|
|
|
window.open(`/planManagement/createplanonlinefive?navIsOpen=false&companyId=${this.companyId}&planName=${e.name}&unitName=${this.unitdata.unitname}&planCategory=${e.planCategory}&planId=${e.id}&unitTypeId=${this.compantData.buildingTypes[0].id}&orName=${this.compantData.organizationName}&orId=${this.compantData.organizationId}&pattern=true`) |
|
|
|
|
} |
|
|
|
|
else { |
|
|
|
|
let body = {}; |
|
|
|
|