|
@@ -873,9 +873,9 @@
|
|
|
// }
|
|
|
curSpaceChange(data){
|
|
|
console.warn("***空间面积变化***",this.overChange,data);
|
|
|
- let changArea = data.isZoomIn ? parseFloat(data.area.toFixed(2)) : -parseFloat(data.area.toFixed(2));
|
|
|
- this.changeArea = changArea;//当次变化的面积,有正负值
|
|
|
- this.sumArea = parseFloat((this.sumArea + changArea).toFixed(2));
|
|
|
+ // let changArea = data.isZoomIn ? parseFloat(data.area.toFixed(2)) : -parseFloat(data.area.toFixed(2));
|
|
|
+ // this.changeArea = changArea;//当次变化的面积,有正负值
|
|
|
+ // this.sumArea = parseFloat((this.sumArea + changArea).toFixed(2));
|
|
|
this.overChange = true;//变形开始 防止在形变结束前,再次形变
|
|
|
this.currentChangeSpaceId = data.spaceId
|
|
|
this.changCurSpaceArea(data);
|
|
@@ -1548,6 +1548,15 @@
|
|
|
|
|
|
//空间面积等变更后-同步更新其他数据对象
|
|
|
updataPageData(){
|
|
|
+ let sumArea = 0;
|
|
|
+ this.spaceList.forEach(space=>{
|
|
|
+ let curSpaceArea = parseFloat((
|
|
|
+ (space.spaceWidth * space.spaceHeight) / 10000
|
|
|
+ ).toFixed(2));
|
|
|
+ sumArea +=curSpaceArea;
|
|
|
+ })
|
|
|
+ this.changeArea = parseFloat((sumArea - this.sumArea).toFixed(2));
|
|
|
+ this.sumArea = parseFloat(sumArea.toFixed(2));
|
|
|
let str = JSON.stringify(this.spaceList)
|
|
|
//更新当前空间对象
|
|
|
this.curHouseObj.houseJson = str;
|
|
@@ -1557,7 +1566,7 @@
|
|
|
})
|
|
|
layoutStruct.houseJson = str;
|
|
|
this.currentChangeSpaceId = null;//变化结束后
|
|
|
- console.warn("***curLayoutStruct-updataPageData***",this.curHouseFloor,this.curHouseObj,layoutStruct)
|
|
|
+ console.warn("***curLayoutStruct-updataPageData***",this.changeArea,this.sumArea,this.curHouseFloor,this.curHouseObj,layoutStruct)
|
|
|
},
|
|
|
//户型大类发生了变更
|
|
|
curHouseTypeChange(item){
|