Browse Source

1. 优化

MONSTER-ygh 1 year ago
parent
commit
01d1e22525

+ 13 - 3
src/views/officesale/ticketingSales.vue

@@ -95,8 +95,9 @@
                             >
                                 <div 
                                 class="seat-item-class" 
-                                :class="item.occupyStatus==0?'occupy-status': item.isDisabled || item.status == 2 ? 'disabled-class' : item.isSelect ? 'select-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]" 
+                                :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>
@@ -517,6 +518,7 @@
         width: 100%;
         height: 100%;
         box-sizing: border-box;
+        position: relative;
     }
     .seat-select-box {
         width: 200px;
@@ -533,20 +535,21 @@
     }
   }
 
-  .seat-box::after {
+  .seat-list-box::before {
     content: "舞台";
     position: absolute;
     left: 50%;
     transform: translateX(-50%);
     width: 300px;
     height: 30px;
-    background-color: rgb(204, 204, 204,0.3);
+    background-color: rgb(204, 204, 204,0.5);
     font-size: 18px;
     font-weight: 600;
     display: flex;
     align-items: center;
     justify-content: center;
     border-radius: 0 0 20px 20px;
+    z-index: 99;
   }
   .dialog {
     padding: 30px 10px 10px;
@@ -623,6 +626,12 @@
       .occupy-status {
         //pointer-events: none;
       }
+      .occupy-status-no {
+        background-color: #f56c6c !important;
+        user-select: none;
+        // pointer-events: none;
+        cursor: not-allowed !important;
+      }
       .seat-item-class-box {
         width: 100%;
         display: flex;
@@ -654,6 +663,7 @@
           padding: 5px;
           line-height: 16px;
           margin: 0;
+          color: #fff;
         }
       }
     }

+ 80 - 12
src/views/windowTicketSales/ticketingSales.vue

@@ -95,8 +95,9 @@
                             >
                                 <div 
                                 class="seat-item-class" 
-                                :class="item.occupyStatus==0?'occupy-status': item.isDisabled || item.status == 2 ? 'disabled-class' : item.isSelect ? 'select-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]" 
+                                :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>
@@ -116,16 +117,32 @@
                 </div>
             </div>
         </div>
-        <!-- <div class="seat-select-box">
-            <div class="seat-select-info">
+        <div class="seat-select-box">
+            <div class="seat-select-box-top">
+                <el-tabs v-model="activeName" @tab-click="handleClickTab">
+                    <el-tab-pane label="已选座位" name="first"></el-tab-pane>
+                    <el-tab-pane label="座位图例" name="second"></el-tab-pane>
+                </el-tabs>
+            </div>
+            <div class="seat-select-info" v-if="activeName=='first'">
                 <div 
                 class="seat-select-item"
                 :key="index" 
                 v-for="(item,index) in seatSelectList">
                     <span>{{item.name ? item.name : '暂未命名'}}</span>
+                    <span></span>
                 </div>
             </div>
-        </div> -->
+            <div class="seat-select-info" v-if="activeName=='second'">
+                <div 
+                class="seat-select-color-item"
+                :key="index" 
+                v-for="(item,index) in seatTypeList">
+                    <span :style="{backgroundColor: item.color?item.color:'none'}"></span>
+                    <span>{{item.name ? item.name : '暂未命名'}}</span>
+                </div>
+            </div>
+        </div>
       </div>
       <!--  添加观影人  -->
       <increaseViewers ref="increaseViewers" @clearDialogVisible="clearDialogVisible" />
@@ -142,6 +159,7 @@
  } from '@/api/windowTicketSales/ticketingSales'
  import increaseViewers from "./model/increaseViewers"
  import moment from "moment"
+ import { pageList as getSeatType } from '@/api/seatTypeMr/seatTypeMr'
   export default {
     name: "distributionapplication",
     components: {
@@ -186,12 +204,15 @@
         scaleNum: 30,
 
         width: 0,
-        justifyContent: false
+        justifyContent: false,
+        activeName: 'first',
+        seatTypeList: [],
       };
     },
     created() {
         this.merchantTheatreAuditoriumListFun()
         this.goodsPageListFun()
+        this.getSeatTypeList()
     },
     mounted() {
         this.$set(this.queryParams,'performDate',moment().format("yyyy-MM-DD"))
@@ -483,7 +504,22 @@
         clearDialogVisible(){
             //this.
             this.querySeatListFun(true)
-        }
+        },
+        /**  选择tab */
+        handleClickTab(){
+
+        },
+        /** 获取座位类型 说明 */
+        getSeatTypeList() {
+            getSeatType({
+                pageNum: 1,
+                pageSize: 999,
+            })
+            .then(response => {
+                this.seatTypeList = response.data.rows;
+                }
+            );
+        },
     }   
   };
   </script>
@@ -513,40 +549,65 @@
     display: flex;
     position: relative;
     .seat-list-box {
-        //width: calc(100% - 200px);
-        width: 100%;
+        width: calc(100% - 210px);
+        //width: 100%;
         height: 100%;
         box-sizing: border-box;
+        position: relative;
     }
     .seat-select-box {
         width: 200px;
         height: 100%;
         flex-shrink: 0;
         box-sizing: border-box;
+        padding: 0 5px;
+        margin-left: 10px;
+        border: 1px solid #ccc;
+        border-radius: 10px;
         .seat-select-info {
             width: 100%;
-            height: 100%;
+            height: calc( 100% - 60px );
             overflow: hidden;
             overflow-y: auto;
-            .seat-select-item {}
+            .seat-select-item {
+                border: 1px solid #ccc;
+                margin-bottom: 5px;
+            }
+
+            .seat-select-color-item {
+                display: flex;
+                align-items: center;
+                margin-bottom: 5px;
+                >span:first-child {
+                    width: 20px;
+                    height: 20px;
+                    flex-shrink: 0;
+                }
+                >span:last-child {
+                    font-size: 16px;
+                    font-weight: 600;
+                    margin-left: 10px;
+                }
+            }
         }
     }
   }
 
-  .seat-box::after {
+  .seat-list-box::before {
     content: "舞台";
     position: absolute;
     left: 50%;
     transform: translateX(-50%);
     width: 300px;
     height: 30px;
-    background-color: rgb(204, 204, 204,0.3);
+    background-color: rgb(204, 204, 204,0.5);
     font-size: 18px;
     font-weight: 600;
     display: flex;
     align-items: center;
     justify-content: center;
     border-radius: 0 0 20px 20px;
+    z-index: 99;
   }
   .dialog {
     padding: 30px 10px 10px;
@@ -623,6 +684,12 @@
       .occupy-status {
         //pointer-events: none;
       }
+      .occupy-status-no {
+        background-color: #f56c6c !important;
+        user-select: none;
+        // pointer-events: none;
+        cursor: not-allowed !important;
+      }
       .seat-item-class-box {
         width: 100%;
         display: flex;
@@ -654,6 +721,7 @@
           padding: 5px;
           line-height: 16px;
           margin: 0;
+          color: #fff;
         }
       }
     }