|
|
|
@ -239,7 +239,8 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
|
|
|
|
|
pilinData = []; |
|
|
|
|
async getpili() { |
|
|
|
|
let index = this.getArrayIndex(this.planTemplateData, "单位概况"); |
|
|
|
|
let result = await new Promise((resolve) => { |
|
|
|
|
console.log("index", index); |
|
|
|
|
await new Promise((resolve) => { |
|
|
|
|
this.planTemplateData[index].building.forEach((element) => { |
|
|
|
|
let id = { buildingId: element.buildingId }; |
|
|
|
|
this.http |
|
|
|
@ -250,25 +251,32 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
|
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
//this.pilinData.push(result)
|
|
|
|
|
this.pilinData = JSON.parse(JSON.stringify(this.pilinData)); |
|
|
|
|
console.log(this.pilinData); |
|
|
|
|
this.pilinData.forEach((pvalue, pindex, parr) => { |
|
|
|
|
parr[pindex].forEach((nval, nindex, narr) => { |
|
|
|
|
this.planTemplateData[index].building.forEach((value, i, arr) => { |
|
|
|
|
if (narr[nindex].buildingId == arr[i].buildingId) { |
|
|
|
|
this.pilinData.forEach((pvalue) => { |
|
|
|
|
pvalue.forEach((nval) => { |
|
|
|
|
this.planTemplateData[index].building.forEach((value, i) => { |
|
|
|
|
if (nval.buildingId == value.buildingId) { |
|
|
|
|
let plIndex = this.planTemplateData[index].building[ |
|
|
|
|
i |
|
|
|
|
].body.findIndex((v) => v.surveyName === "四周毗邻"); |
|
|
|
|
if (plIndex !== -1) { |
|
|
|
|
if (nval.direction == 0) { |
|
|
|
|
this.planTemplateData[index].building[i].body[2].attinf[0].value = |
|
|
|
|
nval.name; |
|
|
|
|
this.planTemplateData[index].building[i].body[ |
|
|
|
|
plIndex |
|
|
|
|
].attinf[0].value = nval.name; |
|
|
|
|
} else if (nval.direction == 1) { |
|
|
|
|
this.planTemplateData[index].building[i].body[2].attinf[1].value = |
|
|
|
|
nval.name; |
|
|
|
|
this.planTemplateData[index].building[i].body[ |
|
|
|
|
plIndex |
|
|
|
|
].attinf[1].value = nval.name; |
|
|
|
|
} else if (nval.direction == 2) { |
|
|
|
|
this.planTemplateData[index].building[i].body[2].attinf[2].value = |
|
|
|
|
nval.name; |
|
|
|
|
this.planTemplateData[index].building[i].body[ |
|
|
|
|
plIndex |
|
|
|
|
].attinf[2].value = nval.name; |
|
|
|
|
} else if (nval.direction == 3) { |
|
|
|
|
this.planTemplateData[index].building[i].body[2].attinf[3].value = |
|
|
|
|
nval.name; |
|
|
|
|
this.planTemplateData[index].building[i].body[ |
|
|
|
|
plIndex |
|
|
|
|
].attinf[3].value = nval.name; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
@ -317,7 +325,6 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
|
|
|
|
|
selectedItem: string = "封面"; |
|
|
|
|
selectedContent: any; |
|
|
|
|
async clickTitleItem(item) { |
|
|
|
|
//this.planTemplateData[key].new=true
|
|
|
|
|
|
|
|
|
|
this.selectedContent = item; |
|
|
|
|
this.addNumber = -1; |
|
|
|
@ -397,6 +404,8 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
|
|
|
|
|
this.js = ""; |
|
|
|
|
this.zdysearch = ""; |
|
|
|
|
this.selectedItem = item.groupName; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (this.selectedItem == "重点图示") { |
|
|
|
|
this.getAllBuildings(); |
|
|
|
|
this.getSitePlan(); |
|
|
|
@ -406,7 +415,6 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
|
|
|
|
|
await this.getAllBuildingsInfo(); |
|
|
|
|
await this.getpili(); |
|
|
|
|
await this.getbuwei(); |
|
|
|
|
//console.log(this.buildZong)
|
|
|
|
|
let index = this.getArrayIndex(this.planTemplateData, "单位概况"); |
|
|
|
|
this.planTemplateData[index].building.forEach((element) => { |
|
|
|
|
if (element.body[0].completed) { |
|
|
|
@ -840,11 +848,6 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
|
|
|
|
|
} |
|
|
|
|
this.planTemplateData.forEach((element) => { |
|
|
|
|
if (element.attribute != undefined) { |
|
|
|
|
/* element.attribute.forEach((item,index,value) => { |
|
|
|
|
if(value[index].level!=undefined&&value[index].level==1){ |
|
|
|
|
value[index].lieNumber=value[index].tableth.length |
|
|
|
|
} |
|
|
|
|
}); */ |
|
|
|
|
for (let i = 0; i < element.attribute.length; i++) { |
|
|
|
|
if ( |
|
|
|
|
element.attribute[i].level != undefined && |
|
|
|
@ -856,9 +859,9 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
console.log(this.planTemplateData); |
|
|
|
|
|
|
|
|
|
console.log("处理完成后的预案数据", this.planTemplateData); |
|
|
|
|
} |
|
|
|
|
console.log("6666", this.planTemplateData); |
|
|
|
|
resolve(data); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|