<template>
	<view class="page-prebook">
		<view class="title flex">
			<img :src="cssUrl+'ten.svg'">
			广安门中医医院西单门诊部 针灸科
		</view>
		<book @confirmSubmitEvent="showConfirm"/>
		<slider-box ref="sliderbox">
			<view class="slider-title PfScMedium">预约信息确认</view>
			<view class="members-box" v-if="needSelectMembers">
				<view class="desc">当前时段余号不足，只能预约2人</view>
				<view class="members">
					<view class="memmbers-item active">
						<img :src="cssUrl+'checkbox_false.svg'" alt="">
						<img :src="cssUrl+'checkbox_true.svg'" alt="">
						上官子涵
					</view>
					<view class="memmbers-item">
						<img :src="cssUrl+'checkbox_false.svg'" alt="">
						<img :src="cssUrl+'checkbox_true.svg'" alt="">
						帅哥
					</view>
					<view class="memmbers-item">
						<img :src="cssUrl+'checkbox_false.svg'" alt="">
						<img :src="cssUrl+'checkbox_true.svg'" alt="">
						发财哥
					</view>
					<view class="memmbers-item">
						<img :src="cssUrl+'checkbox_false.svg'" alt="">
						<img :src="cssUrl+'checkbox_true.svg'" alt="">
						王富贵
					</view>
				</view>
			</view>
			<view class="item member-style" v-else>
				<view class="left">就诊人：</view>
				<view class="right over2 over5">①王鹏  ②张富贵  ③张杨明</view>
			</view>
			<view class="item">
				<view class="left">医生姓名：</view>
				<view class="right">李静</view>
			</view>
			<view class="item">
				<view class="left">就诊医院：</view>
				<view class="right over2 over5">广安门中医医院西单门诊部 中医科</view>
			</view>
			<view class="item">
				<view class="left">看诊时间：</view>
				<view class="right orange">2023.11.12 上午 9:30-10:30</view>
			</view>
			
			<view class="btns-box flex">
				<view class="btn cancel btn1" hover-class="hover" @click="closeConfirm">我再想想</view>
				<view class="primary btn btn1" hover-class="hover">确认预约</view>
			</view>
		</slider-box>
	</view>
</template>

<script>
	import Book from '@/components/bookBox.vue';
	import SliderBox from '@/components/sliderBox.vue';
	export default {
		onLoad(op) {
			uni.setNavigationBarTitle({
				title:'李静医生预约就诊'
			})
		},
		data() {
			return {
				cssUrl:this.cssUrl,
				needSelectMembers:false
			}
		},
		components:{
			Book,
			SliderBox
		},
		onShow() {
			
		},
		methods: {
			tips(){
				uni.showToast({
					title:"成功预约8人",
					mask:true,
					image:this.cssUrl+'gou.svg'
				})
			},
			closeConfirm() {
				this.$refs.sliderbox.closeConfirm()
			},
			showConfirm() {
				this.$refs.sliderbox.showConfirm()
			}
		}
	}
</script>

<style lang="scss" scoped>
	.page-prebook{
		width: 100%;
		height: 100vh;
		overflow-y: auto;
		background: #F8F8F8;
		.title{
			margin-top: 24rpx;
			align-items: center;
			width: 100%;
			box-sizing: border-box;
			padding: 0 41rpx;
			line-height: 36rpx;
			font-size: 30rpx;
			color: #949699;
			img{
				width: 26rpx;
				height: 26rpx;
				margin-right: 15rpx;
			}
		}
		.slider-title{
			width: 100%;
			text-align: center;
			color: #000000;
			margin-top: 52rpx;
			line-height: 50rpx;
			height: 50rpx;
			font-size: 32rpx;
			letter-spacing: 2rpx;
		}
		.member-style{
			margin-top: 82rpx;
		}
		.item{
			display: flex;
			box-sizing: border-box;
			padding: 0 53rpx;
			min-height: 42rpx;
			line-height: 42rpx;
			font-size: 30rpx;
			margin-bottom: 24rpx;
			.left{
				width: 159rpx;
				flex-shrink: 0;
				color: #999999;
			}
			.right{
				flex-grow: 1;
				color: #242833;
				&.orange{
					color: #FD7100;
				}
			}
		}
		.item:last-of-type{
			margin-bottom: 62rpx;
		}
		.btns-box{
			justify-content: space-between;
			width: 750rpx;
			height: 124rpx;
			padding: 0 50rpx;
			box-sizing: border-box;
			align-items: center;
			background: #FFFFFF;
			margin-bottom: 17rpx;
			box-shadow: 0rpx -2rpx 6rpx 0rpx rgba(181,181,181,0.13);
			margin-top: 62rpx;
		}
		.members-box{
			margin-top: 52rpx;
			padding-left: 60rpx;
			width: 100%;
			box-sizing: border-box;
			.desc{
				height: 50rpx;
				font-size: 30rpx;
				color: #999999;
				line-height: 50rpx;
				letter-spacing: 1rpx;
				margin-bottom: 20rpx;
			}
			.members{
				width: 630rpx;
				min-height: 200rpx;
				max-height: 230rpx;
				overflow-y: auto;
				background: #F7F7F7;
				display: flex;
				justify-content: space-between;
				flex-wrap: wrap;
				padding: 32rpx 40rpx;
				box-sizing: border-box;
				font-size: 28rpx;
				color: #000000;
				line-height: 40rpx;
				margin-bottom: 52rpx;
				row-gap: 50rpx;
				.memmbers-item{
					width: 50%;
					overflow-y: auto;
					display: flex;
					flex-shrink: 0;
					align-items: center;
					word-break: break-all;
					img{
						width: 36rpx;
						height: 36rpx;
						margin-right: 26rpx;
					}
					img:first-of-type{
						display: block;
					}
					img:last-of-type{
						display: none;
					}
					&.active{
						img:first-of-type{
							display: none;
						}
						img:last-of-type{
							display: block;
						}
					}
				}
			}
		}
	}
</style>
