17755135699 hace 3 meses
padre
commit
38c7206207
Se han modificado 1 ficheros con 12 adiciones y 3 borrados
  1. 12 3
      pages/house/index.vue

+ 12 - 3
pages/house/index.vue

@@ -11,7 +11,7 @@
 				:class="indexArr[i]!=key.split('-')[0]?'mg0 fixedItem':'fixedItem'">
 				<view class="head" v-if="indexArr[i]==key.split('-')[0]" style="margin-top: 16rpx;">
 					<!-- <text>{{key.split('-')[0]}}F</text> -->
-					<view class="roomType" :style="{'left':scrollLeft+'px'}">{{key.split('-')[1]}}</view>
+					<view class="roomType" :style="{'left':scrollLeft+'px'}">{{key.split('-')[1]}}-{{key.split('-')[2]}}</view>
 					<view class="rightIcon" @click="open(i,key.split('-')[0],false)" v-if="opens[i]">
 						<text>收起</text>
 						<u-icon name="arrow-up-fill" size="18" style="margin-left: 10rpx;"></u-icon>
@@ -62,7 +62,7 @@
 					<view v-for="(item,key,i) in leftData" :key="i">
 						<view class="head" v-if="indexArr[i]==key.split('-')[0]" style="opacity: 0;">
 							<!-- <text>{{key.split('-')[0]}}F</text> -->
-							<view class="roomType" :style="{'left':scrollLeft+'px'}">{{key.split('-')[1]}}</view>
+							<view class="roomType" :style="{'left':scrollLeft+'px'}">{{key.split('-')[1]}}-{{key.split('-')[2]}}</view>
 							<view class="rightIcon" @click="open(i,key.split('-')[0],false)" v-if="opens[i]">
 								<text>收起</text>
 								<u-icon name="arrow-up-fill" size="18" style="margin-left: 10rpx;"></u-icon>
@@ -157,6 +157,8 @@
 				xdata: [], //纵向列
 				leftData: [], //横向列,
 				indexArr: [], //楼层索引,
+				indexHouseBaseIdArr:[],
+				indexNameArr: [], //楼层Id索引,
 				opens: [],
 				statusTxt: {
 					'-2': '待支付',
@@ -352,12 +354,19 @@
 						// 	res.data.data[i].open = true;
 						// }
 						for (let i in res.data.data) {
+							console.log(i)
+							console.log(res.data.data)
+							
 							let F = i.split('-')[0];
-							if (this.indexArr.indexOf(F) < 0) {
+							let houseBaseId=res.data.data[i][0].houseBaseId;
+							//indexNameArr
+							if (this.indexArr.indexOf(F)||this.indexHouseBaseIdArr.indexOf(houseBaseId) < 0) {
 								this.indexArr.push(F);
+								this.indexHouseBaseIdArr.push(houseBaseId)
 								this.opens.push(true)
 							} else {
 								this.indexArr.push('');
+								this.indexHouseBaseIdArr.push('')
 								this.opens.push(true)
 							}
 						}