|
|
|
@ -80,9 +80,30 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
|
|
|
|
|
this.getRealPicture() |
|
|
|
|
} else if (this.selectedItem == '单位概况') { |
|
|
|
|
//this.getAllBuildings()
|
|
|
|
|
} else if (this.selectedItem == '预案附件') { |
|
|
|
|
this.getTwoDPlanList() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//获取当前单位的二维预案
|
|
|
|
|
TwoDPlanList: any |
|
|
|
|
getTwoDPlanList() { |
|
|
|
|
let paramsData = { |
|
|
|
|
companyId: this.route.snapshot.queryParams.companyId, |
|
|
|
|
pageSize: "999" |
|
|
|
|
} |
|
|
|
|
this.http.get("/api/PlanComponents", { params: paramsData }).subscribe((data: any) => { |
|
|
|
|
this.TwoDPlanList = data.items.filter((item) => { |
|
|
|
|
return item.planType == 1 |
|
|
|
|
}) |
|
|
|
|
console.log(this.TwoDPlanList) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//获取实景图
|
|
|
|
|
allRealPicture |
|
|
|
|
getRealPicture() { |
|
|
|
@ -125,10 +146,11 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
|
|
|
|
|
planTemplateData: any |
|
|
|
|
//获得模板信息
|
|
|
|
|
getTemplateData() { |
|
|
|
|
this.http.get('/api/PlanTemplate').subscribe(data => { |
|
|
|
|
this.planTemplateData = JSON.parse(data[2].data).filter(item => |
|
|
|
|
item.completed == true |
|
|
|
|
) |
|
|
|
|
this.http.get(`/api/PlanComponents/${this.route.snapshot.queryParams.planId}/WebText`).subscribe(data => { |
|
|
|
|
console.log('预案内容',data) |
|
|
|
|
// this.planTemplateData = JSON.parse(data.webdata).filter(item =>
|
|
|
|
|
// item.completed == true
|
|
|
|
|
// )
|
|
|
|
|
console.log(this.planTemplateData) |
|
|
|
|
this.planTemplateData.forEach(element => { |
|
|
|
|
if (element.groupName == '重点图示') { |
|
|
|
@ -141,6 +163,11 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
|
|
|
|
|
element.attribute = [{ name: '', imgArr: [] }] |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (element.groupName == '预案附件') { |
|
|
|
|
if (!element.attribute) { |
|
|
|
|
element.attribute = [{ name: '', imgArr: [] }] |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (element.groupName == '处置要点') { |
|
|
|
|
if (!element.attribute) { |
|
|
|
|
element.attribute = [{ name: '', content: '' }] |
|
|
|
@ -153,6 +180,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
|
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -264,7 +292,16 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
|
|
|
|
|
openPlan(item, index, type?: string) { |
|
|
|
|
sessionStorage.setItem("gisplan", 'look') |
|
|
|
|
sessionStorage.setItem("companyId", this.unitId) |
|
|
|
|
// console.log(item)
|
|
|
|
|
console.log(item) |
|
|
|
|
if(type == '预案'){ |
|
|
|
|
sessionStorage.setItem("planId", item.id) |
|
|
|
|
sessionStorage.setItem("companyId", this.route.snapshot.queryParams.companyId) |
|
|
|
|
sessionStorage.setItem("buildingTypeId",this.route.snapshot.queryParams.unitTypeId) |
|
|
|
|
sessionStorage.setItem("editable", "0") |
|
|
|
|
sessionStorage.setItem("planName", item.name) |
|
|
|
|
sessionStorage.setItem("orName", item.name) |
|
|
|
|
sessionStorage.setItem("orId", item.name) |
|
|
|
|
} |
|
|
|
|
let data = { select: item, key: index, allBuildings: this.allBuildings, type: type } |
|
|
|
|
let width = Math.round(document.body.clientWidth * 0.8) + 'px' |
|
|
|
|
let height = Math.round(document.body.clientHeight * 0.9) + 'px' |
|
|
|
@ -440,7 +477,7 @@ export class OpenPlanToolDialog {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
ngAfterViewInit(): void { |
|
|
|
|
if(this.type != '水源'){ |
|
|
|
|
if (this.type != '水源' && this.type != '预案') { |
|
|
|
|
this.noticePlan() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|