Browse Source

完善

master
徐振升 4 years ago
parent
commit
8e352d3f11
  1. 15
      .vscode/launch.json
  2. 1
      debug.log
  3. 29
      src/app/working-area/working-area.component.ts

15
.vscode/launch.json vendored

@ -0,0 +1,15 @@
{
// 使 IntelliSense
//
// 访: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "pwa-chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "http://localhost:4300",
"webRoot": "${workspaceFolder}"
}
]
}

1
debug.log

@ -1 +1,2 @@
[1225/112746.821:ERROR:directory_reader_win.cc(43)] FindFirstFile: 系统找不到指定的路径。 (0x3) [1225/112746.821:ERROR:directory_reader_win.cc(43)] FindFirstFile: 系统找不到指定的路径。 (0x3)
[1225/152100.333:ERROR:directory_reader_win.cc(43)] FindFirstFile: 系统找不到指定的路径。 (0x3)

29
src/app/working-area/working-area.component.ts

@ -507,34 +507,21 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
* *
*/ */
public loadExamineeData() { public loadExamineeData() {
this.createBackground();// 创建背景图 this.createBackground(this.canvasData.selectStorey.imageUrl,this.canvasData.selectStorey.imageAngle);// 创建背景图
this.refreshBackgroundImage();// 刷新背景图
this.processinghiddenData();// 处理数据
this.createFloorShape(this.canvasData.originaleveryStoreyData.data);// 基本信息 this.createFloorShape(this.canvasData.originaleveryStoreyData.data);// 基本信息
this.createFloorShape(this.canvasData.examOriginaleveryStoreyData.data);// 考生信息 this.createFloorShape(this.canvasData.examOriginaleveryStoreyData.data);// 考生信息
this.createNodeShape(this.canvasData.selectPanelPoint.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) { if (this.backgroundImage !== null) {
this.backgroundImage.destroy(); this.backgroundImage.destroy();
this.backgroundImage = null; this.backgroundImage = null;
} }
this.createBackgroundImage() this.createBackgroundImage()
this.refreshBackgroundImage(imageUrl,imageAngle);
} }
/** /**
* *
@ -966,11 +953,11 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
/** /**
* *
*/ */
public async refreshBackgroundImage(): Promise<void> { public async refreshBackgroundImage(imageUrl:string,imageAngle:number): Promise<void> {
if (!this.canvasData.selectStorey.imageUrl) { if (!imageUrl) {
this.backgroundImage.visible = false; this.backgroundImage.visible = false;
} else { } 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 imageWidth = this.backgroundImage.texture.width;
const imageHeight = this.backgroundImage.texture.height; const imageHeight = this.backgroundImage.texture.height;
const appWidth = this.app.view.width - 470; 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; const scale = wScale < hScale? wScale: hScale;
this.backgroundImage.scale.set(scale); this.backgroundImage.scale.set(scale);
this.backgroundImage.angle = this.canvasData.selectStorey.imageAngle; this.backgroundImage.angle = imageAngle;
this.backgroundImage.visible = true; this.backgroundImage.visible = true;
} }
} }

Loading…
Cancel
Save