|
|
|
@ -73,6 +73,8 @@ export class editPlaneFigureComponent implements OnInit {
|
|
|
|
|
this.details = this.data.buildingData.details || '' |
|
|
|
|
this.imgWidth = this.data.buildingData.imageWidth || 0 |
|
|
|
|
this.imgHeight = this.data.buildingData.imageHeight || 0 |
|
|
|
|
this.oldWidth = JSON.parse(JSON.stringify(this.data.buildingData.imageWidth || 0)) |
|
|
|
|
this.oldHeight = JSON.parse(JSON.stringify(this.data.buildingData.imageHeight || 0)) |
|
|
|
|
if (this.imgWidth==0 && this.imgHeight==0 && this.data.buildingData.imageUrl) { |
|
|
|
|
let that = this |
|
|
|
|
let img = new Image() |
|
|
|
@ -93,6 +95,9 @@ export class editPlaneFigureComponent implements OnInit {
|
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
oldWidth:number; //原图片宽
|
|
|
|
|
oldHeight:number; //原图片高
|
|
|
|
|
|
|
|
|
|
name:any; //name
|
|
|
|
|
checked:boolean = false;//是否为避难层
|
|
|
|
|
area:number; //面积
|
|
|
|
@ -126,6 +131,17 @@ export class editPlaneFigureComponent implements OnInit {
|
|
|
|
|
e.checked? this.imgScale = Number((this.imgWidth/this.imgHeight)) : null |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//关闭
|
|
|
|
|
close () { |
|
|
|
|
if (this.oldWidth === this.imgWidth && this.oldHeight === this.imgHeight) { |
|
|
|
|
this.dialogRef.close() |
|
|
|
|
} else { |
|
|
|
|
this.canvasData.selectStorey.imageWidth = this.oldWidth |
|
|
|
|
this.canvasData.selectStorey.imageHeight = this.oldHeight |
|
|
|
|
this.dialogRef.close('更新背景图'); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//提交表单修改平面图
|
|
|
|
|
onSubmit (e) { |
|
|
|
|
if (!this.data.isBuilding) { //总平面图 修改平面图
|
|
|
|
|