|
|
|
@ -197,7 +197,7 @@ export class CollectionToolsReadComponent implements OnInit {
|
|
|
|
|
this.getAllFirePlan() //获取当前单位灾情
|
|
|
|
|
|
|
|
|
|
await this.getPaperPlanData()//获得当前考题题目
|
|
|
|
|
this.getExaminationQuestions() |
|
|
|
|
|
|
|
|
|
let that = this |
|
|
|
|
window.setTimeout(()=>{ |
|
|
|
|
document.getElementById("functionalDomainContent").oncontextmenu = function (event) { |
|
|
|
@ -398,7 +398,7 @@ export class CollectionToolsReadComponent implements OnInit {
|
|
|
|
|
//点击树节点的显示隐藏icon
|
|
|
|
|
clickLookItem(node){ |
|
|
|
|
|
|
|
|
|
console.log(this.allFireElements) |
|
|
|
|
// console.log(this.allFireElements)
|
|
|
|
|
//子节点跟随父节点的islook变化
|
|
|
|
|
if(node.origin.children && node.origin.children.length != 0){ |
|
|
|
|
node.origin.isLook = !node.origin.isLook |
|
|
|
@ -416,23 +416,55 @@ export class CollectionToolsReadComponent implements OnInit {
|
|
|
|
|
|
|
|
|
|
//canvas上的素材显隐
|
|
|
|
|
let iconVisibleArr:any = [] |
|
|
|
|
if(node.origin.children && node.origin.children.length != 0){//如果是模板,则开始向下找
|
|
|
|
|
node.origin.children.forEach(item => { |
|
|
|
|
if(item.children && item.children.length != 0){//如果子节点依旧是模板,则继续开始向下找
|
|
|
|
|
// if(node.origin.children && node.origin.children.length != 0){//如果是模板,则开始向下找
|
|
|
|
|
// node.origin.children.forEach(item => {
|
|
|
|
|
// if(item.children && item.children.length != 0){//如果子节点依旧是模板,则继续开始向下找
|
|
|
|
|
// item.children.forEach(i => {
|
|
|
|
|
// if(i.isLook == false){
|
|
|
|
|
// iconVisibleArr.push(i.Id)
|
|
|
|
|
// }
|
|
|
|
|
// })
|
|
|
|
|
// }else{
|
|
|
|
|
// if(item.isLook == false){
|
|
|
|
|
// iconVisibleArr.push(item.Id)
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
// })
|
|
|
|
|
// }else{
|
|
|
|
|
// if(node.origin.isLook == false){
|
|
|
|
|
// iconVisibleArr.push(node.origin.Id)
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
console.log(this.renderData) |
|
|
|
|
this.renderData.forEach(item =>{ |
|
|
|
|
if(item.Id && item.isLook == false){ |
|
|
|
|
iconVisibleArr.push(item.Id) |
|
|
|
|
}else{ |
|
|
|
|
if(item.children && item.children.length != 0){ |
|
|
|
|
item.children.forEach(i => { |
|
|
|
|
iconVisibleArr.push(i.Id) |
|
|
|
|
if(i.Id && i.isLook == false){ |
|
|
|
|
iconVisibleArr.push(i.Id) |
|
|
|
|
}else{ |
|
|
|
|
if(i.children && i.children.length != 0){ |
|
|
|
|
i.children.forEach(element => { |
|
|
|
|
if(element.Id && element.isLook == false){ |
|
|
|
|
iconVisibleArr.push(element.Id) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}else{ |
|
|
|
|
iconVisibleArr.push(item.Id) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}else{ |
|
|
|
|
iconVisibleArr.push(node.origin.Id) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
console.log(iconVisibleArr) |
|
|
|
|
console.log(678,this.renderData) |
|
|
|
|
|
|
|
|
|
this.canvasData.originaleveryStoreyData = JSON.parse(JSON.stringify(this.originaleveryStoreyData)) |
|
|
|
|
this.canvasData.originaleveryStoreyData.data? this.canvasData.originaleveryStoreyData.data = JSON.parse(this.canvasData.originaleveryStoreyData.data) : this.canvasData.originaleveryStoreyData.data = {} |
|
|
|
|
this.canvasData.originaleveryStoreyData.version? null : this.canvasData.originaleveryStoreyData.version = "2.0" |
|
|
|
|
this.canvasData.hiddenBasicInfoFacilities = iconVisibleArr |
|
|
|
|
this.canvas.loadExamineeData() |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -449,7 +481,7 @@ export class CollectionToolsReadComponent implements OnInit {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
answerDivDrag:boolean = false//查看答案窗口的显隐
|
|
|
|
|
answertreeData:any |
|
|
|
|
answertreeData:any = [] |
|
|
|
|
lookAnswerDiv(){ |
|
|
|
|
this.answerDivDrag = !this.answerDivDrag |
|
|
|
|
|
|
|
|
@ -525,7 +557,7 @@ export class CollectionToolsReadComponent implements OnInit {
|
|
|
|
|
arr.push(item.Id) |
|
|
|
|
}) |
|
|
|
|
this.canvasData.hiddenBasicInfoFacilities = arr |
|
|
|
|
this.canvas.loadExamineeData() |
|
|
|
|
// this.canvas.loadExamineeData()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
@ -539,6 +571,7 @@ export class CollectionToolsReadComponent implements OnInit {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
renderData:any = []//当前层默认隐藏的基本信息考试题目
|
|
|
|
|
hiddenBasicInfoFacilities:any |
|
|
|
|
//封装 刷新 tree 数据
|
|
|
|
|
async renovateTreeData (isRefresh:boolean = true) { |
|
|
|
|
this.allFireElements[this.allFireElements.length-1].children = [] |
|
|
|
@ -551,7 +584,9 @@ export class CollectionToolsReadComponent implements OnInit {
|
|
|
|
|
let beforeOneId = this.selectingSitePlan.id || '' //当前 选中 平面图 楼层/区域 id
|
|
|
|
|
let companyBuildingData = JSON.parse(JSON.stringify( this.canvasData.originalcompanyBuildingData || {} )) // 当前 单位/建筑 数据
|
|
|
|
|
let storeyData = JSON.parse(JSON.stringify( this.canvasData.originaleveryStoreyData || {} )) //当前 楼层 数据
|
|
|
|
|
console.log('this.Facilities',this.Facilities) |
|
|
|
|
|
|
|
|
|
//如果有需要标注的平面图
|
|
|
|
|
if(this.Facilities){ |
|
|
|
|
this.Facilities.some((item,key)=>{ |
|
|
|
|
if(item.key == this.selectingSitePlan.id){ |
|
|
|
@ -559,40 +594,32 @@ export class CollectionToolsReadComponent implements OnInit {
|
|
|
|
|
item.children.forEach(i => { |
|
|
|
|
arr.push(i.Id) |
|
|
|
|
}) |
|
|
|
|
this.canvasData.hiddenBasicInfoFacilities = arr |
|
|
|
|
console.log('这层有',item) |
|
|
|
|
this.hiddenBasicInfoFacilities = arr |
|
|
|
|
this.canvasData.hiddenBasicInfoFacilities = JSON.parse(JSON.stringify(arr))
|
|
|
|
|
console.log('这层有需要标注的基本信息素材',item) |
|
|
|
|
let allFireElements = JSON.parse(JSON.stringify(this.allFireElements)) |
|
|
|
|
this.renderData = [] |
|
|
|
|
setTimeout(() => { |
|
|
|
|
this.renderData = [...this.processingData(allFireElements,item.children)] |
|
|
|
|
}, 0); |
|
|
|
|
|
|
|
|
|
this.canvas.loadExamineeData() |
|
|
|
|
// this.canvas.createBackground(this.canvasData.selectStorey.imageUrl, this.canvasData.selectStorey.imageAngle);
|
|
|
|
|
// this.canvas.createFloorShape(this.canvasData.examOriginaleveryStoreyData.data);
|
|
|
|
|
// this.canvas.processinghiddenData();
|
|
|
|
|
// this.canvas.createNodeShape(this.canvasData.selectPanelPoint.Data);
|
|
|
|
|
// this.canvas.setNameVisible(false, 0);
|
|
|
|
|
// this.canvas.setNameVisible(false, 1);
|
|
|
|
|
if(this.clickedNodeType == 0){ |
|
|
|
|
this.canvas.loadExaminerData() |
|
|
|
|
this.clickedNodeType = null |
|
|
|
|
}else{ |
|
|
|
|
this.canvas.loadExamineeData() |
|
|
|
|
this.clickedNodeType = null |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return true
|
|
|
|
|
} else{ |
|
|
|
|
console.log('这层没有tree') |
|
|
|
|
this.renderData = [] |
|
|
|
|
this.canvas.loadExamineeData(false) |
|
|
|
|
return false
|
|
|
|
|
if(key == this.Facilities.length - 1){ |
|
|
|
|
this.renderData = [] |
|
|
|
|
this.canvas.loadExaminerData() |
|
|
|
|
return false
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
console.log("llllllll") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// if(this.clickedNodeType == 0){
|
|
|
|
|
// this.canvas.loadExamineeData(false)
|
|
|
|
|
// }else{
|
|
|
|
|
// this.canvas.loadExamineeData()
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}else{ |
|
|
|
|
this.canvas.loadExamineeData() |
|
|
|
@ -605,7 +632,6 @@ export class CollectionToolsReadComponent implements OnInit {
|
|
|
|
|
this.allFireElements[this.allFireElements.length-1].children.push(storeyData.data[key]) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
this.handleTreeData(storeyData) //处理tree数据结构
|
|
|
|
|
} |
|
|
|
|
//处理数据 将消防要素模板与真实素材结合
|
|
|
|
@ -795,11 +821,13 @@ export class CollectionToolsReadComponent implements OnInit {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//获取 平面图 楼层数据
|
|
|
|
|
originaleveryStoreyData:any |
|
|
|
|
getSitePlanStorey (e) { |
|
|
|
|
let params = {sitePlanId: e.id} |
|
|
|
|
this.http.get(`/api/SitePlanData`,{params}).subscribe((data:any)=>{ |
|
|
|
|
console.log('预案平台楼层原始素材',data) |
|
|
|
|
this.canvasData.originaleveryStoreyData = data || {} // 楼层原数据
|
|
|
|
|
this.originaleveryStoreyData = data |
|
|
|
|
this.canvasData.originaleveryStoreyData = JSON.parse(JSON.stringify(data)) || {} // 楼层原数据
|
|
|
|
|
this.canvasData.originaleveryStoreyData.data? this.canvasData.originaleveryStoreyData.data = JSON.parse(this.canvasData.originaleveryStoreyData.data) : this.canvasData.originaleveryStoreyData.data = {} |
|
|
|
|
this.canvasData.originaleveryStoreyData.version? null : this.canvasData.originaleveryStoreyData.version = "2.0" |
|
|
|
|
this.canvasData.originaleveryStoreyData.sitePlanId? null : this.canvasData.originaleveryStoreyData.sitePlanId = e.id || null |
|
|
|
@ -826,8 +854,8 @@ export class CollectionToolsReadComponent implements OnInit {
|
|
|
|
|
getBuildingStorey (e) { |
|
|
|
|
let params = {buildingAreaId: e.id} |
|
|
|
|
this.http.get(`/api/BuildingAreaData`,{params}).subscribe((data:any)=>{ |
|
|
|
|
|
|
|
|
|
this.canvasData.originaleveryStoreyData = data || {} // 楼层原数据
|
|
|
|
|
this.originaleveryStoreyData = data |
|
|
|
|
this.canvasData.originaleveryStoreyData = JSON.parse(JSON.stringify(data)) || {} // 楼层原数据
|
|
|
|
|
this.canvasData.originaleveryStoreyData.data? this.canvasData.originaleveryStoreyData.data = JSON.parse(this.canvasData.originaleveryStoreyData.data) : this.canvasData.originaleveryStoreyData.data = {} |
|
|
|
|
this.canvasData.originaleveryStoreyData.version? null : this.canvasData.originaleveryStoreyData.version = "2.0" |
|
|
|
|
this.canvasData.originaleveryStoreyData.buildingAreaId? null : this.canvasData.originaleveryStoreyData.buildingAreaId = e.id || null |
|
|
|
@ -947,6 +975,7 @@ export class CollectionToolsReadComponent implements OnInit {
|
|
|
|
|
params = {examDisasterId: this.allFirePlan[0].id || '',disposalNodeType:1,examinationId:this.route.snapshot.queryParams.examId} |
|
|
|
|
this.http.get(api,{params:params}).subscribe(data=>{ //处置节点
|
|
|
|
|
this.canvasData.allDisposalNode = data |
|
|
|
|
this.getExaminationQuestions() |
|
|
|
|
this.handleHybridTree(this.canvasData.allDisposalNode,'答案') |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
@ -1097,8 +1126,7 @@ export class CollectionToolsReadComponent implements OnInit {
|
|
|
|
|
this.canvasData.selectPanelPoint = this.canvasData.deserialize(JSON.stringify(data || new DisposalNodeData())) //选择 当前 节点
|
|
|
|
|
|
|
|
|
|
this.canvasData.selectPanelPoint.Data = this.canvasData.deserialize(this.canvasData.selectPanelPoint.Data) |
|
|
|
|
console.log(456,this.canvasData.selectPanelPoint.Data) |
|
|
|
|
// this.canvasData.selectPanelPoint.Data.DefinedIncrement == null ? this.canvasData.selectPanelPoint.Data.DefinedIncrement = {} : null
|
|
|
|
|
// console.log(456,this.canvasData.selectPanelPoint.Data)
|
|
|
|
|
this.seekPanelPoint(parameter) |
|
|
|
|
}) |
|
|
|
|
} //if
|
|
|
|
|