2 コミット 3789137831 ... 628c6f5ee0

作者 SHA1 メッセージ 日付
  zjs_project 628c6f5ee0 优化 3 週間 前
  zjs_project c33ebf76dc 优化 3 週間 前

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

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

+ 3 - 0
src/mixins/commonPageMethod.js

@@ -72,6 +72,9 @@ export default {
 			if(this.starRender && typeof(this.starRender)==='function'){
 			if(this.starRender && typeof(this.starRender)==='function'){
 				this.starRender()
 				this.starRender()
 			}
 			}
+            if(this.backAysncData && typeof(this.backAysncData)==='function'){
+            	this.backAysncData()
+            }
 			let param = {
 			let param = {
 				type: 'PV',
 				type: 'PV',
 				pvId: this.pvId,
 				pvId: this.pvId,

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

@@ -797,6 +797,24 @@
                     console.warn("***没有数据***",res.list)
                     console.warn("***没有数据***",res.list)
                 }
                 }
             },
             },
+            //页面返回后同步数据
+            backAysncData(){
+                console.warn("---backAysncData---",this.pvId)
+                let curLayoutStruct = JSON.parse(getStorage('curLayoutStruct')) ;//获取楼层的数据-户型数组
+                if(curLayoutStruct && curLayoutStruct.length>0){
+                    curLayoutStruct.forEach((layoutStruct,index)=>{
+                        let spaceList =  JSON.parse(layoutStruct.houseJson);//houseJson是字符串需要序列号处理
+                        spaceList.forEach(obj => delete obj.wallList);//去除墙体数据,减少数据量
+                        if(this.curHouseObj && this.curHouseObj.id==layoutStruct.id){
+                            this.curHouseObj.houseJson = JSON.stringify(spaceList);
+                            console.warn("***backAysncData-curHouseObj***",this.curHouseObj)
+                        }
+                        if(this.curLayoutStruc && this.curLayoutStruct[index]){
+                            this.curLayoutStruct[index].houseJson = JSON.stringify(spaceList);//数据会同步到组件中
+                        }
+                    })
+                }
+            },
             //当前户型初始化
             //当前户型初始化
             houseInit(item){
             houseInit(item){
             	this.gltfWalls = [];
             	this.gltfWalls = [];
@@ -1843,7 +1861,7 @@
                 this.locationHandle();
                 this.locationHandle();
                 setTimeout( async ()=>{
                 setTimeout( async ()=>{
                     let shottingImg = await this.shottingAction() + "?x-oss-process=image/auto-orient,1/quality,Q_46/format,jpg";//开始截图
                     let shottingImg = await this.shottingAction() + "?x-oss-process=image/auto-orient,1/quality,Q_46/format,jpg";//开始截图
-                    console.warn("***shottingImg***",shottingImg,this.selectSpace);
+                    console.warn("***shottingImg***",shottingImg,this.selectSpace,this.curLayoutStruct);
                     setStorage('shottingImg', shottingImg);//把空间选择的数据存入本地缓存里面,方便后续使用
                     setStorage('shottingImg', shottingImg);//把空间选择的数据存入本地缓存里面,方便后续使用
                     if(!this.curLayoutStruct){
                     if(!this.curLayoutStruct){
                         this.curLayoutStruct = [this.curHouseObj]
                         this.curLayoutStruct = [this.curHouseObj]