zjs_project 1 سال پیش
والد
کامیت
5c914d38ad
2فایلهای تغییر یافته به همراه15 افزوده شده و 4 حذف شده
  1. 2 0
      src/components/newBottomCom/viewCareful/viewCareful.vue
  2. 13 4
      src/pages/webgl_rxdz/webgl_rxdz.vue

+ 2 - 0
src/components/newBottomCom/viewCareful/viewCareful.vue

@@ -41,6 +41,7 @@
 						}
 					}
 				},
+				deep:true,
 			},
 		},
 		mixins: [],
@@ -167,6 +168,7 @@
 			},
 			callBack(type){
 				console.warn("***callBack***",type)
+				this.initData();
 				this.$parent.$parent.callBackFun = null;//注销父页面的通知回调函数
 			}
 		}

+ 13 - 4
src/pages/webgl_rxdz/webgl_rxdz.vue

@@ -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){