|
@@ -73,7 +73,12 @@
|
|
<div class="seat-tool-box">
|
|
<div class="seat-tool-box">
|
|
<span class="demonstration">座位大小</span>
|
|
<span class="demonstration">座位大小</span>
|
|
<div class="seat-tool-box-slider">
|
|
<div class="seat-tool-box-slider">
|
|
- <el-slider v-model="scaleNum" :min="30" :max="100"></el-slider>
|
|
|
|
|
|
+ <el-slider
|
|
|
|
+ v-model="scaleNum"
|
|
|
|
+ :min="30"
|
|
|
|
+ :max="100"
|
|
|
|
+ @change="scaleNumChange"
|
|
|
|
+ ></el-slider>
|
|
</div>
|
|
</div>
|
|
<div style="display: flex;margin-left: 20px;" v-if="seatMapList&&JSON.stringify(seatMapList) != '{}'">
|
|
<div style="display: flex;margin-left: 20px;" v-if="seatMapList&&JSON.stringify(seatMapList) != '{}'">
|
|
<div>各类型座位的剩余数量:</div>
|
|
<div>各类型座位的剩余数量:</div>
|
|
@@ -88,13 +93,27 @@
|
|
</div>
|
|
</div>
|
|
<div class="seat-box" :style="{'--scaleNum': scaleNum/100}">
|
|
<div class="seat-box" :style="{'--scaleNum': scaleNum/100}">
|
|
<!-- 选择座位 -->
|
|
<!-- 选择座位 -->
|
|
- <div class="seat-list-box" v-loading="loading">
|
|
|
|
|
|
+ <div
|
|
|
|
+ class="seat-list-box"
|
|
|
|
+
|
|
|
|
+ v-loading="loading">
|
|
<!-- 座位排版 -->
|
|
<!-- 座位排版 -->
|
|
- <div id="seatbox-me" ref="seatbox" class="dialog">
|
|
|
|
- <div class="dialog-box" :style="{width: width*(scaleNum/100) + 'px', margin: justifyContent ? 'auto' : 'unset'}">
|
|
|
|
|
|
+ <div
|
|
|
|
+ id="sm-scroll-box"
|
|
|
|
+ ref="seatbox"
|
|
|
|
+ class="dialog"
|
|
|
|
+ @mousedown="mousedownFun"
|
|
|
|
+ @mouseleave="mouseleaveFun"
|
|
|
|
+ @scroll="scrollFun"
|
|
|
|
+ >
|
|
|
|
+ <div
|
|
|
|
+ class="dialog-box"
|
|
|
|
+ :style="{width: width*(scaleNum/100) + 'px', margin: justifyContent ? 'auto' : 'unset'}"
|
|
|
|
+ >
|
|
<div
|
|
<div
|
|
style="width: 100%;position: absolute;"
|
|
style="width: 100%;position: absolute;"
|
|
- class="seat-box-class clearfix" v-if="seatMapList"
|
|
|
|
|
|
+ class="seat-box-class clearfix"
|
|
|
|
+ v-if="seatMapList"
|
|
>
|
|
>
|
|
<div
|
|
<div
|
|
|
|
|
|
@@ -108,23 +127,33 @@
|
|
v-for="(item, index) in seatMapList[item1.key]"
|
|
v-for="(item, index) in seatMapList[item1.key]"
|
|
:style="{backgroundColor: item.color ? item.color : 'none'}"
|
|
:style="{backgroundColor: item.color ? item.color : 'none'}"
|
|
@click.stop="seatClick(item)"
|
|
@click.stop="seatClick(item)"
|
|
|
|
+ :dragSelectId="item.id"
|
|
|
|
+ :index="item1.key +'_'+ index"
|
|
:key="index">
|
|
:key="index">
|
|
- <p class="text-class">{{ item.status != 1 ? '不可售':(item.name ? item.name : '暂未命名') }}</p>
|
|
|
|
|
|
+ <p
|
|
|
|
+ class="text-class"
|
|
|
|
+ >{{ item.status != 1 ? '不可售':(item.name ? item.name : '暂未命名') }}</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
+
|
|
|
|
+ <!-- 鼠标拖拽出的遮罩 (定位为 position:absolute)-->
|
|
|
|
+ <!-- 遮罩最好是在绑定了mouseover事件的元素内部,并且不要阻止遮罩的冒泡事件。这样鼠标移到了遮罩上面,依然可以利用冒泡执行父元素的mouseover事件,就不会出现遮罩只能扩大,不能缩小的情况了(亲自试过) -->
|
|
|
|
+ <div id="moveSelected"></div>
|
|
</div>
|
|
</div>
|
|
<div style="margin-top: 5px; margin-left: 30px;display: flex;">
|
|
<div style="margin-top: 5px; margin-left: 30px;display: flex;">
|
|
<div style="flex-shrink: 0;">
|
|
<div style="flex-shrink: 0;">
|
|
已勾选:{{ seatSelectList.length }}个座位
|
|
已勾选:{{ seatSelectList.length }}个座位
|
|
|
|
+ <el-button size="mini" type="warning" @click="clearSeatSelectListAll">清空已选座位</el-button>
|
|
</div>
|
|
</div>
|
|
<div style="width: 100%;display: flex;justify-content: center;height: 30px;">
|
|
<div style="width: 100%;display: flex;justify-content: center;height: 30px;">
|
|
<el-button size="mini" type="warning" :loading="lockOrUnLockLoading" @click="lockOrUnLockFun(seatSelectList,0)">锁定</el-button>
|
|
<el-button size="mini" type="warning" :loading="lockOrUnLockLoading" @click="lockOrUnLockFun(seatSelectList,0)">锁定</el-button>
|
|
<el-button size="mini" type="primary" @click="increaseViewersFun">预约</el-button>
|
|
<el-button size="mini" type="primary" @click="increaseViewersFun">预约</el-button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+
|
|
</div>
|
|
</div>
|
|
<div class="seat-select-box">
|
|
<div class="seat-select-box">
|
|
<div class="seat-select-box-top">
|
|
<div class="seat-select-box-top">
|
|
@@ -174,11 +203,13 @@
|
|
import increaseViewers from "./model/increaseViewers"
|
|
import increaseViewers from "./model/increaseViewers"
|
|
import moment from "moment"
|
|
import moment from "moment"
|
|
import { pageList as getSeatType } from '@/api/seatTypeMr/seatTypeMr'
|
|
import { pageList as getSeatType } from '@/api/seatTypeMr/seatTypeMr'
|
|
- export default {
|
|
|
|
|
|
+ import selectListMixin from "./mixins/selectList"
|
|
|
|
+ export default {
|
|
name: "TicketingSales1",
|
|
name: "TicketingSales1",
|
|
components: {
|
|
components: {
|
|
increaseViewers
|
|
increaseViewers
|
|
},
|
|
},
|
|
|
|
+ mixins: [selectListMixin],
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
// 遮罩层
|
|
// 遮罩层
|
|
@@ -192,7 +223,7 @@
|
|
},
|
|
},
|
|
rules: {
|
|
rules: {
|
|
auditoriumId: [
|
|
auditoriumId: [
|
|
- { required: true, message: '请选择选择演出厅', trigger: ['blur','change'] }
|
|
|
|
|
|
+ { required: true, message: '请选择演出厅', trigger: ['blur','change'] }
|
|
],
|
|
],
|
|
performDate: [
|
|
performDate: [
|
|
{ required: true, message: '请选择时间', trigger: ['blur','change'] }
|
|
{ required: true, message: '请选择时间', trigger: ['blur','change'] }
|
|
@@ -210,7 +241,7 @@
|
|
goodsPageListS: [], // 票务
|
|
goodsPageListS: [], // 票务
|
|
goodsPageListSAll: [], // 票务全部
|
|
goodsPageListSAll: [], // 票务全部
|
|
setList: [],
|
|
setList: [],
|
|
- seatMapList: [],
|
|
|
|
|
|
+ seatMapList: {},
|
|
seatMapListKey: [], // key
|
|
seatMapListKey: [], // key
|
|
seatSelectList: [],
|
|
seatSelectList: [],
|
|
|
|
|
|
@@ -284,6 +315,7 @@
|
|
param.status = 1;
|
|
param.status = 1;
|
|
let res = await merchantPerformTimeList(param)
|
|
let res = await merchantPerformTimeList(param)
|
|
if(res.code == 200){
|
|
if(res.code == 200){
|
|
|
|
+ console.log('merchantPerformTimeListS',res.data.rows);
|
|
this.merchantPerformTimeListS = res.data.rows
|
|
this.merchantPerformTimeListS = res.data.rows
|
|
}
|
|
}
|
|
} catch (error) {
|
|
} catch (error) {
|
|
@@ -332,6 +364,8 @@
|
|
try {
|
|
try {
|
|
this.loading = true
|
|
this.loading = true
|
|
this.performId = ''
|
|
this.performId = ''
|
|
|
|
+ this.screenTop = 0
|
|
|
|
+ this.scrollLeft = 0
|
|
if(type) { // 是否清除已选
|
|
if(type) { // 是否清除已选
|
|
this.seatSelectList = []
|
|
this.seatSelectList = []
|
|
}
|
|
}
|
|
@@ -399,7 +433,7 @@
|
|
this.width = 70*flog
|
|
this.width = 70*flog
|
|
this.$nextTick(()=>{
|
|
this.$nextTick(()=>{
|
|
if(this.$refs.seatbox) {
|
|
if(this.$refs.seatbox) {
|
|
- var ele = document.getElementById('seatbox-me');
|
|
|
|
|
|
+ var ele = this.$refs.seatbox
|
|
console.log(ele.getBoundingClientRect().width); // 100
|
|
console.log(ele.getBoundingClientRect().width); // 100
|
|
if(this.width<ele.getBoundingClientRect().width) {
|
|
if(this.width<ele.getBoundingClientRect().width) {
|
|
this.justifyContent = true
|
|
this.justifyContent = true
|
|
@@ -500,7 +534,7 @@
|
|
handleQuery() {
|
|
handleQuery() {
|
|
this.$refs.queryForm.validate((valid) => {
|
|
this.$refs.queryForm.validate((valid) => {
|
|
if (valid) {
|
|
if (valid) {
|
|
- this.querySeatListFun();
|
|
|
|
|
|
+ this.querySeatListFun(true);
|
|
} else {
|
|
} else {
|
|
console.log('error submit!!');
|
|
console.log('error submit!!');
|
|
return false;
|
|
return false;
|
|
@@ -516,11 +550,12 @@
|
|
this.seatMapList = {}
|
|
this.seatMapList = {}
|
|
this.seatList = []
|
|
this.seatList = []
|
|
this.handleQuery();
|
|
this.handleQuery();
|
|
|
|
+
|
|
},
|
|
},
|
|
|
|
|
|
// 座位点击事件
|
|
// 座位点击事件
|
|
seatClick(row) {
|
|
seatClick(row) {
|
|
- console.log(row)
|
|
|
|
|
|
+ console.log("是的发给我大是个的风格====",row)
|
|
if(row.occupyStatus == 0){
|
|
if(row.occupyStatus == 0){
|
|
console.log("weqwrwerewrer")
|
|
console.log("weqwrwerewrer")
|
|
this.$confirm('此座已被锁定,请先解锁', '提示', {
|
|
this.$confirm('此座已被锁定,请先解锁', '提示', {
|
|
@@ -556,23 +591,29 @@
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
- this.$forceUpdate()
|
|
|
|
|
|
+ //this.$forceUpdate()
|
|
}
|
|
}
|
|
|
|
|
|
},
|
|
},
|
|
/** 删除已选座位 */
|
|
/** 删除已选座位 */
|
|
delSeatSelect(row){
|
|
delSeatSelect(row){
|
|
- row.isSelect = !row.isSelect
|
|
|
|
- if(row.isSelect){
|
|
|
|
- this.seatSelectList.push(JSON.parse(JSON.stringify(row)))
|
|
|
|
- }else {
|
|
|
|
- let list = JSON.parse(JSON.stringify(this.seatSelectList))
|
|
|
|
- list.forEach((item,index)=>{
|
|
|
|
- if(item.id == row.id) {
|
|
|
|
- this.seatSelectList.splice(index, 1)
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
|
|
+ // row.isSelect = !row.isSelect
|
|
|
|
+ // if(row.isSelect){
|
|
|
|
+ // this.seatSelectList.push(JSON.parse(JSON.stringify(row)))
|
|
|
|
+ // }else {
|
|
|
|
+ // let list = JSON.parse(JSON.stringify(this.seatSelectList))
|
|
|
|
+ // list.forEach((item,index)=>{
|
|
|
|
+ // if(item.id == row.id) {
|
|
|
|
+ // this.seatSelectList.splice(index, 1)
|
|
|
|
+ // }
|
|
|
|
+ // })
|
|
|
|
+ // }
|
|
|
|
+ let list = JSON.parse(JSON.stringify(this.seatSelectList))
|
|
|
|
+ list.forEach((item,index)=>{
|
|
|
|
+ if(item.id == row.id) {
|
|
|
|
+ this.seatSelectList.splice(index, 1)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
Object.keys(this.seatMapList).forEach((item1,index)=>{
|
|
Object.keys(this.seatMapList).forEach((item1,index)=>{
|
|
this.seatMapList[item1].forEach((item,index)=>{
|
|
this.seatMapList[item1].forEach((item,index)=>{
|
|
if(item.id == row.id) {
|
|
if(item.id == row.id) {
|
|
@@ -747,7 +788,7 @@
|
|
overflow: auto;
|
|
overflow: auto;
|
|
border-radius: 10px;
|
|
border-radius: 10px;
|
|
border: 1px solid #323333;
|
|
border: 1px solid #323333;
|
|
-
|
|
|
|
|
|
+ position: relative;
|
|
.dialog-box {
|
|
.dialog-box {
|
|
position: relative;
|
|
position: relative;
|
|
}
|
|
}
|
|
@@ -842,6 +883,7 @@
|
|
user-select: none;
|
|
user-select: none;
|
|
// transform-origin: 50% 50%;
|
|
// transform-origin: 50% 50%;
|
|
// transform: scale(var(--scaleNum));
|
|
// transform: scale(var(--scaleNum));
|
|
|
|
+ z-index: 999;
|
|
&:hover{
|
|
&:hover{
|
|
opacity: 0.6;
|
|
opacity: 0.6;
|
|
}
|
|
}
|
|
@@ -856,4 +898,13 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ #moveSelected{
|
|
|
|
+ position:absolute;
|
|
|
|
+ background-color: blue;
|
|
|
|
+ opacity:0.3;
|
|
|
|
+ border:1px dashed #d9d9d9;
|
|
|
|
+ top:0;
|
|
|
|
+ left:0;
|
|
|
|
+}
|
|
</style>
|
|
</style>
|