Parcourir la source

更改空间显示名称 X空间 类型 根据布局所属类型来显示

zjs_project il y a 1 an
Parent
commit
7ad9867b4c

+ 1 - 1
src/components/newBottomCom/viewMask/viewMask.html

@@ -72,7 +72,7 @@
 			<div class="tab-view">
 				<div class="content rows">
 					<div class="btn rows justify-center" v-for="(item, idx) in datalist" @click="changeSpace(item)"
-					:class="{active:spaceObj.spaceId==item.spaceId}" :key="idx">{{item.spaceType | spaceTypeFilter}}</div>
+					:class="{active:spaceObj.spaceId==item.spaceId}" :key="idx">{{item.text}}</div>
 				</div>
 			</div>
 			<div class="aiStyleList rows">

+ 32 - 4
src/components/newBottomCom/viewMask/viewMask.vue

@@ -178,6 +178,10 @@
 				type: [Array ,Object],
 				default: [],
 			},
+			layoutList:{
+				type: [Array ,Object],
+				default: [],
+			}
 		},
 		watch: {
 			spaceObj(newVal, oldVal) {
@@ -210,12 +214,18 @@
 				// ).toFixed(2);
 				// this.getOverallArrangementDetailsList();
 			},
+			layoutList(newVal, oldVal) {
+				if (newVal == null) {
+					return;
+				}
+				this.updataLable();
+			},
 		},
 		filters:{
-		    spaceTypeFilter(type){
-				let name = spaceTypes[type - 1];
-		        return name || '-'
-		    },
+		// 	spaceTypeFilter(type){
+		// 		let name = spaceTypes[type - 1];
+		// 		return name || '-'
+		// 	},
 		},
 		mounted() {//组件挂载时事件
 			// console.warn("***mounted-nav***",this.seedItem)
@@ -259,6 +269,24 @@
 			},
 		},
 		methods:{
+			//更改空间显示名称 X空间 类型 根据布局所属类型来显示
+			updataLable(){
+				let list = this.layoutList;
+				this.datalist.forEach(lable=>{
+					if(lable.spaceType==15){
+						let layoutId = lable.layoutId;
+						let layout = list.find(it=>it.id == layoutId);
+						if(layout){
+							let name = spaceTypes[layout.type - 1];
+							lable.text = name
+						}
+					}else{
+						let name = spaceTypes[lable.spaceType - 1];
+						lable.text = name;
+					}
+				})
+				console.warn("***updataLable***",this.datalist)
+			},
 			swiperChangeImg(e){
 				this.currentIndex = e.detail?e.detail.current:e;
 				this.checked = this.aiImagesList[this.currentIndex].checked;

+ 7 - 2
src/components/newBottomCom/viewPlot/viewPlot.scss

@@ -13,12 +13,14 @@
 	}
 	.close{
 		position: absolute;
-		right: -10px;
-		top: 10px;
+		right: -50px;
+		top: -40px;
 		width: 30px;
 		height: 30px;
 		color: rgba(0, 0, 0, 0.22);
 		font-size: 30px;
+		padding: 60px;
+		z-index: 9;
 	}
 }
 .swiper-view{
@@ -30,8 +32,10 @@
 	overflow-y: hidden;
 	margin-bottom: 30px;
 	z-index: 9;
+	box-sizing: border-box;
 	.tab-content{
 		position: absolute;
+		box-sizing: border-box;
 	}
 	.tab-item{
 		// width:190px;
@@ -46,6 +50,7 @@
 		border: 2px solid transparent;
 		border-radius: 12px;
 		padding: 12px;
+		height: 98px;
 		&.tabActive{
 			border-color: #ffbd3e;
 			background: rgba(253, 191, 71, 0.08);

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

@@ -83,6 +83,8 @@
 				if (!res.success || !res.list || res.list.length == 0) {
 					return false;
 				}
+				this.tabIndex = 0;
+				this.plotList = [];
 				this.selectIndex = arr.findIndex(it=>it==this.selectSpace.layoutId)
 				let list = res.list;
 				list.forEach(item=>{

+ 1 - 0
src/components/newBottomCom/viewShell/viewShell.scss

@@ -92,6 +92,7 @@
 	top:-158px;
 	right:-18px; 
 	box-sizing: border-box;
+	z-index: 2;
 	.defaultHead{
 		width: 242px;
 		height: 330px;

+ 7 - 0
src/pages/webgl_rxdz_look/webgl_rxdz_look.vue

@@ -543,6 +543,13 @@
 					// 给地板加上空间类型标注, 空间为链接空间的不显示
 					if(cube.spaceName && !cube.isSizeLock){
 						let name = spaceTypes[cube.spaceType - 1];
+						if(cube.spaceType==15){			//更改空间显示名称 X空间 类型 根据布局所属类型来显示
+							let layoutId = this.spaceList.find(it => it.spaceId == cube.spaceId).layoutId;
+							let layout = this.arrFrunList.find(it=>it.id == layoutId);
+							if(layout){
+								name = spaceTypes[layout.type - 1];
+							}
+						}
 						this.lableItem.push(
 							{
 								text:name,

+ 1 - 1
src/pages/webgl_rxdz_roam/webgl_rxdz_roam.html

@@ -22,7 +22,7 @@
 	</canvas>
 	<!-- AI结果覆盖层 -->
 	<viewMask ref="viewMask" @switchActor="switchActor" style="z-index: 13;"
-	  :spaceObj="curSpaceObj" :spaceList="spaceList" ></viewMask>
+	  :spaceObj="curSpaceObj" :spaceList="spaceList" :layoutList="arrFrunList" ></viewMask>
 	<!-- 生成截屏的画布对象 -->
 	<canvas id="canvas" type="2d" :style="{'height':canvasHeight+'px','top':'100vh'}"></canvas>
 </div>

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

@@ -1665,7 +1665,8 @@
 			userSelectPlot(layoutObj){
 				let spaceId = this.selectSpace.spaceId;
 				console.warn("***userSelectPlot***",spaceId,layoutObj)
-				this.changeSingleLayout(spaceId,layoutObj)
+				this.changeSingleLayout(spaceId,layoutObj);
+				this.updataLable();
 			},
 			async goRoam1(spaceId){
 				if(this.overChange){
@@ -1757,6 +1758,21 @@
                 // 绘制墙体
                 this.getHouseTypeSpaceWalls();
             },
+			//更改空间显示名称 X空间 类型 根据布局所属类型来显示
+			updataLable(){
+				let list = this.arrFrunList;
+				this.lableItem.forEach(lable=>{
+					if(lable.spaceType==15){
+						let layoutId = this.spaceList.find(it => it.spaceId == lable.spaceId).layoutId;
+						let layout = list.find(it=>it.id == layoutId);
+						if(layout){
+							let name = spaceTypes[layout.type - 1];
+							lable.text = name
+						}
+					}
+				})
+				console.warn("***updataLable***",this.lableItem)
+			},
 			// 添加文字标签
 			addWordLabel(){
 				if(!this.gltfSpaces || this.gltfSpaces.length <= 0){
@@ -1769,6 +1785,13 @@
 					if(cube.spaceName && !cube.isSizeLock){
 						let spaceIndex = this.spaceList.filter(it=>it.spaceName && !it.isSizeLock).findIndex(item=>item.spaceId==cube.spaceId);
 						let name = spaceTypes[cube.spaceType - 1];
+						if(cube.spaceType==15){			//更改空间显示名称 X空间 类型 根据布局所属类型来显示
+							let layoutId = this.spaceList.find(it => it.spaceId == cube.spaceId).layoutId;
+							let layout = this.arrFrunList.find(it=>it.id == layoutId);
+							if(layout){
+								name = spaceTypes[layout.type - 1];
+							}
+						}
 						this.lableItem.push(
 							{
 								text:name,

+ 1 - 0
src/static/globlShowModel.js

@@ -11,6 +11,7 @@ var globlShowModel = [
 	'BP_T_2PeopleBasin01',
 	'BP_T_bathtub01',
 	'BP_B_wardrobe01',
+	// 'BP_L_21sofa01',
 	'BP_B_bigbed01',
 	'BP_B_smallcabinet01',
 	'BP_O_LightIndoorWall',