|
@@ -135,6 +135,7 @@
|
|
|
layoutArea:0, //总面积
|
|
|
selectSpace:null,//
|
|
|
changeStatus:false,
|
|
|
+ floorList:[],
|
|
|
// selectIndex:'',
|
|
|
}
|
|
|
},
|
|
@@ -748,12 +749,14 @@
|
|
|
pageNo: 1,
|
|
|
pageSize: 2000,
|
|
|
};
|
|
|
+
|
|
|
if(location.href.indexOf("//dm-mng.elab-plus.cn/screen/space-customiz") != -1){//生产环境
|
|
|
- parmas.ids = this.ueId ? [this.ueId] : [245];
|
|
|
+ parmas.ids = this.ueId ? this.ueId.split(',') : [245];
|
|
|
}else{
|
|
|
- parmas.ids = this.ueId ? [this.ueId] : [286];
|
|
|
+ parmas.ids = this.ueId ? this.ueId.split(',') : [286];
|
|
|
}
|
|
|
let res = await requestConfig("findHouseTypeSpaceListByIds", parmas);
|
|
|
+ this.floorList = [];
|
|
|
if (res.success && res.list) {
|
|
|
let list = res.list || [];
|
|
|
list && list.forEach((item, index) => {
|
|
@@ -777,13 +780,83 @@
|
|
|
}
|
|
|
}
|
|
|
item.houseJson = JSON.stringify(spaceList);
|
|
|
+ this.floorList.push({
|
|
|
+ id:item.id,
|
|
|
+ houseFloor:(index+1),
|
|
|
+ })
|
|
|
console.log("户型详情列表: ", spaceList);
|
|
|
}
|
|
|
})
|
|
|
- this.curHouseObj = res.list[0];
|
|
|
+ this.houseList = list;
|
|
|
+ this.curHouseObj = list[0];
|
|
|
setStorage('curHouseObj', this.curHouseObj);
|
|
|
this.houseInit();
|
|
|
}
|
|
|
+ },
|
|
|
+ //当前户型初始化
|
|
|
+ houseInit(item){
|
|
|
+ this.gltfWalls = [];
|
|
|
+ this.gltfSpaces = [];
|
|
|
+ this.gltfSpaceRoofs = [];
|
|
|
+ this.instancedMeshList = [];
|
|
|
+ this.instancedSpaceMeshList = [];
|
|
|
+ this.lableItem = [];
|
|
|
+ this.gltfLayouts = [];
|
|
|
+ this.instancedFurList = [];
|
|
|
+ this.wallList = [];
|
|
|
+ this.changeArea = 0;
|
|
|
+ // this.cameraInit();
|
|
|
+ this.resetControl();
|
|
|
+ setTimeout(()=>{
|
|
|
+ this.loadSpace();
|
|
|
+ }, 100);
|
|
|
+ console.warn("***curHouseObj***",this.curHouseObj,this.aiData)
|
|
|
+ // this.navbar.title = this.curHouseObj.name + " " + this.curHouseObj.houseArea + "㎡";
|
|
|
+ this.navbar.title = "空间定制";
|
|
|
+ document.title = this.navbar.title;
|
|
|
+ this.sumArea = this.curHouseObj.houseArea;
|
|
|
+ this.fixedArea = this.curHouseObj.houseArea;
|
|
|
+ this.curHouseName = this.curHouseObj.name;
|
|
|
+ if(this.curHouseObj.houseArea<=100){//面积小于100平米,则摄像头靠近一点
|
|
|
+ this.cameraStarPosition.y = 20;
|
|
|
+ }else if(this.curHouseObj.houseArea>100){
|
|
|
+ this.cameraStarPosition.y = 30;
|
|
|
+ }
|
|
|
+ this.cameraInit();
|
|
|
+ },
|
|
|
+ //户型楼层发生了变更
|
|
|
+ curHouseFloorChange(item){
|
|
|
+ let that = this;
|
|
|
+ if(!item || !item.id){
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ let _curHouseObj = this.houseList.find(it=>it.id==item.id);
|
|
|
+ if(!_curHouseObj){
|
|
|
+ console.warn("***curHouseFloorChange-nodeta***",this.houseList,item)
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ // 遍历场景中的所有子对象,找到类型为Mesh的对象并移除
|
|
|
+ let deleList = that.scene && that.scene.children.filter(object=>{
|
|
|
+ if(object.userType=="mesh" || object.userType=="layoutMesh"){
|
|
|
+ return object
|
|
|
+ }
|
|
|
+ })
|
|
|
+ // console.warn("***deleList***",deleList)
|
|
|
+ if(deleList && deleList.length>0){
|
|
|
+ that.showLables = false;//隐藏lable
|
|
|
+ that.scene.remove(...deleList);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ this.curHouseObj = _curHouseObj;
|
|
|
+ setStorage('curHouseObj', this.curHouseObj);
|
|
|
+ this.houseInit();
|
|
|
+ //恢复初始视角
|
|
|
+ // this.cameraInit();
|
|
|
+ // this.resetControl();
|
|
|
+ console.warn("***curHouseFloorChange***",this.curHouseObj,item)
|
|
|
+ // this.navbar.title = this.curHouseObj.name + " " + this.curHouseObj.houseArea + "㎡";
|
|
|
+
|
|
|
},
|
|
|
voiceMaskChange(voiceMask){
|
|
|
this.voiceMaskShow = voiceMask;
|
|
@@ -1711,37 +1784,7 @@
|
|
|
this.currentChangeSpaceId = null;//变化结束后
|
|
|
console.warn("***curLayoutStruct-updataPageData***",this.changeArea,this.sumArea,this.curHouseFloor,this.curHouseObj)
|
|
|
},
|
|
|
- //当前户型初始化
|
|
|
- houseInit(item){
|
|
|
- this.gltfWalls = [];
|
|
|
- this.gltfSpaces = [];
|
|
|
- this.gltfSpaceRoofs = [];
|
|
|
- this.instancedMeshList = [];
|
|
|
- this.instancedSpaceMeshList = [];
|
|
|
- this.lableItem = [];
|
|
|
- this.gltfLayouts = [];
|
|
|
- this.instancedFurList = [];
|
|
|
- this.wallList = [];
|
|
|
- this.changeArea = 0;
|
|
|
- // this.cameraInit();
|
|
|
- this.resetControl();
|
|
|
- setTimeout(()=>{
|
|
|
- this.loadSpace();
|
|
|
- }, 100);
|
|
|
- console.warn("***curHouseObj***",this.curHouseObj,this.aiData)
|
|
|
- // this.navbar.title = this.curHouseObj.name + " " + this.curHouseObj.houseArea + "㎡";
|
|
|
- this.navbar.title = "空间定制";
|
|
|
- document.title = this.navbar.title;
|
|
|
- this.sumArea = this.curHouseObj.houseArea;
|
|
|
- this.fixedArea = this.curHouseObj.houseArea;
|
|
|
- this.curHouseName = this.curHouseObj.name;
|
|
|
- if(this.curHouseObj.houseArea<=100){//面积小于100平米,则摄像头靠近一点
|
|
|
- this.cameraStarPosition.y = 20;
|
|
|
- }else if(this.curHouseObj.houseArea>100){
|
|
|
- this.cameraStarPosition.y = 30;
|
|
|
- }
|
|
|
- this.cameraInit();
|
|
|
- },
|
|
|
+
|
|
|
|
|
|
onMouseMove(e){
|
|
|
return false;
|