|
|
|
@ -507,34 +507,21 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
|
|
|
|
|
* 加载考生数据 |
|
|
|
|
*/ |
|
|
|
|
public loadExamineeData() { |
|
|
|
|
this.createBackground();// 创建背景图
|
|
|
|
|
this.refreshBackgroundImage();// 刷新背景图
|
|
|
|
|
this.processinghiddenData();// 处理数据
|
|
|
|
|
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 processinghiddenData() { |
|
|
|
|
for (let key1 in this.canvasData.originaleveryStoreyData.data){ |
|
|
|
|
for (let key2 in this.canvasData.hiddenBasicInfoFacilities){ |
|
|
|
|
if (this.canvasData.originaleveryStoreyData.data[key1].Id==this.canvasData.hiddenBasicInfoFacilities[key2].Id) { |
|
|
|
|
delete this.canvasData.originaleveryStoreyData.data[key1]; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
/** |
|
|
|
|
* 异步创建背景图 |
|
|
|
|
* 创建背景图 |
|
|
|
|
*/ |
|
|
|
|
public createBackground() { |
|
|
|
|
public createBackground(imageUrl:string,imageAngle:number) { |
|
|
|
|
if (this.backgroundImage !== null) { |
|
|
|
|
this.backgroundImage.destroy(); |
|
|
|
|
this.backgroundImage = null; |
|
|
|
|
}
|
|
|
|
|
this.createBackgroundImage() |
|
|
|
|
this.refreshBackgroundImage(imageUrl,imageAngle); |
|
|
|
|
} |
|
|
|
|
/** |
|
|
|
|
* 创建楼层图形 |
|
|
|
@ -966,11 +953,11 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
|
|
|
|
|
/** |
|
|
|
|
* 刷新背景图 |
|
|
|
|
*/ |
|
|
|
|
public async refreshBackgroundImage(): Promise<void> { |
|
|
|
|
if (!this.canvasData.selectStorey.imageUrl) { |
|
|
|
|
public async refreshBackgroundImage(imageUrl:string,imageAngle:number): Promise<void> { |
|
|
|
|
if (!imageUrl) { |
|
|
|
|
this.backgroundImage.visible = false; |
|
|
|
|
} else { |
|
|
|
|
this.backgroundImage.texture = await PIXI.Texture.fromURL(this.canvasData.selectStorey.imageUrl); |
|
|
|
|
this.backgroundImage.texture = await PIXI.Texture.fromURL(imageUrl); |
|
|
|
|
const imageWidth = this.backgroundImage.texture.width; |
|
|
|
|
const imageHeight = this.backgroundImage.texture.height; |
|
|
|
|
const appWidth = this.app.view.width - 470; |
|
|
|
@ -981,7 +968,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
|
|
|
|
|
|
|
|
|
|
const scale = wScale < hScale? wScale: hScale; |
|
|
|
|
this.backgroundImage.scale.set(scale); |
|
|
|
|
this.backgroundImage.angle = this.canvasData.selectStorey.imageAngle; |
|
|
|
|
this.backgroundImage.angle = imageAngle; |
|
|
|
|
this.backgroundImage.visible = true; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|