From e245d40c49134076c0511969ee0603dba1e84ff6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=8C=AF=E5=8D=87?= <359059686@qq.com> Date: Fri, 25 Dec 2020 17:06:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../working-area/working-area.component.ts | 26 ++++++++++++++----- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/src/app/working-area/working-area.component.ts b/src/app/working-area/working-area.component.ts index 34ce73b..7aff1b1 100644 --- a/src/app/working-area/working-area.component.ts +++ b/src/app/working-area/working-area.component.ts @@ -488,7 +488,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV // * 刷新工作区 // */ public async refresh() { - this.loadExamineeData(); + //this.loadExamineeData(); // this.setPaintMode(PaintMode.endPaint); // this.resetCanvas(); // this.destroyBackgroundImage(); @@ -506,11 +506,24 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV /** * 加载考生数据 */ - public loadExamineeData() { - this.createBackground(this.canvasData.selectStorey.imageUrl,this.canvasData.selectStorey.imageAngle);// 创建背景图 - this.createFloorShape(this.canvasData.originaleveryStoreyData.data);// 基本信息 - this.createFloorShape(this.canvasData.examOriginaleveryStoreyData.data);// 考生信息 - this.createNodeShape(this.canvasData.selectPanelPoint.Data);// 处置节点 + public loadExamineeData(b: boolean = true) { + this.createBackground(this.canvasData.selectStorey.imageUrl, this.canvasData.selectStorey.imageAngle); + if (b) { + this.createFloorShape(this.canvasData.examOriginaleveryStoreyData.data); + this.processinghiddenData(); + } + this.createFloorShape(this.canvasData.originaleveryStoreyData.data); + this.createNodeShape(this.canvasData.selectPanelPoint.Data); + } + /** + * 处理隐藏数据 + */ + public processinghiddenData() { + for (let key in this.canvasData.originaleveryStoreyData.data){ + if (this.canvasData.hiddenBasicInfoFacilities.indexOf(key)) { + delete this.canvasData.originaleveryStoreyData.data[key]; + } + } } /** * 创建背景图 @@ -579,6 +592,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV } this.emit('backgroundScale', this.backgroundImage.scale.x); } + /** * * @param id 图标ID