zjs_project 2 周之前
父節點
當前提交
628c6f5ee0
共有 2 個文件被更改,包括 7 次插入5 次删除
  1. 4 4
      src/components/newQCCom/viewMask/viewMask.vue
  2. 3 1
      src/pages/webgl_rxdz_test/webgl_rxdz_test.vue

+ 4 - 4
src/components/newQCCom/viewMask/viewMask.vue

@@ -1272,6 +1272,7 @@
                 }
             	houseData.houseJson = spaceList.concat(thirdData);
             	// houseData.expand = expand;
+                let seletcIndex = curLayoutStruct.findIndex(it=>it.id==curHouseObj.id);
             	let param = {
             		"brandId": $config.brandId,
             		"houseId": houseId,
@@ -1279,13 +1280,12 @@
             		"floot": 1,
             		"spaceName": curHouseObj.name,
             		"spaceStructure": '',
-            		"curFloor":1,
+            		"curFloor":(seletcIndex+1),
             		layoutStruct:[],
             		type:'QIANCE',
             		expand:JSON.stringify(expand),
                     mainImage:mainImage,
             	}
-                let seletcIndex = curLayoutStruct.findIndex(it=>it.id==curHouseObj.id);
                 //处理每一个楼层
                 curLayoutStruct.forEach((layoutStruct,index)=>{
                     let houseData1;
@@ -1356,6 +1356,7 @@
             	// 	"houseJson": []
             	// }
             	// houseData.houseJson = this.form.layoutStruct[0].houseJson.concat(spaceList);
+                let seletcIndex = curLayoutStruct.findIndex(it=>it.id==curHouseObj.id);
             	let param = {
                     id:this.customizedRecordId,
             		"brandId": $config.brandId,
@@ -1365,13 +1366,12 @@
             		// "spaceName": this.form.spaceName || curHouseObj.name,
             		"spaceName": curHouseObj.name,
             		"spaceStructure": '',
-            		"curFloor":1,
+            		"curFloor":(seletcIndex+1),
             		layoutStruct:[],
             		type:'QIANCE',
             		expand:this.form.expand,
                     // mainImage:this.form.mainImage,
             	}
-                let seletcIndex = curLayoutStruct.findIndex(it=>it.id==curHouseObj.id);
                 //处理每一个楼层
                 curLayoutStruct.forEach((layoutStruct,index)=>{
                     let houseData1;

+ 3 - 1
src/pages/webgl_rxdz_test/webgl_rxdz_test.vue

@@ -809,7 +809,9 @@
                             this.curHouseObj.houseJson = JSON.stringify(spaceList);
                             console.warn("***backAysncData-curHouseObj***",this.curHouseObj)
                         }
-                        this.curLayoutStruct[index].houseJson = JSON.stringify(spaceList);//数据会同步到组件中
+                        if(this.curLayoutStruc && this.curLayoutStruct[index]){
+                            this.curLayoutStruct[index].houseJson = JSON.stringify(spaceList);//数据会同步到组件中
+                        }
                     })
                 }
             },