|
|
@ -1577,7 +1577,7 @@ export class LookPlanDialog { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ngOnInit() { |
|
|
|
ngOnInit() { |
|
|
|
// console.log(this.data)
|
|
|
|
console.log(this.data) |
|
|
|
this.getAllPlans() |
|
|
|
this.getAllPlans() |
|
|
|
} |
|
|
|
} |
|
|
|
//关闭弹窗
|
|
|
|
//关闭弹窗
|
|
|
@ -1603,7 +1603,7 @@ export class LookPlanDialog { |
|
|
|
} |
|
|
|
} |
|
|
|
//查看预案
|
|
|
|
//查看预案
|
|
|
|
lookPlan(e) { |
|
|
|
lookPlan(e) { |
|
|
|
if (e.planMode == 0) { |
|
|
|
/* if (e.planMode == 0) { |
|
|
|
const config = new MatSnackBarConfig(); |
|
|
|
const config = new MatSnackBarConfig(); |
|
|
|
config.verticalPosition = 'top'; |
|
|
|
config.verticalPosition = 'top'; |
|
|
|
config.duration = 3000 |
|
|
|
config.duration = 3000 |
|
|
@ -1636,7 +1636,56 @@ export class LookPlanDialog { |
|
|
|
window.open(`/planManagement/webLook`) |
|
|
|
window.open(`/planManagement/webLook`) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} */ |
|
|
|
|
|
|
|
let companyId = sessionStorage.getItem("companyId") |
|
|
|
|
|
|
|
if (e.planType == 16 || e.planType == 4 || e.planType == 8) { |
|
|
|
|
|
|
|
if (e.planType == 16&&e.attachmentUrls == null){ |
|
|
|
|
|
|
|
window.open(`/planManagement/createplanonlinefive?navIsOpen=false&companyId=${companyId}&planName=${e.name}&unitName=${this.data.name}&planCategory=${e.planCategory}&planId=${e.id}&unitTypeId=${this.data.buildingTypes[0].id}&orName=${this.data.organizationName}&pattern=false`) |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
var index = e.attachmentUrls[0].indexOf("\/") |
|
|
|
|
|
|
|
let fetchUrl = e.attachmentUrls[0] |
|
|
|
|
|
|
|
//console.log(fetchUrl)
|
|
|
|
|
|
|
|
if (fetchUrl) { |
|
|
|
|
|
|
|
let suffix = fetchUrl.split('.')[fetchUrl.split('.').length - 1].toLowerCase() |
|
|
|
|
|
|
|
if (suffix == 'docx' || suffix == 'doc') { |
|
|
|
|
|
|
|
let arr = fetchUrl.split('.') |
|
|
|
|
|
|
|
arr[arr.length - 1] = 'pdf' |
|
|
|
|
|
|
|
window.open(`/api/Objects/PlanPlatform/` + arr.join('.')) |
|
|
|
|
|
|
|
} else if (suffix == 'pdf') { |
|
|
|
|
|
|
|
window.open(`/api/Objects/PlanPlatform/` + fetchUrl) |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
let config = new MatSnackBarConfig(); |
|
|
|
|
|
|
|
config.verticalPosition = 'top'; |
|
|
|
|
|
|
|
config.duration = 3000 |
|
|
|
|
|
|
|
this.snackBar.open('该文件类型暂不支持在线查看', '确定', config); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (e.planType == 1) { //如果是在线编辑
|
|
|
|
|
|
|
|
let id = e.id |
|
|
|
|
|
|
|
sessionStorage.setItem("planId", id) |
|
|
|
|
|
|
|
//sessionStorage.setItem("companyId", companyId)
|
|
|
|
|
|
|
|
sessionStorage.setItem("buildingTypeId", this.data.buildingTypes[0].id) |
|
|
|
|
|
|
|
sessionStorage.setItem("editable", "0") |
|
|
|
|
|
|
|
sessionStorage.setItem("planName", e.name) |
|
|
|
|
|
|
|
let companyId = sessionStorage.getItem("companyId") |
|
|
|
|
|
|
|
window.open(`/keyUnit/viewunitinfoplan?id=${companyId}`) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (e.planType == 2) { //如果是跳转网页
|
|
|
|
|
|
|
|
if (e.url.indexOf('app') == 0) { |
|
|
|
|
|
|
|
window.location.href = e.url |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
sessionStorage.setItem("url", e.url) |
|
|
|
|
|
|
|
if ((e.url as string).includes('gis/threeDimensionalHome')) { //三维预案
|
|
|
|
|
|
|
|
window.open(`${e.url}?unitId=${this.data.id}&unitName=${this.data.name}&editMode=false`) |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
window.open(`/planManagement/webLook`) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//点击下载
|
|
|
|
//点击下载
|
|
|
|