|
@@ -15,6 +15,11 @@
|
|
|
<span :style="{backgroundColor: item.color}"></span>
|
|
|
<span :style="{color: item.color}">{{ item.name }}</span>
|
|
|
</div>
|
|
|
+ <div
|
|
|
+ >
|
|
|
+ <span :style="{backgroundColor: '#ccc'}"></span>
|
|
|
+ <span :style="{color: '#ccc'}">{{ "不可用" }}</span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="sm-box">
|
|
@@ -90,9 +95,9 @@
|
|
|
@contextmenu="(e)=>{e.preventDefault();openFormDialogVisible('singleEdit',item1)}"
|
|
|
>
|
|
|
<div>
|
|
|
- <i style="line-height: 15px;">{{ item1.columnNo }}</i>
|
|
|
- <i style="line-height: 15px;">{{ item1.name }}</i>
|
|
|
- <i style="line-height: 15px;white-space: nowrap;">{{ item1.styleCss && item1.styleCss.sort }}</i>
|
|
|
+ <i style="line-height: 15px;"></i>
|
|
|
+ <i style="line-height: 15px;">{{ item1.name ? item1.name : '未命名' }}</i>
|
|
|
+ <i style="line-height: 15px;white-space: nowrap;">{{ item1.rowNo+ '-' +item1.columnNo }} ({{ item1.priority ? item1.priority : '-' }})</i>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -146,16 +151,21 @@
|
|
|
<i @click="seatSortingFun('rise')">修改名称</i>
|
|
|
</div> -->
|
|
|
<div class="qu-second-info-list">
|
|
|
- <div
|
|
|
- class="qu-second-info-item"
|
|
|
- :key="index"
|
|
|
- v-for="(item,index) in currentTabelList">
|
|
|
- <div >
|
|
|
- <span>名称:{{ item.name }}</span>
|
|
|
- <span>优先级:{{ item.priority }}</span>
|
|
|
+ <transition-group>
|
|
|
+ <div
|
|
|
+ class="qu-second-info-item"
|
|
|
+ :key="index"
|
|
|
+ v-for="(item,index) in currentTabelList"
|
|
|
+ v-dragging="{item: item, list:currentTabelList}"
|
|
|
+ >
|
|
|
+ <div >
|
|
|
+ <span>名称:{{ item.name ? item.name :'未命名' }}</span>
|
|
|
+ <span>优先级:{{ item.priority ? item.priority : '-' }}</span>
|
|
|
+ </div>
|
|
|
+ <el-button type="primary" size="mini" @click="openFormDialogVisible('singleEdit',item)">编辑</el-button>
|
|
|
</div>
|
|
|
- <el-button type="primary" size="mini" @click="openFormDialogVisible('singleEdit',item)">编辑</el-button>
|
|
|
- </div>
|
|
|
+ </transition-group>
|
|
|
+
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -219,7 +229,7 @@
|
|
|
</div>
|
|
|
<div>
|
|
|
<el-button type="primary" :disabled="multipleSelection.length==0" size="mini" @click="openFormDialogVisible('batchSetaPriority')">优先级</el-button>
|
|
|
- <el-button type="danger" :disabled="multipleSelection.length==0" size="mini" @click="openFormDialogVisible('batchSetaDisable')">批量禁用</el-button>
|
|
|
+ <el-button type="danger" :disabled="multipleSelection.length==0" size="mini" @click="openFormDialogVisible('batchSetaDisable')">座位状态</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="qu-batch-table">
|
|
@@ -272,7 +282,7 @@
|
|
|
<el-button type="primary" :disabled="selectTabelList.length==0" size="mini" @click="openFormDialogVisible('selectBatchSetaPriority')">优先级</el-button>
|
|
|
</div>
|
|
|
<div>
|
|
|
- <el-button type="danger" :disabled="selectTabelList.length==0" size="mini" @click="openFormDialogVisible('selectBatchSetaDisable')">批量禁用</el-button>
|
|
|
+ <el-button type="danger" :disabled="selectTabelList.length==0" size="mini" @click="openFormDialogVisible('selectBatchSetaDisable')">座位状态</el-button>
|
|
|
<el-button type="info" :disabled="selectTabelList.length==0" size="mini" @click="delSelectTabelList">清除选择</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -370,7 +380,15 @@
|
|
|
<el-input v-model="formAll.setaPriorityNum" placeholder="等级数"></el-input>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
-
|
|
|
+ <div v-if="['batchSetaDisable','selectBatchSetaDisable'].indexOf(formAllType) !=-1">
|
|
|
+ <el-form-item label="座位状态" prop="status">
|
|
|
+ <el-radio-group v-model="formAll.status">
|
|
|
+ <el-radio :label="0">初始(该状态下不C端显示)</el-radio>
|
|
|
+ <el-radio :label="1">可用</el-radio>
|
|
|
+ <el-radio :label="2">不可用</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
<!-- 单个编辑 -->
|
|
|
<div v-if="['singleEdit'].indexOf(formAllType) !=-1">
|
|
|
<el-form-item label="座位名称" prop="name">
|
|
@@ -397,12 +415,12 @@
|
|
|
<el-radio :label="2">不可用</el-radio>
|
|
|
</el-radio-group>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="是否禁用" prop="delFlag">
|
|
|
+ <!-- <el-form-item label="是否禁用" prop="delFlag">
|
|
|
<el-radio-group v-model="formAll.delFlag">
|
|
|
<el-radio :label="0">禁用</el-radio>
|
|
|
<el-radio :label="1">启用</el-radio>
|
|
|
</el-radio-group>
|
|
|
- </el-form-item>
|
|
|
+ </el-form-item> -->
|
|
|
</div>
|
|
|
</el-form>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
@@ -535,7 +553,8 @@ export default {
|
|
|
|
|
|
this.$dragging.$on("dragged", (result) => {
|
|
|
// 将排序后的结果重新赋值
|
|
|
- this.tableHeader = [].concat(JSON.parse(JSON.stringify(result.value.list)))
|
|
|
+ //this.tableHeader = [].concat(JSON.parse(JSON.stringify(result.value.list)))
|
|
|
+ this.draggingSeatSort()
|
|
|
});
|
|
|
|
|
|
},
|
|
@@ -552,23 +571,23 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
//初始化排序
|
|
|
- initSortTable() {
|
|
|
- let that = this;
|
|
|
- this.sortable = new Sortable(document.getElementsByClassName('box-table')[0], {
|
|
|
- animation: 150,
|
|
|
- handle: '.drag-btn',
|
|
|
- onEnd: (e) => {
|
|
|
- // 获取排序之后的data数据
|
|
|
- that.ranking_goods.splice(e.newIndex, 0, that.ranking_goods.splice(e.oldIndex, 1)[0]);
|
|
|
- var newArray = that.ranking_goods.slice(0);
|
|
|
- that.ranking_goods = []
|
|
|
- that.$nextTick(function () {
|
|
|
- that.ranking_goods = newArray
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
+ // initSortTable() {
|
|
|
+ // let that = this;
|
|
|
+ // this.sortable = new Sortable(document.getElementsByClassName('box-table')[0], {
|
|
|
+ // animation: 150,
|
|
|
+ // handle: '.drag-btn',
|
|
|
+ // onEnd: (e) => {
|
|
|
+ // // 获取排序之后的data数据
|
|
|
+ // that.ranking_goods.splice(e.newIndex, 0, that.ranking_goods.splice(e.oldIndex, 1)[0]);
|
|
|
+ // var newArray = that.ranking_goods.slice(0);
|
|
|
+ // that.ranking_goods = []
|
|
|
+ // that.$nextTick(function () {
|
|
|
+ // that.ranking_goods = newArray
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // })
|
|
|
|
|
|
- },
|
|
|
+ // },
|
|
|
|
|
|
/** 初始化数据 */
|
|
|
async initData(row,list,type){
|
|
@@ -686,8 +705,8 @@ export default {
|
|
|
seatLabel: null,
|
|
|
sortId: j, // 排序号码
|
|
|
color: '#E6E6FA',// 座位类型对应的颜色
|
|
|
- delFlag: 0, // 座位是否可用
|
|
|
- priority: 9999, // 座位出票顺序 数字越小越优先
|
|
|
+ //delFlag: 0, // 座位是否可用
|
|
|
+ priority: '', // 座位出票顺序 数字越小越优先
|
|
|
status: 0, //0-初始(该状态下不C端显示) 1-可用 2-不可用
|
|
|
})
|
|
|
}
|
|
@@ -724,8 +743,8 @@ export default {
|
|
|
seatLabel: null,
|
|
|
sortId: j, // 排序号码
|
|
|
color: '#E6E6FA',// 座位类型对应的颜色
|
|
|
- delFlag: 0, // 座位是否可用
|
|
|
- priority: 9999, // 座位出票顺序 数字越小越优先
|
|
|
+ //delFlag: 0, // 座位是否可用
|
|
|
+ priority: '', // 座位出票顺序 数字越小越优先
|
|
|
status: 0, //0-初始(该状态下不C端显示) 1-可用 2-不可用
|
|
|
})
|
|
|
}
|
|
@@ -750,8 +769,8 @@ export default {
|
|
|
seatLabel: null,
|
|
|
sortId: this.colsAll, // 排序号码
|
|
|
color: '#E6E6FA',// 座位类型对应的颜色
|
|
|
- delFlag: 0, // 座位是否可用
|
|
|
- priority: 9999, // 座位出票顺序 数字越小越优先
|
|
|
+ //delFlag: 0, // 座位是否可用
|
|
|
+ priority: '', // 座位出票顺序 数字越小越优先
|
|
|
status: 0, //0-初始(该状态下不C端显示) 1-可用 2-不可用
|
|
|
})
|
|
|
}
|
|
@@ -894,8 +913,13 @@ export default {
|
|
|
setaPriorityNum: null,
|
|
|
})))
|
|
|
}
|
|
|
- if(type == 'batchSetaDisable') { // 批量禁用
|
|
|
+ if(type == 'batchSetaDisable') { // 座位状态
|
|
|
this.formAllType = 'batchSetaDisable'
|
|
|
+ this.formDialogVisibleTitle = "批量修改座位状态"
|
|
|
+ this.formDialogVisible = true
|
|
|
+ this.$set(this,'formAll',JSON.parse(JSON.stringify({
|
|
|
+ status: null,
|
|
|
+ })))
|
|
|
}
|
|
|
|
|
|
if(type == 'selectBatchSetaName') { // 座位名称
|
|
@@ -930,8 +954,13 @@ export default {
|
|
|
setaPriorityNum: null,
|
|
|
})))
|
|
|
}
|
|
|
- if(type == 'selectBatchSetaDisable') { // 批量禁用
|
|
|
+ if(type == 'selectBatchSetaDisable') { // 座位状态
|
|
|
this.formAllType = 'selectBatchSetaDisable'
|
|
|
+ this.formDialogVisibleTitle = "批量修改座位状态"
|
|
|
+ this.formDialogVisible = true
|
|
|
+ this.$set(this,'formAll',JSON.parse(JSON.stringify({
|
|
|
+ status: null,
|
|
|
+ })))
|
|
|
}
|
|
|
if(type == 'singleEdit') { // 单个编辑
|
|
|
console.log("data===",data)
|
|
@@ -961,7 +990,11 @@ export default {
|
|
|
this.selectBatchSetaPriorityFun()
|
|
|
}else if(this.formAllType == 'singleEdit') {
|
|
|
this.singleEditFun()
|
|
|
- }
|
|
|
+ }else if(this.formAllType == 'batchSetaDisable') {
|
|
|
+ this.batchSetaDisableFun()
|
|
|
+ }else if(this.formAllType == 'selectBatchSetaDisable') {
|
|
|
+ this.selectBatchSetaDisableFun()
|
|
|
+ }
|
|
|
} else {
|
|
|
console.log('error submit!!');
|
|
|
return false;
|
|
@@ -988,7 +1021,7 @@ export default {
|
|
|
seatLabel: seatLabel,
|
|
|
color: color,// 座位类型对应的颜色
|
|
|
status: this.formAll.status,
|
|
|
- delFlag: this.formAll.delFlag,
|
|
|
+ //delFlag: this.formAll.delFlag,
|
|
|
}
|
|
|
break;
|
|
|
}
|
|
@@ -996,9 +1029,26 @@ export default {
|
|
|
this.formDialogVisible = false
|
|
|
this.dataProcess()
|
|
|
},
|
|
|
- // 批量禁用
|
|
|
- batchDisable() {
|
|
|
-
|
|
|
+ // 座位状态
|
|
|
+ batchSetaDisableFun() {
|
|
|
+ let listTabel = JSON.parse(JSON.stringify(this.tableDataAll))
|
|
|
+ for(let i=0;i<this.multipleSelection.length;i++){
|
|
|
+ for(let j=0;j<this.tableDataAll.length;j++){
|
|
|
+ if(this.multipleSelection[i].styleCss.id == this.tableDataAll[j].styleCss.id){
|
|
|
+ listTabel[j] = {
|
|
|
+ ...this.tableDataAll[j],
|
|
|
+ status: this.formAll.status,
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.tableDataAll = JSON.parse(JSON.stringify(listTabel))
|
|
|
+ console.log("this.tableDataAll=====",this.tableDataAll)
|
|
|
+ // this.batchTableList = JSON.parse(JSON.stringify(this.tableDataAll))
|
|
|
+ this.formDialogVisible = false
|
|
|
+ this.handleQuery()
|
|
|
+ this.dataProcess()
|
|
|
},
|
|
|
//批量修改座位类型
|
|
|
batchSetaTypeFun() {
|
|
@@ -1190,10 +1240,56 @@ export default {
|
|
|
if(type=='reversal'){
|
|
|
list.reverse()
|
|
|
}
|
|
|
- this.$set(this.tableData[this.currentRow-1],this.currentProperty,list)
|
|
|
+
|
|
|
+ let listTabel = JSON.parse(JSON.stringify(this.tableDataAll))
|
|
|
+ for(let i=0;i<list.length;i++){
|
|
|
+ for(let j=0;j<this.tableDataAll.length;j++){
|
|
|
+ if(list[i].styleCss.id == this.tableDataAll[j].styleCss.id){
|
|
|
+ listTabel[j] = {
|
|
|
+ ...this.tableDataAll[j],
|
|
|
+ sortId: i,
|
|
|
+ styleCss: {
|
|
|
+ ...this.tableDataAll[j].styleCss,
|
|
|
+ sort: i,
|
|
|
+ }
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.tableDataAll = JSON.parse(JSON.stringify(listTabel))
|
|
|
+ console.log("this.tableDataAll=====",this.tableDataAll)
|
|
|
+ this.formDialogVisible = false
|
|
|
+ this.handleQuery()
|
|
|
+ this.dataProcess()
|
|
|
+ this.currentTabelList = JSON.parse(JSON.stringify(this.tableData[this.currentRow-1][this.currentProperty]))
|
|
|
+ },
|
|
|
+ // 拖动排序
|
|
|
+ draggingSeatSort(){
|
|
|
+ let list = JSON.parse(JSON.stringify(this.currentTabelList))
|
|
|
+ let listTabel = JSON.parse(JSON.stringify(this.tableDataAll))
|
|
|
+ for(let i=0;i<list.length;i++){
|
|
|
+ for(let j=0;j<this.tableDataAll.length;j++){
|
|
|
+ if(list[i].styleCss.id == this.tableDataAll[j].styleCss.id){
|
|
|
+ listTabel[j] = {
|
|
|
+ ...this.tableDataAll[j],
|
|
|
+ sortId: i,
|
|
|
+ styleCss: {
|
|
|
+ ...this.tableDataAll[j].styleCss,
|
|
|
+ sort: i,
|
|
|
+ }
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.tableDataAll = JSON.parse(JSON.stringify(listTabel))
|
|
|
+ console.log("this.tableDataAll=====",this.tableDataAll)
|
|
|
+ this.formDialogVisible = false
|
|
|
+ this.handleQuery()
|
|
|
+ this.dataProcess()
|
|
|
this.currentTabelList = JSON.parse(JSON.stringify(this.tableData[this.currentRow-1][this.currentProperty]))
|
|
|
},
|
|
|
-
|
|
|
|
|
|
|
|
|
/** 座位升序 赋值 */
|
|
@@ -1396,95 +1492,11 @@ export default {
|
|
|
width: 100%;
|
|
|
height: calc( 100% - 60px );
|
|
|
}
|
|
|
-}
|
|
|
-
|
|
|
-.qu-first-box {
|
|
|
- width: 100%;
|
|
|
- height: 100%;
|
|
|
- .qu-first-row {
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- }
|
|
|
|
|
|
- .qu-first-form {
|
|
|
+ ::v-deep .el-tab-pane {
|
|
|
width: 100%;
|
|
|
- height: 250px;
|
|
|
- overflow: hidden;
|
|
|
- padding-top: 10px;
|
|
|
+ height: 100%;
|
|
|
box-sizing: border-box;
|
|
|
- border-bottom: 1px solid #ccc;
|
|
|
- }
|
|
|
-
|
|
|
- .qu-first-info {
|
|
|
- width: 100%;
|
|
|
- height: calc( 100% - 250px );
|
|
|
- overflow: hidden;
|
|
|
- .qu-first-info-title {
|
|
|
- width: 100%;
|
|
|
- height: 25px;
|
|
|
- display: flex;
|
|
|
- align-items: flex-end;
|
|
|
- padding-bottom: 5px;
|
|
|
- span:first-child{
|
|
|
- font-size: 16px;
|
|
|
- }
|
|
|
- span:last-child{
|
|
|
- font-size: 12px;
|
|
|
- margin-left: 10px;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- .qu-first-info-list {
|
|
|
- width: 100%;
|
|
|
- height: calc( 100% - 30px );
|
|
|
- box-sizing: border-box;
|
|
|
- padding-right: 5px;
|
|
|
- overflow: hidden;
|
|
|
- overflow-y: auto;
|
|
|
- .qu-first-info-item {
|
|
|
- width: 100%;
|
|
|
- height: 40px;
|
|
|
- box-sizing: border-box;
|
|
|
- border: 1px solid #ccc;
|
|
|
- margin-bottom: 5px;
|
|
|
- display: flex;
|
|
|
- justify-content: space-between;
|
|
|
- align-items: center;
|
|
|
- font-size: 16px;
|
|
|
- border-radius: 10px;
|
|
|
- >span {
|
|
|
- width: 100%;
|
|
|
- height: 100%;
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- padding: 0 20px;
|
|
|
- font-weight: 600;
|
|
|
- }
|
|
|
- >div {
|
|
|
- display: flex;
|
|
|
- span {
|
|
|
- display: flex;
|
|
|
- padding: 0 10px;
|
|
|
- height: 100%;
|
|
|
- align-items: center;
|
|
|
- font-size: 12px;
|
|
|
- white-space: nowrap;
|
|
|
- }
|
|
|
- span:first-child {
|
|
|
- color: #409eff;
|
|
|
- }
|
|
|
- span:last-child {
|
|
|
- color: #f56c6c;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- .qu-first-info-list::-webkit-scrollbar {
|
|
|
- width: 2px;
|
|
|
- }
|
|
|
- .qu-first-info-list::-webkit-scrollbar-track {
|
|
|
- background-color: #ccc;
|
|
|
- }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -1566,7 +1578,7 @@ export default {
|
|
|
}
|
|
|
.qu-second-info-list {
|
|
|
width: 100%;
|
|
|
- height: calc( 100% - 100px );
|
|
|
+ height: calc( 100% - 70px );
|
|
|
box-sizing: border-box;
|
|
|
padding-right: 5px;
|
|
|
overflow: hidden;
|
|
@@ -1644,7 +1656,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
.qu-batch-table {
|
|
|
- height: calc( 100% - 250px );
|
|
|
+ height: calc( 100% - 210px );
|
|
|
box-sizing: border-box;
|
|
|
}
|
|
|
}
|
|
@@ -1673,7 +1685,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
.qu-select-table {
|
|
|
- height: calc( 100% - 170px );
|
|
|
+ height: calc( 100% - 120px );
|
|
|
box-sizing: border-box;
|
|
|
}
|
|
|
}
|