|
@@ -90,17 +90,17 @@
|
|
|
<div
|
|
|
|
|
|
class="seat-item-class-box"
|
|
|
- v-for="(item1, index1) in Object.keys(seatMapList)"
|
|
|
- :key="index1"
|
|
|
+ v-for="(item1, index1) in seatMapListKey"
|
|
|
+ :key="item1.key"
|
|
|
>
|
|
|
<div
|
|
|
class="seat-item-class"
|
|
|
- :class="item.occupyStatus==0?'occupy-status': item.occupyStatus==1?'occupy-status-no':item.isDisabled || item.status == 2 ? 'disabled-class' : item.isSelect ? 'select-class' : ''"
|
|
|
- v-for="(item, index) in seatMapList[item1]"
|
|
|
+ :class="item.occupyStatus==0?'occupy-status': item.occupyStatus==1?'occupy-status-no':item.isDisabled || item.status != 1 ? 'disabled-class' : item.isSelect ? 'select-class' : ''"
|
|
|
+ v-for="(item, index) in seatMapList[item1.key]"
|
|
|
:style="{backgroundColor: item.color ? item.color : 'none'}"
|
|
|
@click.stop="seatClick(item)"
|
|
|
:key="index">
|
|
|
- <p class="text-class">{{ item.status == 2 ? '不可售':(item.name ? item.name : '暂未命名') }}</p>
|
|
|
+ <p class="text-class">{{ item.status != 1 ? '不可售':(item.name ? item.name : '暂未命名') }}</p>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -202,6 +202,7 @@
|
|
|
goodsPageListSAll: [], // 票务全部
|
|
|
setList: [],
|
|
|
seatMapList: [],
|
|
|
+ seatMapListKey: [], // key
|
|
|
seatSelectList: [],
|
|
|
|
|
|
lockOrUnLockLoading: false,
|
|
@@ -213,6 +214,7 @@
|
|
|
justifyContent: false,
|
|
|
activeName: 'first',
|
|
|
seatTypeList: [],
|
|
|
+
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
@@ -356,11 +358,21 @@
|
|
|
})
|
|
|
let width = 0
|
|
|
let flog = 0
|
|
|
+ let seatMapListKey = []
|
|
|
Object.keys(listCopy).forEach((item)=>{
|
|
|
if(listCopy[item].length>flog) {
|
|
|
flog = listCopy[item].length
|
|
|
}
|
|
|
+ seatMapListKey.push({
|
|
|
+ key: item,
|
|
|
+ sort: Number(item.replace('my',''))
|
|
|
+ })
|
|
|
+ })
|
|
|
+ seatMapListKey.sort((a,b)=>{
|
|
|
+ return a.sort - b.sort
|
|
|
})
|
|
|
+ this.seatMapListKey = seatMapListKey
|
|
|
+ console.log("seatMapListKey=====",seatMapListKey)
|
|
|
this.width = 70*flog
|
|
|
this.$nextTick(()=>{
|
|
|
if(this.$refs.seatbox) {
|