Browse Source

1. 优化

MONSTER-ygh 1 year ago
parent
commit
6ec6c13b24

+ 12 - 2
src/views/venue/performanceHallMr/dialog/seatTemplateEdit.vue

@@ -30,7 +30,10 @@
         </div>
       </template>
     <div class="dialog">
-      <seatManagementTable />
+      <seatManagementTable
+      ref="seatManagementTable"
+      @saveSeat="saveSeat"
+       />
     </div>
     <span slot="footer" class="dialog-footer">
       <el-button @click="cancel">取消</el-button>
@@ -158,6 +161,7 @@ export default {
             this.$set(this.colSeatMap, item.sortId + '_', item);
           })
           this.seatType = true;
+          this.$refs.seatManagementTable.initData(dataList,'edit')
         })
       });
     },
@@ -184,12 +188,18 @@ export default {
           }
           try {
             this.loading = true;
-            const { code } = await saveAndEdit({ id: this.auditoriumId, rows: this.seatMap.row, cols: this.seatMap.col });
+            /**  保存行号  */
+            const { code } = await saveAndEdit({ 
+              id: this.auditoriumId, 
+              rows: this.seatMap.row, 
+              cols: this.seatMap.col 
+            });
             if (code === 200) {
               let postList = []
               for (const codeKey in this.colSeatMap) {
                 postList.push(this.colSeatMap[codeKey])
               }
+              /**  保存座位  */
               const { code } = await seatSaveAndEdit(postList);
               if (code === 200) {
                 that.$message.success("操作成功!");

+ 3 - 3
src/views/venue/performanceHallMr/index.vue

@@ -131,9 +131,9 @@
 
 import { merchantPageList, deleteById } from '@/api/performanceHallMr/performanceHallMr'
 import addAndEdit from "./dialog/addAndEdit.vue";
-//import seatTemplateEdit from "./dialog/seatTemplateEdit.vue";
-import seatTemplateEdit from "./dialog/seatTemplateEditOld.vue";
-import programmeAddAndEdit from "./dialog/programmeAddAndEdit.vue";
+import seatTemplateEdit from "./dialog/seatTemplateEdit";
+// import seatTemplateEdit from "./dialog/seatTemplateEditOld";
+import programmeAddAndEdit from "./dialog/programmeAddAndEdit";
 
 export default {
   name: "agreement",

+ 245 - 240
src/views/venue/performanceHallMr/model/seatManagementTable.vue

@@ -58,13 +58,13 @@
                                 <div 
                                 class="row-item"
                                 v-for="(item1,index1) in scope.row[item.key]" 
-                                :key="item1.id"
+                                :key="item1.style.id"
                                 dragSelectType="div"
-                                :dragSelectId="item1.id"
+                                :dragSelectId="item1.style.id"
                                 :style="{backgroundColor: item1.delFlag !=0?'#ccc':item1.color}"
                                 >
-                                    <i style="line-height: 15px;">{{ item1.colNo }}</i>
-                                    <i style="line-height: 15px;">{{ item1.seatNo }}</i>
+                                    <i style="line-height: 15px;">{{ item1.columnNo }}</i>
+                                    <i style="line-height: 15px;">{{ item1.name }}</i>
                                     <i style="line-height: 15px;">vip</i>
                                 </div>
                             </div>
@@ -77,7 +77,7 @@
                 <div class="table-tool-tab">
                     <el-tabs 
                     v-model="activeName" 
-                    @tab-click="handleClick">
+                    @tab-click="handleClickTab">
                         <el-tab-pane label="创建区域" name="first"></el-tab-pane>
                         <el-tab-pane label="座位管理" name="second"></el-tab-pane>
                         <el-tab-pane label="批量处理" name="batch"></el-tab-pane>
@@ -88,7 +88,7 @@
                 v-if="activeName == 'first'"
                 class="qu-first-box">
                     <div class="qu-first-form">
-                        <el-form :model="ruleForm" size="mini" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
+                        <el-form :model="ruleForm" size="mini" :rules="rules" ref="ruleFormRegion" label-width="100px" class="demo-ruleForm">
                             <el-form-item label="座位总排数">
                                 <el-input v-model="rowAll">
                                     <el-button slot="append" @click="createTableList">创建排数</el-button>
@@ -105,8 +105,8 @@
                                 </el-select>
                             </el-form-item>
                             <el-form-item>
-                                <el-button size="mini" type="primary" @click="submitForm('ruleForm')">创建区域</el-button>
-                                <el-button size="mini" @click="resetForm('ruleForm')">重置</el-button>
+                                <el-button size="mini" type="primary" @click="submitForm('ruleFormRegion')">创建区域</el-button>
+                                <el-button size="mini" @click="resetForm('ruleFormRegion')">重置</el-button>
                             </el-form-item>
                         </el-form>
                     </div>
@@ -177,7 +177,7 @@
                             </el-form-item>
                             
                             <el-form-item>
-                                <el-button size="mini" type="primary" @click="submitForm1('ruleForm1')">创建座位</el-button>
+                                <el-button size="mini" type="primary" @click="addSeat('ruleForm1')">创建座位</el-button>
                                 <el-button size="mini" @click="resetForm1('ruleForm1')">重置</el-button>
                             </el-form-item>
                         </el-form>
@@ -189,15 +189,16 @@
                         </div> 
                         <div class="qu-second-info-tool">
                             <span>快速排序:</span>
-                            <span>升序</span>
-                            <span>降序</span>
-                            <span>奇偶对称</span>
+                            <i @click="seatSortingFun('rise')">升序</i>
+                            <i @click="seatSortingFun('fall')">降序</i>
+                            <i @click="seatSortingFun('symmetry')">奇偶对称</i>
+                            <i @click="seatSortingFun('reversal')">反转</i>
                         </div> 
                         <div class="qu-second-info-list">
                             <div 
                             class="qu-second-info-item"
                             v-for="(item,index) in currentTabelList">
-                                <span>{{ item.seatNo }}</span>
+                                <span>{{ item.name }}</span>
                             </div>
                         </div>
                     </div>                 
@@ -237,8 +238,8 @@
                         </el-form>
                     </div>
                     <div class="qu-batch-tool">
-                        <el-button type="primary" size="mini" @click="handleQuery">绑定区域</el-button>
-                        <el-button type="danger" size="mini" @click="handleQuery">批量禁用</el-button>
+                        <el-button type="primary" size="mini" @click="openFormDialogVisible">修改区域</el-button>
+                        <el-button type="danger" size="mini" @click="batchDisable">批量禁用</el-button>
                         
                     </div>
                     <div class="qu-batch-table">
@@ -255,15 +256,21 @@
                             width="40">
                             </el-table-column>
                             <el-table-column
-                            prop="seatNo"
+                            prop="name"
                             align="center"
                             label="名称">
+                                <template slot-scope="scope">
+                                    <div>
+                                        <span>{{ scope.row.name ? scope.row.name : '暂未命名' }}</span>
+                                        <span>({{ scope.row.rowNo}}-{{ scope.row.columnNo}})</span>
+                                    </div> 
+                                </template>
                             </el-table-column>
                             <el-table-column
                             align="center"
                             label="区域">
                                 <template slot-scope="scope">
-                                    <span>{{ scope.row.style && scope.row.style.key }}</span>
+                                    <span>{{ scope.row.style && scope.row.style.keyLabel ? scope.row.style.keyLabel : '暂未分区' }}</span>
                                 </template>
                             </el-table-column>
                         </el-table>
@@ -275,7 +282,7 @@
 
         <!--  编辑区域   -->
         <el-dialog
-            title="编辑区域"
+            :title="formDialogVisibleTitle"
             :visible.sync="formDialogVisible"
             width="30%"
             append-to-body
@@ -297,6 +304,20 @@
                         </el-select>
                     </el-form-item>
                 </div>
+                <div v-if="formAllType=='bindingregion'">
+                    <el-form-item label="区域" prop="status">
+                        <div style="display: flex;">
+                            <el-select v-model="formAll.status" placeholder="区域" clearable>
+                                <el-option
+                                    v-for="item in tableHeader"
+                                    :key="item.key"
+                                    :label="item.title"
+                                    :value="item.key"
+                                />
+                            </el-select>
+                        </div>
+                    </el-form-item>
+                </div>
             </el-form>
             <span slot="footer" class="dialog-footer">
                 <el-button @click="formDialogVisible = false">取 消</el-button>
@@ -317,17 +338,6 @@ export default {
         return {
             // 页面渲染的数据
             seatList: [],
-            // 后端返回的数据
-            arrList: [
-                {
-                    id: 1,
-                    seatNo: '1排1座',
-                    status: 'N',
-                    rowNo: '1',
-                    colNo: '1',
-                    sort: '0'
-                }
-            ],
             seatTypeList: [
                 {
                     "id": "899466154989936640",
@@ -425,7 +435,7 @@ export default {
             tableData: [
                 // {
                 //     id: this.currentRow+"_"+this.currentProperty+"_"+i,
-                //     seatNo: this.ruleForm1.name.replace('${row}',this.currentRow).replace('${col}',i),
+                //     name: this.ruleForm1.name.replace('${row}',this.currentRow).replace('${col}',i),
                 //     status: this.ruleForm1.seatTypeId,
                 //     rowNo: this.currentRow,
                 //     colNo: i,
@@ -475,6 +485,8 @@ export default {
                     { required: true, message: '请选择活动区域', trigger: ['blur','change'] }
                 ],
             },
+
+            /**   创建座位  开始 */
             // 创建座位
             ruleForm1: {
                 name: '${row}排${col}座'
@@ -495,6 +507,7 @@ export default {
             currentLabel: null, // 当前选择的单元格列 名称
             currentProperty: null, // 当前选择的key
             currentTabelList: [], // 当前单元格的座位列表
+            /**   创建座位  结束 */
 
             /** 批量操作   */
             batchTableList: [],
@@ -502,6 +515,7 @@ export default {
             queryParams: {},
 
             /** 编辑区域 开始  */
+            formDialogVisibleTitle: '',
             formDialogVisible: false, // 弹窗
             formAll: {},
             formRules: {},
@@ -545,185 +559,27 @@ export default {
             })
 
         },
-        /**  生成座位  */
-        initDataCopy() {
-            let row = 20
-            let col = 46
-            let list = []
-            let listCopy = []
-
-            this.widthAll = this.spacing * col + this.width * col
-            this.height = this.spacing * row + this.height * row
-            for(let i = 1;i <= row;i++) {
-                if(i==1){
-                    col = 19
-                }else if(i==10){
-                    col = 30
-                }else {
-                    col = 46
-                }
-                for(let j = 1;j <= col;j++) {
-                    let key = ''
-                    if(j<=10){
-                        key = this.tableHeader[0].key
-                    }else if(j>10&&j<=40) {
-                        key = this.tableHeader[2].key
-                    }else{
-                        key = this.tableHeader[4].key
-                    }
-                    list.push({
-                        id: i+'_'+j,
-                        seatNo: `${i}排${j}座`,
-                        status: 'Y',
-                        rowNo: i,
-                        colNo: j,
-                        key,
-                        sort: j,
-                    })
-                }
-            }
-            this.seatList = [].concat(list)
-
-            console.log("this.seatList ==",this.seatList)
-
-            this.dateSet()
-        },
 
-        /** 设置数据 -- 为自己想要的数据 */
-        dateSet(){
-            let tableList = []
-            let list = []
-
-            //  归类
-            let row = 20
-            let list_1 = []
-            let list_1_1 = []
-            for(let i = 1; i<=row;i++) {
-                list_1_1 = []
-                for(let j = 0;j < this.seatList.length;j++) {
-                    if(i == this.seatList[j].rowNo){
-                        list_1_1.push(JSON.parse(JSON.stringify(this.seatList[j])))
-                    }
-                }
-                list_1.push([].concat(list_1_1))
-            }
-            console.log("归类===",list_1)
-
-            //  每排分区归类
-            let list_2 = []
-            let list_2_1 = {} // 每一排
-            let list_2_2= []
-            let tableheader = JSON.parse(JSON.stringify(this.tableHeader))
-            for(let k = 0;k < row;k++) {
-                list_2_1 = {}
-                for(let i = 0; i < tableheader.length;i++) {
-                    tableheader[i]['width'] = 1
-                    list_2_2 = []
-                    for(let j = 0;j < list_1[k].length;j++) {
-                        if(tableheader[i].key == list_1[k][j].key){
-                            list_2_2.push(JSON.parse(JSON.stringify(list_1[k][j])))
-                        }
-                    }
-                    if(list_2_2.length>tableheader[i]['width']) {
-                        tableheader[i]['width'] = list_2_2.length
-                    }
-                    list_2_1[tableheader[i].key] = [].concat(list_2_2)
-                }
-                list_2.push(JSON.parse(JSON.stringify(list_2_1)))
-            }
-            console.log("每排分区归类===",list_2)
-            console.log("表头1===",tableheader)
-            //this.$set(this,"tableHeader",JSON.parse(JSON.stringify(tableheader)))
-            this.tableHeader = [].concat(JSON.parse(JSON.stringify(tableheader))) 
-            console.log("表头===",this.tableHeader)
-            this.tableData = [].concat(list_2)
+        /**  初始化数据  */
+        initData(list,type){
+            this.tableDataAll = JSON.parse(JSON.stringify(list))
+            //this.batchTableList = JSON.parse(JSON.stringify(list))
+            let listHeader = []
+            let listTabel = []
         },
-
-
-        initData(){
-            // 找到行的最大值
-            const rowMax = this.findObjInArrMax(this.arrList, 'rowNo', true);
-            // 找到列的最大值
-            const colMax = this.findObjInArrMax(this.arrList, 'colNo', true);
-            const rowNoMax = parseInt(rowMax.rowNo) + 1;
-            const colNoMax = parseInt(colMax.colNo) + 1;
-            // 将一维数组装成二维数组
-            let list = [];
-            for (var index = 0; index < rowNoMax; index++) {
-                list[index] = [];
-                for (var index1 = 0; index1 < colNoMax; index1++) {
-                    list[index][index1] = {};
+        dataProcess(){
+            let list = JSON.parse(JSON.stringify(this.tableDataAll))
+            let list1 = JSON.parse(JSON.stringify(this.tableData))
+            list.forEach((item,index)=>{
+                if(item.style && item.style.key) {
+                    list1[item.rowNo-1][item.style.key].push(item)
                 }
-            }
-            // 后端返回的数据组合到二维数组里面
-            list.forEach((item1, index1) => {
-                item1.forEach((item2, index2) => {
-                    this.arrList.forEach((item, index) => {
-                        item.isCheck = false;
-                        list[item.rowNo][item.colNo] = item;
-                    });
-                });
-            });
-            console.log('list', list);
-            this.seatList = list;
-        },
-        // 点击座位表
-        seatClk(item) {
-            // 如果是可以选择,而且没有选中状态
-            if (item.status === 'Y' && !item.isCheck) {
-                item.isCheck = true;
-            } else if (item.status === 'Y' && item.isCheck) {
-                item.isCheck = false;
-            }
-            console.log(item);
-            this.$forceUpdate();
-        },
-        // 找到数组对象中的最大值
-        findObjInArrMax(list, atr, returnVal) {
-            let res = Math.max.apply(
-                Math,
-                list.map((item) => {
-                    return item[atr];
-                })
-            );
-            if (returnVal) {
-                return list.filter((item) => {
-                    return item[atr] == res;
-                })[0];
-            } else {
-                return res;
-            }
-        },
-        // 找到数组对象中的最小值
-        findObjInArrMin(list, atr, returnVal) {
-            let res = Math.min.apply(
-                Math,
-                list.map((item) => {
-                    return item[atr];
-                })
-            );
-            if (returnVal) {
-                return list.filter((item) => {
-                    return item[atr] == res;
-                })[0];
-            } else {
-                return res;
-            }
-        },
-        showImage(item){
-            let src = ''
-            if(item.status === 'N'){
-                src = 'https://hijinka.oss-cn-shanghai.aliyuncs.com/uploads/mall1/20220307/669dde5d9fe28a377c151cadecb8dd65.png'
-            }else if(item.status === 'Y' && !item.isCheck){
-                src = 'https://hijinka.oss-cn-shanghai.aliyuncs.com/uploads/mall1/20220307/123044531581e70133020f0265bcabb2.png'
-            }else if(item.status === 'Y' && item.isCheck) {
-                src = 'https://hijinka.oss-cn-shanghai.aliyuncs.com/uploads/mall1/20220307/899c7f9e0365ce6d97f9d5fe89ffe878.png'
-            }
-            return src
+            })
+            this.tableData = JSON.parse(JSON.stringify(list1))
+            this.countRegionW()
         },
-
         /** tab 切换 右侧工具 */
-        handleClick(item){
+        handleClickTab(item){
             console.log("item====",item,this.activeName)
             if(this.activeName == 'batch') { // 批量操作
                 this.batchTableList = this.tableDataAll
@@ -741,7 +597,7 @@ export default {
                     length: 0,
                     width:0,
                 })
-                this.resetForm('ruleForm')
+                this.resetForm(formName)
                 if(this.rowAll) {
                     this.createTableList()
                 }
@@ -777,6 +633,7 @@ export default {
         // 编辑区域
         editTableHeader(item,index){
             this.formAllType = 'region'
+            this.formDialogVisibleTitle = "编辑区域"
             this.formDialogVisible = true
             this.$set(this,'formAll',JSON.parse(JSON.stringify({
                 index: index,
@@ -789,6 +646,9 @@ export default {
                 if (valid) {
                     if(this.formAllType == 'region'){
                         this.submitFormAll()
+                    }else if(this.formAllType == 'bindingregion'){
+                        console.log("sdfsdfsdfsdfds",this.formAll)
+                        this.batchBindingArea()
                     }
                 } else {
                     console.log('error submit!!');
@@ -866,10 +726,18 @@ export default {
             this.currentTabelList = list && list.length>0 ? JSON.parse(JSON.stringify(list)) : []
             console.log("row, column, cell, event===",row, column, cell, event)
         },
-        /**  点击创建座位   */
-        submitForm1(formName) {
+        /**  点击  创建座位   */
+        addSeat(formName) {
             this.$refs[formName].validate((valid) => {
             if (valid) {
+                if(!this.currentRow){
+                    this.$message({
+                        showClose: true,
+                        message: '请先选择某个区域,左键双击选择!!!',
+                        type: 'error'
+                    });
+                    return
+                }
                 let color = ''
                 let seatLabel = ''
                 this.seatTypeList.forEach((item,index)=>{
@@ -882,19 +750,32 @@ export default {
                     let list = []
                     let min = Number(this.ruleForm1.colMin)
                     let max = Number(this.ruleForm1.colMax)
-                    
+                    if(min>max){
+                        this.$message({
+                            showClose: true,
+                            message: '座位区间输入错误,应该前数小于后数!!!',
+                            type: 'error'
+                        });
+                        return
+                    }
+                    if(!this.checkRepeatSeat(min,max)){
+                        this.$message({
+                            showClose: true,
+                            message: '座位区间出现重复!!!',
+                            type: 'error'
+                        });
+                        return
+                    }
                     for(let i = min;i<=max;i++) {
                         list.push({
                             id: this.currentRow+"_"+this.currentProperty+"_"+i,
-                            seatNo: this.ruleForm1.name.replace('${row}',this.currentRow).replace('${col}',i),
+                            name: this.ruleForm1.name.replace('${row}',this.currentRow).replace('${col}',i),
                             status: this.ruleForm1.seatTypeId,
-                            rowNo: this.currentRow,
-                            colNo: i,
-                            sort: i,
-                           
                             style: {
-                                key: this.currentProperty,
-                                keyLabel: this.currentLabel
+                                key: this.currentProperty, // 所属区域的key
+                                keyLabel: this.currentLabel, // 所属区域的名称
+                                sort: 0,
+                                id: this.currentRow+"_"+this.currentProperty+"_"+i,
                             },
                             rowNo: this.currentRow,
                             columnNo: i,
@@ -905,7 +786,7 @@ export default {
                         })
                     }
                     this.tableDataAll = this.tableDataAll.concat(JSON.parse(JSON.stringify(list)))
-                    this.$set(this.tableData[this.currentRow-1],this.currentProperty,list)
+                    this.$set(this.tableData[this.currentRow-1],this.currentProperty,this.tableData[this.currentRow-1][this.currentProperty].concat(list))
                     this.currentTabelList = JSON.parse(JSON.stringify(this.tableData[this.currentRow-1][this.currentProperty]))
                 }else { // 单个
                     console.log("this.tableData=====",this.tableData)
@@ -913,11 +794,23 @@ export default {
                     let index = this.tableData[this.currentRow-1][this.currentProperty].length
                     let obj = {
                         id: this.currentRow+"_"+this.currentProperty+"_"+(index+1),
-                        seatNo: this.ruleForm1.name,
+                        name: this.ruleForm1.name,
                         status: this.ruleForm1.seatTypeId,
                         rowNo: this.currentRow,
-                        colNo: index+1,
-                        sort: index+1
+                        sort: index+1,
+
+                        style: {
+                            key: this.currentProperty, // 所属区域的key
+                            keyLabel: this.currentLabel, // 所属区域的名称
+                            sort: 0,
+                            id: this.currentRow+"_"+this.currentProperty+"_"+(index+1),
+                        },
+                        rowNo: this.currentRow,
+                        columnNo: index+1,
+                        seatTypeId: this.ruleForm1.seatTypeId,
+                        seatLabel: seatLabel,
+                        color: color,// 座位类型对应的颜色
+                        delFlag: 0,
                     }
                     this.tableData[this.currentRow-1][this.currentProperty].push(obj)
                     this.tableDataAll.push(JSON.parse(JSON.stringify(obj)))
@@ -931,6 +824,18 @@ export default {
             }
             });
         },
+        /**  检测座位 是否存在重复 */
+        checkRepeatSeat(min,max){
+            let list = this.tableData[this.currentRow-1][this.currentProperty]
+            if(!list||list.length<=0){ return true }
+            let flog = true
+            list.forEach((item)=>{
+                if(item.columnNo<=max&&item.columnNo>=min) {
+                    flog = false
+                }
+            })
+            return flog
+        },
         /**  清除创建座位的表单 */
         resetForm1(formName) {
             this.$refs[formName].resetFields();
@@ -941,8 +846,10 @@ export default {
             let list = JSON.parse(JSON.stringify(this.tableHeader))
             for(let i = 0; i < list.length; i++) {
                 for(let j = 0;j < this.tableData.length; j++) {
-                    if(list[i].length<this.tableData[j][list[i].key].length){
-                        list[i].length = this.tableData[j][list[i].key].length
+                    if(this.tableData[j][list[i].key] && this.tableData[j][list[i].key].length){
+                        if(list[i].length<this.tableData[j][list[i].key].length){
+                            list[i].length = this.tableData[j][list[i].key].length
+                        }
                     }
                 }
             }
@@ -985,18 +892,68 @@ export default {
         },
 
         /**  批量操作 */
+
+        // 批量选择
         handleSelectionChange(val){
+            console.log('this.multipleSelection====',val)
             this.multipleSelection = val;
         },
+        // 编辑区域
+        openFormDialogVisible(){
+            this.formAllType = 'bindingregion'
+            this.formDialogVisibleTitle = "批量修改区域"
+            this.formDialogVisible = true
+            this.$set(this,'formAll',JSON.parse(JSON.stringify({
+                status: null,
+            })))
+        },
+        // 批量绑定区域
+        batchBindingArea() {
+            let list = []
+            let currentLabel = ''
+            let listTabel = JSON.parse(JSON.stringify(this.tableDataAll))
+            this.tableHeader.forEach((item)=>{
+                if(item.key == this.formAll.status) {
+                    currentLabel = item.title
+                }
+            })
+            for(let i=0;i<this.multipleSelection.length;i++){
+                for(let j=0;j<this.tableDataAll.length;j++){
+                    if(this.multipleSelection[i].id == this.tableDataAll[j].id){
+                        listTabel[j] = {
+                        ...this.tableDataAll[j],
+                            style: {
+                                ...this.tableDataAll[j].style,
+                                key: this.formAll.status, // 所属区域的key
+                                keyLabel: currentLabel, // 所属区域的名称
+                            }
+                        }
+                        break;
+                    }    
+                }
+            }
+            this.tableDataAll = JSON.parse(JSON.stringify(listTabel))
+            console.log("this.tableDataAll=====",this.tableDataAll)
+            // this.batchTableList = JSON.parse(JSON.stringify(this.tableDataAll))
+            this.handleQuery()
+            this.dataProcess()
+        },
+        // 批量禁用
+        batchDisable() {
+
+        },
+
         /** 删选 */
         handleQuery(){
-            let list = []
-            if(!this.queryParams.menuName&&this.queryParams.status){
+           
+            if(!this.queryParams.menuName&&!this.queryParams.status){
                 this.batchTableList = this.tableDataAll
+                console.log("list====",this.queryParams)
             }else {
+                let list = []
                 this.tableDataAll.forEach((item,index)=>{
                     if(this.queryParams.menuName&&this.queryParams.status) {
-                        if(item.rowNo==this.queryParams.menuName && item.key == this.queryParams.status) {
+                        if(item.rowNo==this.queryParams.menuName && item.style.key == this.queryParams.status) {
                             list.push(item)
                         }
                     }else if(this.queryParams.menuName){
@@ -1004,16 +961,72 @@ export default {
                             list.push(item)
                         }
                     }else {
-                        if(item.key == this.queryParams.status) {
+                        if(item.style.key == this.queryParams.status) {
                             list.push(item)
                         }
                     }
                 })
-            }   
+                console.log("list====",list,this.queryParams)
+                this.batchTableList = list
+            }  
+             
         },
         resetQuery(){
             this.queryParams = {}
 
+        },
+
+        /** 座位排序  */
+        seatSortingFun(type){
+            let list = JSON.parse(JSON.stringify(this.currentTabelList))
+            if(type=='rise') { // 升序
+                list.sort(function(x,y){
+                    let num1 = x.columnNo
+                    let num2 = y.columnNo
+                    return num1 - num2
+                })
+            }
+            if(type=='fall') { // 降序
+                list.sort(function(x,y){
+                    let num1 = x.columnNo
+                    let num2 = y.columnNo
+                    return num2 - num1
+                })
+            }
+            if(type=='symmetry') { // 奇偶对称
+                let odd = []
+                let even = []
+                list.forEach((item,index)=>{
+                    if(item.columnNo%2==0){
+                        even.push(item)
+                    }else {
+                       odd.push(item)
+                    }
+                })
+
+                odd.sort(function(x,y){
+                    let num1 = x.columnNo
+                    let num2 = y.columnNo
+                    return num2 - num1
+                })
+                even.sort(function(x,y){
+                    let num1 = x.columnNo
+                    let num2 = y.columnNo
+                    return num1 - num2
+                })
+                list = odd.concat(even)
+            }
+            if(type=='reversal'){
+                list.reverse()
+            }
+            this.$set(this.tableData[this.currentRow-1],this.currentProperty,list)
+            this.currentTabelList = JSON.parse(JSON.stringify(this.tableData[this.currentRow-1][this.currentProperty]))
+        },
+
+        /**   保存座位   */
+        saveSeat() {
+            console.log('this.tableDataAll',this.tableDataAll)
+            this.$emit('saveSeat',this.tableDataAll)
         }
     }
 };
@@ -1251,25 +1264,17 @@ export default {
                 font-size: 14px;
                 font-weight: 600;
             }
-            
-            span:nth-child(2){
-                font-size: 12px;
-                margin-left: 10px;
-                background-color: #1890FF;
-                color: #fff;
-            }
-            span:nth-child(3){
-                font-size: 12px;
-                margin-left: 10px;
-                background-color: #1890FF;
-                color: #fff;
-            }
-            span:nth-child(4){
+            i {
                 font-size: 12px;
                 margin-left: 10px;
                 background-color: #1890FF;
                 color: #fff;
+                padding: 5px;
+                transform: scale(0.9);
+                border-radius: 5px;
+                cursor: pointer;
             }
+            
         }
         .qu-second-info-list {
             width: 100%;

+ 14 - 3
src/views/windowTicketSales/ticketingCollection.vue

@@ -1,7 +1,7 @@
 <template>
     <div class="app-container app-container-me">
       <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px">
-        <el-form-item label="订单号" label-width="100px">
+        <el-form-item label="订单号" label-width="80px">
           <el-input
             v-model="queryParams.orderId"
             placeholder="请输入订单号"
@@ -10,7 +10,7 @@
             @keyup.enter.native="handleQuery"
           />
         </el-form-item>
-        <el-form-item label="取票码" label-width="100px">
+        <el-form-item label="取票码" label-width="80px">
           <el-input
             v-model="queryParams.qrcodeNo"
             placeholder="请输入取票码"
@@ -39,6 +39,15 @@
             <el-button slot="append" :loading="idcardLoading" size="mini" type="primary" @click="readCert">{{ idcardLoading ? '识别中':'识别' }}</el-button>
           </el-input>
         </el-form-item>
+        <el-form-item label="座位号" label-width="80px">
+          <el-input
+            v-model="queryParams.seatName"
+            placeholder="请输入座位号"
+            clearable
+            style="width: 240px;"
+            @keyup.enter.native="handleQuery"
+          />
+        </el-form-item>
         <el-form-item label="订单状态">
           <el-select
             v-model="queryParams.orderStatus"
@@ -210,11 +219,12 @@
       /** 查询列表 */
       getList() {
         this.loading = true;
-        pageList(this.queryParams,)
+        pageList(this.queryParams)
         .then(response => {
             this.dataList = response.data.rows;
             this.total = response.data.total;
             this.loading = false;
+            console.log("this.multipleSelection=====",this.multipleSelection)
           }
         ).catch(()=>{
           this.dataList = []
@@ -239,6 +249,7 @@
         this.$set(this.queryParams, 'idcard', '');
         this.$set(this.queryParams, 'mobile', '');
         this.$set(this.queryParams, 'orderStatus', '');
+        this.$set(this.queryParams, 'seatName', '');
         this.handleQuery();
       },
       setRemark(data) {