Browse Source

[修改] 重新编辑数据

develop
徐振升 4 years ago
parent
commit
b60dd41edb
  1. 7595
      src/app/ui/plan-assistance/plan-assistance.component.ts
  2. 31
      src/app/working-area/working-area.component.ts

7595
src/app/ui/plan-assistance/plan-assistance.component.ts

File diff suppressed because it is too large Load Diff

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

@ -120,6 +120,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
// 是否登录 // 是否登录
public verificationURL = '/ui/plan'; // 验证url地址是否为验证页面 public verificationURL = '/ui/plan'; // 验证url地址是否为验证页面
count = 0;
isLogin() { isLogin() {
const token = sessionStorage.getItem('token'); // 判断 是否登录状态 const token = sessionStorage.getItem('token'); // 判断 是否登录状态
if (token) { if (token) {
@ -387,6 +388,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
const floorData = this.canvasData.originaleveryStoreyData.data; const floorData = this.canvasData.originaleveryStoreyData.data;
const buildingData = this.canvasData.originalcompanyBuildingData.data; const buildingData = this.canvasData.originalcompanyBuildingData.data;
const floor = this.canvasData.selectStorey; const floor = this.canvasData.selectStorey;
console.log(JSON.stringify(buildingData));
// // key=>属性名 data[key]=>属性值 // // key=>属性名 data[key]=>属性值
Object.keys(floorData).forEach((key) => { Object.keys(floorData).forEach((key) => {
switch (floorData[key].InteractiveMode) { switch (floorData[key].InteractiveMode) {
@ -472,9 +474,6 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
IsFromBuilding: false, IsFromBuilding: false,
GameMode: 2 GameMode: 2
}; };
const tempCar = new Car(tempData, this);
tempCar.setParent(this.app.stage);
tempCar.position.set(25, 25);
const tempData2 = { const tempData2 = {
TemplateId: null, TemplateId: null,
@ -519,15 +518,27 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
IsFromBuilding: false, IsFromBuilding: false,
GameMode: 2 GameMode: 2
}; };
const tempCar2 = new Car(tempData2, this); this.ShowCarIcon(tempData);
tempCar2.setParent(this.app.stage); this.ShowCarIcon(tempData2);
tempCar2.position.set(25, 50); this.ShowCarIcon(tempData);
this.ShowCarIcon(tempData2);
// 开始绘制管线 this.ShowCarIcon(tempData);
this.beginPaintPipeline(); this.ShowCarIcon(tempData2);
// // 开始绘制管线
// this.beginPaintPipeline();
// this.beginPaintingArrows(); // this.beginPaintingArrows();
} }
/**
*
* @param data
*/
public ShowCarIcon(data: any) {
this.count++;
const tempCar2 = new Car(data, this);
tempCar2.setParent(this.app.stage);
tempCar2.position.set(25, this.count * 25);
}
/** /**
* *
* @param id ID * @param id ID

Loading…
Cancel
Save