作者 mxd

选择座位

<template>
<view class="wrap_box">
<!-- <uParse v-if="datas" :content="datas"></uParse> -->
<view class="tel_index_bg"></view>
<view class="wrap_box">
<view class="course-info" v-if="datas.info">
<view class="course-info-title">
<text class="classroom">{{datas.info.pid}}</text>
<view class="tit">
{{datas.info.title}}
</view>
</view>
<view class="course-info-content">
课程详情:{{datas.info.content}}
</view>
</view>
<view class="vio_list">
<view class="main_list">
<view v-if="datas.info" class="main_top">
<view class="main_tit">
{{datas.info.title}} <text>{{datas.info.pid}}</text>
<movable-area class="main_center">
<movable-view class="movable-view" :style="{width:datas.width*40+'rpx'}" :out-of-bounds="true" :scale="true" :x="x+'rpx'" :y="y" direction="all" @change="onChange">
<view v-if="datas.list" class="seat_list_box">
<view v-if="datas.info.pid=='1号教室'" class="seat_d1 seat_d2 dis_flex aic ju_c" >
<image class="jt4" src="/static/images/jt4.png" mode="widthFix"></image>
</view>
<view class="">
课程详情:{{datas.info.content}}
<view v-else class="seat_d1 dis_flex aic ju_c" :style="{width:datas.width*40+'rpx'}">
<image class="jt3" src="/static/images/seat_dais.png" mode="aspectFill"></image>
</view>
</view>
<movable-area class="main_center">
<!-- <movable-view class="seat_list" :scale="true" :x="x" :y="y" direction="all" @change="onChange">
<view class="seat_d1 dis_flex aic ju_c">
<image src="/static/images/seat_dais.png" mode="aspectFill"></image>
</view>
<view class="zw_list">
<text class="icon icon-zuowei zw_li" v-for="(item,index) in 10"></text>
</view>
</movable-view> -->
<movable-view class="movable-view" :style="{width:datas.width*40+'rpx'}" :out-of-bounds="true" :scale="true" :x="x+'rpx'" :y="y" direction="all" @change="onChange">
<view v-if="datas.list" class="seat_list_box">
<view v-if="datas.info.pid=='1号教室'" class="seat_d1 seat_d2 dis_flex aic ju_c" >
<image class="jt4" src="/static/images/jt4.png" mode="widthFix"></image>
</view>
<view v-else class="seat_d1 dis_flex aic ju_c" :style="{width:datas.width*40+'rpx'}">
<image class="jt3" src="/static/images/seat_dais.png" mode="aspectFill"></image>
</view>
<view class="zw_list" :style="{width:datas.width*40+'rpx'}">
<view class="zw_li_box dis_flex aic ju_c" v-for="(item,index) in datas.list">
<block v-if="item.type==1">
<text v-if="item.is_check==1" class="icon icon-zuowei zw_li" style="color: #ff5151;"></text>
<text v-else-if="index==my_seat_index" class="icon icon-zuowei zw_li" style="color: #ff9000;" @click="my_seat_index='-1'"></text>
<text v-else class="icon icon-zuowei zw_li" @click="my_seat_index=index"></text>
</block>
<block v-if="item.type==9">
<text class="icon icon-zuowei zw_li" style="color: #c4c4c4;"></text>
</block>
</view>
</view>
<view class="zw_list" :style="{width:datas.width*40+'rpx'}">
<view class="zw_li_box dis_flex aic ju_c" v-for="(item,index) in datas.list">
<block v-if="item.type==1">
<text v-if="item.is_check==1" class="icon icon-zuowei zw_li" style="color: #ff5151;"></text>
<text v-else-if="index==my_seat_index" class="icon icon-zuowei zw_li" style="color: #ff9000;" @click="my_seat_index='-1'"></text>
<text v-else class="icon icon-zuowei zw_li" @click="my_seat_index=index"></text>
</block>
<block v-if="item.type==9">
<text class="icon icon-zuowei zw_li" style="color: #c4c4c4;"></text>
</block>
</view>
</movable-view>
</movable-area>
<view class="my_seat">
<view class="">你选的座位</view>
<text class="">{{my_seat_index==-1?'':datas.list[my_seat_index].title}}</text>
</view>
</view>
<view class="bz_add" >
<view @click="save_fuc" data-url="/pagesA/stu_bz_edit/stu_bz_edit">
确认选座
</view>
</view>
</movable-view>
</movable-area>
<view class="my_seat">
<view class="">你选的座位</view>
<text v-show="my_seat_index != -1">{{datas.list[my_seat_index].title}}</text>
</view>
<view class="bz_add" >
<view @click="save_fuc" data-url="/pagesA/stu_bz_edit/stu_bz_edit">
确认选座
</view>
</view>
<!-- 阻止滑动 -->
<!-- <view @touchmove.stop.prevent='test'></view> -->
</view>
</template>
... ... @@ -1222,176 +1210,56 @@
// #ifdef H5
min-height: calc(100vh - 44px);
// #endif
background: #F8F8F8;
position: relative;
}
.tel_index_bg {
position: absolute;
top: 0;
z-index: 1;
width: 100%;
min-height: 220rpx;
background: linear-gradient(0deg, #f8f8f8 0%, #5D9DFD 60%, #428EFE 70%, #2D81FF 100%);
}
.top_tabs{
width: 100%;
}
.vip_tab_list{
// padding: 0 30rpx;
}
.vip_tab_li{
height: 90rpx;
display: inline-flex;
align-items: center;
font-size: 30rpx;
color: #FFFFFF;
opacity: 0.6;
position: relative;
&+.vip_tab_li{
margin-left: 50rpx;
}
&.active{
opacity: 1;
&:after{
content: '';
position: absolute;
bottom: 0;
left: 50%;
margin-left: -18rpx;
width: 36rpx;
height: 6rpx;
background: #FFFFFF;
border-radius: 3rpx;
}
}
}
.vio_sx{
height: 100rpx;
justify-content: space-between;
border-bottom: 1px solid #eee;
}
.vio_time{
// padding: 0 24rpx;
font-size: 30rpx;
color: #7D8087;
letter-spacing: 0;
display: flex;
align-items: center;
.icon{
font-size: 20rpx;
margin-left: 5rpx;
color: #999999;
opacity: .5;
}
input{
font-size: 30rpx;
color: #7D8087;
text-align: right;
padding: 0 10rpx;
}
}
.vio_int{
font-size: 30rpx;
color: #7D8087;
text-align: right;
padding: 0 10rpx;
}
/deep/ .vip_intpl{
color: #D5D7DA;
}
.vio_list{
width: 100%;
// padding: 0 30rpx 30rpx;
padding:20rpx 30rpx 30rpx;
background: #fff;
position: relative;
z-index: 2;
.main_list{
background: #FFFFFF;
border-radius: 10rpx;
// padding:0 30rpx;
}
}
.bz_add{
width: 100%;
// position: fixed;
// bottom: 0;
background: #f8f8f8;
z-index: 800;
// left: 0;
padding:30rpx 0;
view{
font-size: 32rpx;
color: #FFFFFF;
width: 100%;
height: 90rpx;
background: #2D81FF;
border-radius: 10rpx;
.course-info {
padding: 20rpx;
&-title {
display: flex;
align-items: center;
justify-content: center;
}
}
.main_top{
width: 100%;
padding: 30rpx;
font-size: 28rpx;
color: #929399;
border-bottom: 1px solid #eee;
line-height: 45rpx;
.main_tit{
font-size: 32rpx;
color: #545D71;
margin-bottom: 20rpx;
font-size: 30rpx;
font-family: PingFang SC;
font-weight: bold;
line-height: 55rpx;
// display: flex;
// align-items: center;
// flex-wrap: wrap;
text{
height: 48rpx;
line-height: 48rpx;
display: inline-flex;
align-items: center;
padding: 0 12rpx;
background: rgba(45, 129, 255, .1);
border-radius: 10rpx;
color: #323232;
.classroom {
background: #FE7631;
border-radius: 5rpx;
padding: 7rpx 20rpx;
font-size: 26rpx;
color: #2D81FF;
font-weight: normal;
margin-left: 20rpx;
font-family: PingFang SC;
font-weight: 500;
color: #FAFBFA;
margin-right: 20rpx;
}
.tit {
flex: 1;
}
}
&-content {
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 500;
color: #646464;
margin-top: 20rpx;
}
}
.main_center{
width: 100%;
height: 737rpx;
border-bottom: 1px solid #eee;
overflow: hidden;
margin-top: 30rpx;
}
.seat_list{
// width: 180rpx;
// height: 180rpx;
min-width: 690rpx;
min-height: 737rpx;
background: #fff;
padding: 22rpx;
// display: flex;
// align-items: center;
// justify-content: center;
}
.seat_list1{
// width: 1899rpx;
// height: 1448rpx;
}
.my_seat{
width: 100%;
padding: 0 30rpx;
... ... @@ -1400,22 +1268,20 @@
color: #5B6476;
display: flex;
align-items: center;
justify-content: space-between;
text{
font-size: 28rpx;
color: #5B6476;
min-width: 118rpx;
height: 55rpx;
padding: 0 15rpx;
background: rgba(169, 177, 192, .1);
background: #FAFAFA;
border: 1px solid #CACACA;
border-radius: 10rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 500;
color: #40C8A9;
padding: 20rpx 52rpx;
margin-left: 30rpx;
}
}
.zw_list{
// min-width: 600rpx;
padding-top: 20rpx;
display: flex;
flex-wrap: wrap;
... ... @@ -1423,9 +1289,7 @@
width: 40rpx;
height: 40rpx;
.zw_li{
// margin: 10rpx;
color: #F2F2F2;
// font-size: 60rpx;
font-size: 30rpx;
}
}
... ... @@ -1436,7 +1300,6 @@
height: 900rpx;
}
.seat_list_box{
// padding: 0 30rpx;
min-width: 690rpx;
display: flex;
flex-direction: column;
... ... @@ -1459,4 +1322,19 @@
height: auto;
}
}
.bz_add{
background: #f8f8f8;
padding: 30rpx;
view{
background: #2D81FF;
border-radius: 44rpx;
font-size: 34rpx;
font-family: PingFang SC;
font-weight: 500;
color: #FFFFFF;
line-height: 88rpx;
text-align: center;
}
}
</style>
... ...