소스 검색

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

zjs_project 1 년 전
부모
커밋
0eda022d25
3개의 변경된 파일7개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 1
      src/components/newBottomCom/viewMask/viewMask.vue
  2. 4 1
      src/components/newBottomCom/viewPlot/viewPlot.vue
  3. 2 1
      src/mixins/loadModel.js

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

@@ -513,7 +513,7 @@
 				let res = await requestConfig("getHardboundEffects", {
 					"houseId": this.$route.query.houseId || this.$store.state.houseId,
 					"spaceType": this.spaceObj.layoutSpaceType || this.spaceObj.spaceType,
-					"spaceName": this.spaceObj.spaceName,
+					"spaceName": this.spaceObj.layoutSpaceName || this.spaceObj.spaceName,
 				});
 				this.styleList = [];
 				// alert("***getAiBeautyFamily-res***"+JSON.stringify(res))

+ 4 - 1
src/components/newBottomCom/viewPlot/viewPlot.vue

@@ -85,7 +85,6 @@
 				}
 				this.tabIndex = 0;
 				this.plotList = [];
-				this.selectIndex = arr.findIndex(it=>it==this.selectSpace.layoutId)
 				let list = res.list;
 				list.forEach(item=>{
 					//布局列表当中不存在当前布局的类型
@@ -102,6 +101,10 @@
 						data.count ++;
 						data.dataList.push(item);
 					}
+					if(item.id==this.selectSpace.layoutId){
+						this.tabIndex = this.plotList.length - 1;
+						this.selectIndex = this.plotList[this.tabIndex].dataList.length - 1;
+					}
 				});
 				console.warn("***viewPlot***", this.plotList)
 			},

+ 2 - 1
src/mixins/loadModel.js

@@ -71,7 +71,7 @@ export default {
 			// let lable = this.lableItem.find(it=>it.spaceId == spaceId);
 			// let name = spaceTypes[layoutObj.type - 1];
 			// lable.text = name;
-			this.lableItem.forEach(lable=>{
+			this.lableItem && 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);
@@ -1186,6 +1186,7 @@ export default {
 			this.deleteLayoutModel(element, layoutObj);//删除当前空间的布局
 			element.layoutId = layoutObj.id;//更新布局信息到空间对象里面
 			element.layoutSpaceType = layoutObj.type;//更新布局信息到空间对象里面
+			element.layoutSpaceName = layoutObj.name;//更新布局信息到空间对象里面
 			this.changeLayouts = [];
 			this.changeLayouts.push(layoutObj)
 			let changeSpaces = [];