|
@@ -79,7 +79,12 @@
|
|
|
<div class="seat-tool-box">
|
|
|
<span class="demonstration">座位大小</span>
|
|
|
<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 style="display: flex;margin-left: 20px;" v-if="seatMapList&&JSON.stringify(seatMapList) != '{}'">
|
|
|
<div>座位余量:</div>
|
|
@@ -94,13 +99,21 @@
|
|
|
</div>
|
|
|
<div class="seat-box" :style="{'--scaleNum': scaleNum/100}">
|
|
|
<!-- 选择座位 -->
|
|
|
- <div class="seat-list-box">
|
|
|
+ <div
|
|
|
+ class="seat-list-box">
|
|
|
<!-- 座位排版 -->
|
|
|
- <div id="seatbox-me" ref="seatbox" class="dialogss">
|
|
|
+ <div
|
|
|
+ id="sm-scroll-box_1"
|
|
|
+ ref="seatbox"
|
|
|
+ class="dialogss"
|
|
|
+ @mousedown="mousedownFun"
|
|
|
+ @mouseleave="mouseleaveFun"
|
|
|
+ >
|
|
|
<div class="dialogss-box" :style="{width: width*(scaleNum/100) + 'px', margin: justifyContent ? 'auto' : 'unset'}">
|
|
|
<div
|
|
|
style="width: 100%;position: absolute;"
|
|
|
- class="seat-box-class clearfix" v-if="seatMapList"
|
|
|
+ class="seat-box-class clearfix"
|
|
|
+ v-if="seatMapList"
|
|
|
>
|
|
|
<div
|
|
|
|
|
@@ -108,25 +121,39 @@
|
|
|
v-for="(item1, index1) in seatMapListKey"
|
|
|
:key="item1.key"
|
|
|
>
|
|
|
+ <!-- @click.stop="seatClick(item)" -->
|
|
|
<div
|
|
|
- class="seat-item-class"
|
|
|
+ class="seat-item-class seat-item-class_1"
|
|
|
:class="setSeatClass(item)"
|
|
|
v-for="(item, index) in seatMapList[item1.key]"
|
|
|
:style="{backgroundColor: item.color ? item.color : 'none'}"
|
|
|
- @click.stop="seatClick(item)"
|
|
|
+ :dragSelectId="item.id"
|
|
|
+ :index="item1.key +'_'+ index"
|
|
|
+
|
|
|
:key="index">
|
|
|
- <p class="text-class">{{ item.status != 1 ? '不可售':(item.name ? item.name : '暂未命名') }}</p>
|
|
|
+ <p
|
|
|
+ class="text-class"
|
|
|
+ :dragSelectId="item.id"
|
|
|
+ :index="item1.key +'_'+ index"
|
|
|
+ >{{ item.status != 1 ? '不可售':(item.name ? item.name : '暂未命名') }}</p>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
+
|
|
|
+ <!-- 鼠标拖拽出的遮罩 (定位为 position:absolute)-->
|
|
|
+ <!-- 遮罩最好是在绑定了mouseover事件的元素内部,并且不要阻止遮罩的冒泡事件。这样鼠标移到了遮罩上面,依然可以利用冒泡执行父元素的mouseover事件,就不会出现遮罩只能扩大,不能缩小的情况了(亲自试过) -->
|
|
|
+ <div id="moveSelected_1"></div>
|
|
|
</div>
|
|
|
<div style="margin-top: 5px; margin-left: 30px;display: flex;">
|
|
|
<div style="flex-shrink: 0;">
|
|
|
已勾选:{{ seatSelectList.length }}个座位
|
|
|
+ <el-button size="mini" type="warning" @click="clearSeatSelectListAll">清空已选座位</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
+
|
|
|
+
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -201,7 +228,7 @@
|
|
|
<!-- 座位排版 -->
|
|
|
<div class="dialog">
|
|
|
<div class="seat-box-class1 clearfix" v-if="seatMapList && seatMapList.length > 0">
|
|
|
- <div class="seat-item-class" :class="item.isDisabled ? 'disabled-class' : item.isSelect ? 'select-class' : ''" v-for="(item, index) in seatMapList" @click.stop="seatClick(item)" :key="index">
|
|
|
+ <div class="seat-item-class" :class="item.isDisabled ? 'disabled-class' : item.isSelect ? 'select-class' : ''" v-for="(item, index) in seatMapList" @click="seatClick(item)" :key="index">
|
|
|
<p class="text-class">{{item.name ? item.name : (item.rowNo + '排' + item.columnNo + '座')}}</p>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -230,6 +257,7 @@
|
|
|
import { getSelectById, teamApplyAudit, querySeatList } from '@/api/team/applicationMr'
|
|
|
import { updateStatus } from '@/api/team/ticketMr'
|
|
|
import { pageList as getSeatType } from '@/api/seatTypeMr/seatTypeMr'
|
|
|
+import selectListMixin from "../mixins/selectList"
|
|
|
export default {
|
|
|
name: "applicationDetails",
|
|
|
props: {
|
|
@@ -238,6 +266,7 @@ export default {
|
|
|
default: () => [],
|
|
|
},
|
|
|
},
|
|
|
+ mixins: [selectListMixin],
|
|
|
data() {
|
|
|
return {
|
|
|
title: "编辑",
|
|
@@ -310,13 +339,17 @@ export default {
|
|
|
this.querySeatListS = [];
|
|
|
this.setList = [];
|
|
|
this.seatSelectList = [];
|
|
|
+ this.flag = false
|
|
|
+ this.isMousemovs = false
|
|
|
if(type) {
|
|
|
this.detailsType = true
|
|
|
this.title = '审核'
|
|
|
+
|
|
|
} else {
|
|
|
this.detailsType = false
|
|
|
this.title = '详情'
|
|
|
}
|
|
|
+
|
|
|
this.getSelectByIdApi(obj);
|
|
|
},
|
|
|
/** 获取详情 */
|
|
@@ -326,15 +359,20 @@ export default {
|
|
|
let res = await getSelectById(id)
|
|
|
this.details = {}
|
|
|
this.details = res.data;
|
|
|
- let res1 = await querySeatList({
|
|
|
- auditoriumId: this.applyMap.auditoriumId,
|
|
|
- //seatTypeId: this.applyMap.seatTypeId,
|
|
|
- timeId: this.applyMap.performTimeId,
|
|
|
- })
|
|
|
- this.querySeatListS = res1.data;
|
|
|
- this.setList = res1.data;
|
|
|
- if(this.setList && this.setList.length > 0) {
|
|
|
- this.setSeatMapListCopy(this.setList);
|
|
|
+ if(this.detailsType){
|
|
|
+ let res1 = await querySeatList({
|
|
|
+ auditoriumId: this.applyMap.auditoriumId,
|
|
|
+ //seatTypeId: this.applyMap.seatTypeId,
|
|
|
+ timeId: this.applyMap.performTimeId,
|
|
|
+ })
|
|
|
+ this.querySeatListS = res1.data;
|
|
|
+ this.setList = res1.data;
|
|
|
+ if(this.setList && this.setList.length > 0) {
|
|
|
+ this.setSeatMapListCopy(this.setList);
|
|
|
+ }
|
|
|
+ this.$nextTick(()=>{
|
|
|
+ this.scaleNumChange()
|
|
|
+ })
|
|
|
}
|
|
|
this.initLoading = false
|
|
|
} catch (error) {
|
|
@@ -390,35 +428,55 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
// 座位点击事件
|
|
|
- seatClickCopy(row) {
|
|
|
- if(row.isDisabled){
|
|
|
- return false
|
|
|
- }
|
|
|
- if(this.seatSelectList.length >= this.details.viewersList.length ){
|
|
|
- if(row.isSelect) {
|
|
|
- let indexs = null;
|
|
|
- this.seatSelectList.forEach((item, index) =>{
|
|
|
- if(item.id == row.id){
|
|
|
- indexs = index;
|
|
|
+ seatClickCopy(rowCopy) {
|
|
|
+ let row = JSON.parse(JSON.stringify(rowCopy))
|
|
|
+ console.log("row111===",row)
|
|
|
+ if(row.occupyStatus == 0){
|
|
|
+ console.log("weqwrwerewrer")
|
|
|
+ this.$confirm('此座已被锁定,请先解锁', '提示', {
|
|
|
+ confirmButtonText: '关闭',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ //this.lockOrUnLockFun([row],1)
|
|
|
+ }).catch((error) => {
|
|
|
+ console.log("error====",error)
|
|
|
+ });
|
|
|
+ }else if(row.isDisabled || row.status == 2){
|
|
|
+ return false
|
|
|
+ }else {
|
|
|
+ if(this.applyMap.seatTypeId != row.seatTypeId){
|
|
|
+ this.$message.error('只能选同一类型的座位');
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ row.isSelect = !row.isSelect
|
|
|
+ if(row.isSelect){
|
|
|
+ if(this.seatSelectList.length >= this.details.viewersList.length ){
|
|
|
+ this.$message.error("观影人数限制" + this.details.viewersList.length + "人!");
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ this.seatSelectList.push(JSON.parse(JSON.stringify(row)))
|
|
|
+ }else {
|
|
|
+ let indexs = null;
|
|
|
+ this.seatSelectList.forEach((item, index) =>{
|
|
|
+ if(item.id == row.id){
|
|
|
+ indexs = index;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ if(indexs != null) {
|
|
|
+ this.seatSelectList.splice(indexs, 1)
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ //this.seatSelectList = this.setList.filter(item => item.isSelect);
|
|
|
+ console.log("this.seatSelectList===",this.seatSelectList)
|
|
|
+ //this.$forceUpdate()
|
|
|
+ return true
|
|
|
}
|
|
|
- })
|
|
|
- if(indexs != null) {
|
|
|
- row.isSelect = !row.isSelect;
|
|
|
- this.seatSelectList.splice(indexs, 1)
|
|
|
- }
|
|
|
- } else {
|
|
|
- this.$message.error("观影人数限制" + this.details.viewersList.length + "人!");
|
|
|
- }
|
|
|
- return false
|
|
|
- }
|
|
|
- row.isSelect = !row.isSelect
|
|
|
- this.seatSelectList.push(JSON.parse(JSON.stringify(row)))
|
|
|
- //this.seatSelectList = this.setList.filter(item => item.isSelect);
|
|
|
- console.log("this.seatSelectList===",this.seatSelectList)
|
|
|
- this.$forceUpdate()
|
|
|
+
|
|
|
},
|
|
|
seatClick(row) {
|
|
|
- console.log(row)
|
|
|
+ console.log("row===",row)
|
|
|
if(row.occupyStatus == 0){
|
|
|
console.log("weqwrwerewrer")
|
|
|
this.$confirm('此座已被锁定,请先解锁', '提示', {
|
|
@@ -434,7 +492,7 @@ export default {
|
|
|
return false
|
|
|
}else {
|
|
|
if(this.applyMap.seatTypeId != row.seatTypeId){
|
|
|
- this.$message.error('只能选同一类型得座位');
|
|
|
+ this.$message.error('只能选同一类型的座位');
|
|
|
return
|
|
|
}
|
|
|
if(this.seatSelectList.length >= this.details.viewersList.length ){
|
|
@@ -455,7 +513,19 @@ export default {
|
|
|
return false
|
|
|
}
|
|
|
row.isSelect = !row.isSelect
|
|
|
- this.seatSelectList.push(JSON.parse(JSON.stringify(row)))
|
|
|
+ if(row.isSelect){
|
|
|
+ this.seatSelectList.push(JSON.parse(JSON.stringify(row)))
|
|
|
+ }else {
|
|
|
+ let indexs = null;
|
|
|
+ this.seatSelectList.forEach((item, index) =>{
|
|
|
+ if(item.id == row.id){
|
|
|
+ indexs = index;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ if(indexs != null) {
|
|
|
+ this.seatSelectList.splice(indexs, 1)
|
|
|
+ }
|
|
|
+ }
|
|
|
//this.seatSelectList = this.setList.filter(item => item.isSelect);
|
|
|
console.log("this.seatSelectList===",this.seatSelectList)
|
|
|
this.$forceUpdate()
|
|
@@ -591,7 +661,7 @@ export default {
|
|
|
this.width = 70*flog
|
|
|
this.$nextTick(()=>{
|
|
|
if(this.$refs.seatbox) {
|
|
|
- var ele = document.getElementById('seatbox-me');
|
|
|
+ var ele = this.$refs.seatbox
|
|
|
console.log(ele.getBoundingClientRect().width); // 100
|
|
|
if(this.width<ele.getBoundingClientRect().width) {
|
|
|
this.justifyContent = true
|
|
@@ -632,12 +702,11 @@ export default {
|
|
|
/** 座位状态 展示 */
|
|
|
setSeatClass(item){
|
|
|
let srt =
|
|
|
- item.seatTypeId != this.applyMap.seatTypeId?'disabled-class':
|
|
|
item.occupyStatus == 0 ? 'occupy-status' :
|
|
|
item.occupyStatus == 1 ? 'occupy-status-no' :
|
|
|
item.isDisabled || item.status != 1 ? 'disabled-class' :
|
|
|
- item.isSelect ? 'select-class' : ''
|
|
|
- console.log("srt=====",srt)
|
|
|
+ item.isSelect ? 'select-class' :
|
|
|
+ item.seatTypeId != this.applyMap.seatTypeId?'disabled-class':''
|
|
|
return srt
|
|
|
}
|
|
|
},
|
|
@@ -844,7 +913,7 @@ export default {
|
|
|
overflow: auto;
|
|
|
border-radius: 10px;
|
|
|
border: 1px solid #323333;
|
|
|
-
|
|
|
+ position: relative;
|
|
|
.dialogss-box {
|
|
|
position: relative;
|
|
|
}
|
|
@@ -955,5 +1024,12 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+#moveSelected_1{
|
|
|
+ position:absolute;
|
|
|
+ background-color: blue;
|
|
|
+ opacity:0.3;
|
|
|
+ border:1px dashed #d9d9d9;
|
|
|
+ top:0;
|
|
|
+ left:0;
|
|
|
+}
|
|
|
</style>
|