zjs_project 2 months ago
parent
commit
2d4bc5c163

+ 6 - 2
src/mixins/loadModel.js

@@ -103,6 +103,7 @@ export default {
 			// this.setSpaceListWallInfo();
 			this.type = type;//加载类型,1空间加载 2 全局精简加载
 			let arr = this.spaceList.map(it => it.layoutId).filter(it => it != 0);
+            // let arr = [533]
 			let parmas = {
 				ids: arr,
 			};
@@ -246,6 +247,7 @@ export default {
 				let signel = arrFrunList.find(it => it.id == space.layoutId);
 				if(allowSpaceId.includes(spaceId) && signel){//只加载允许的空间的布局,其他不加载
 					let md = JSON.parse(signel.modelJson); //获取布局里面的模型信息
+                    console.warn("***布局信息***",this.type,md,md.modelData.map(it=>it.modelName));
 					//遍历模型信息,获取模型列表
 					for (let i = 0; i < md.modelData.length; i++) {
 						let item = md.modelData[i];
@@ -279,6 +281,7 @@ export default {
 				tmpList = this.realList;
 				tmpList = tmpList.concat(curSpaceList);//合并详细空间的模型
 			}
+            console.log("***realFurArr0***", tmpList.map(it=>it.modelName));
 			let realFurArr = this.preFurnitureData(tmpList);//统一处理家具模型
 			if(tmpSpaceList && tmpSpaceList.length>0){
 				this.calculateLayoutModelSizeBySpace(tmpSpaceList) // 提前计算模型的位置
@@ -1294,7 +1297,7 @@ export default {
 				let layoutObj = this.arrFrunList.find((item)=>{
 					return item.id == element.layoutId;
 				})
-				console.log("请求布局的对象", layoutObj, element);
+				console.log("请求布局的对象",element.layoutId,layoutObj.id, layoutObj, element);
 				if(layoutObj){
 					promise_list.push(
 						new Promise((resolve, reject) => {
@@ -1349,7 +1352,8 @@ export default {
 			})
 			console.log("过滤适合的布局02", layouts02)
 			// 取布局面积最大的一个
-			let layoutObj = null
+			let layoutObj = null;
+            
 			for (let index = 0; index < layouts02.length; index++) {
 				const element = layouts02[index];
 				if(!layoutObj){

+ 5 - 0
src/mixins/wallMethod.js

@@ -293,8 +293,13 @@ export default {
 							modelWidth = 500
 						}else if(modelItem.wallType == '26'){
 							modelWidth = 600
+						}else if(modelItem.wallType == '15'){
+							modelItem.wallWidth = modelWidth = 480
 						}
 						let tmdWidth = modelItem.wallWidth;//记录
+                        // if(tmdWidth=="510.0"){
+                        //     debugger
+                        // }
 						// console.log("XXXXXXXXXXXXXXXX", modelWidth, spaceObj)
 						// 计算墙体的 X Y W H
 						//说明该面墙壁只使用了一个模型-独占形式

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

@@ -1871,7 +1871,7 @@
                     }
                 }
                 this.allSpaceCenter = this.getAllSpaceCenter(this.spaceList);//获取所有空间的中心点
-                console.log("该户型空间数据:", this.spaceList, this.layoutIds,type);
+                console.log("该户型空间数据:", this.spaceList,this.spaceList.map(it=>it.spaceId), this.layoutIds,type);
                 console.log("当前选中的空间:", this.curSpaceObj,this.curHouseObj);
 				this.spaceListBackup = JSON.parse(JSON.stringify(this.spaceList));
 				this.$store.state.curSpaceId = this.curSpaceObj.spaceId;
@@ -1925,6 +1925,7 @@
 			// 获取墙体数据
             async getHouseTypeSpaceWalls(){
                 let data = {id:this.wallIds}
+                // let data = {id:[2313]}
                 const res = await requestConfig('getHouseTypeSpaceWalls', data, true);
                 console.log("墙体数据:", res.list)
                 let wallList = [];

+ 4 - 0
src/static/globlShowModel.js

@@ -87,6 +87,10 @@ var globlShowModel = [
 	'BP_G_tree03',
 	'BP_sofa_with_toy_A',
 	'BP_sofa_with_toy_B',
+    'BP_D_12people_round',
+    "BP_D_DinningChiar01_30Degree",
+    "BP_D_DinningChiar01_60Degree",
+    "BP_D_DinningChiar01_90Degree",
 ];
 
 module.exports = globlShowModel;