<template>
  <view class="app-content">
		<!-- <img src="../../static/beijing.png" alt="" class="tuku"> -->
		<Navs :navname.sync="navname" @fall="fall"></Navs>
		<view class="content">
			<view class="content_top">
				<view class="craid" v-if="cap.name">
					<view class="craid_data">
						<p>{{cap.name}}</p>
					  <span>{{cap.time}}</span>
					</view>
					<view class="craid_data">
						<p>{{cap.ct}}</p>
					  <span>{{cap.time2}}</span>
					</view>
					<view class="aircraft"></view>
					<view class="craid_data">
						<p>{{cap.cs}}</p>
					  <span>{{cap.time3}}</span>
					</view>
				</view>
				<view class="craids" v-if="!cap.name">
          <p>暂无航班信息</p>
				</view>
				<view class="scanning">
					<view :class="getFooterClass">
						<input  class="input"  v-model.trim="stratvalue"  type="text" value=""  placeholder-style="font-size:.8125rem;color:rgb(189, 214, 231);display:flex;justify-content: start;" placeholder="请输入机票信息"/>
						<view class="log_l"></view>
						<view class="log"></view>
					</view>
				</view>
			</view>
			<view class="content_top">
				<view class="craid" v-if="caps.name">
					<view class="craid_data">
						<p>{{caps.name}}</p>
					  <span>{{caps.time}}</span>
					</view>
					<view class="craid_data">
						<p>{{caps.ct}}</p>
					  <span>{{caps.time2}}</span>
					</view>
					<view class="aircraft"></view>
					<view class="craid_data">
						<p>{{caps.cs}}</p>
					  <span>{{caps.time3}}</span>
					</view>
				</view>
				<view class="craids" v-if="!caps.name">
          <p>暂无航班信息</p>
				</view>
				<view class="scanning">
					<view :class="getlooterClasser">
						<input  class="input"  v-model.trim="endvalue"  type="text" value=""  placeholder-style="font-size:.8125rem;color:rgb(189, 214, 231);display:flex;justify-content: start;" placeholder="请输入行李牌号"/>
						<view class="log_l"></view>
						<view class="log"></view>
					</view>
					<view class="gao">*行李信息不一致，请上报处理</view>
				</view>
			</view>
			<view class="footer">
				<button form-type="submit" class="switchBtndel" >异常处理</button>
				<button form-type="submit" class="btnyes" >确认提取</button>
			</view>
		</view>
	</view>
</template>

<script>
	import Navs from '../../components/header/navs.vue'
	import maskModel from '../../components/mask-model/mask-model.vue'
	export default {
		data() {
			return {
				isShow: true,
				dataheight: '20.75rem',
				scrollTop: 0,
				old: {
					scrollTop: 0
				},
				input: '',
				main: null,
				poll: null,
				filter:null,
				pusher:null,
				intentServer:null,
				arr: [],
				navname: '提取',
				startcode: '扫码',
				stopcode: '扫码',
				action: true,
				listdate: [{
					name: '3880491101',
					types: false
				},
				{
					name: '3880491101',
					types: false
				},
				{
					name: '3880491101',
					types: false
				},
				{
					name: '3880491101',
					types: false
				},
				{
					name: '3880491101',
					types: false
				},
				{
					name: '3880491101',
					types: false
				},
				{
					name: '3880491101',
					types: false
				},
				{
					name: '3880491101',
					types: false
				},
				{
					name: '3880491101',
					types: false
				},
				{
					name: '3880491101',
					types: false
				},
				{
					name: '3880491101',
					types: false
				},
				{
					name: '3880491101',
					types: false
				},
				{
					name: '3880491101',
					types: false
				}],
				arr: [],//触发判断
				startData: {
					clientX: 0,
					clientY: 0
				},
				stratvalue: '',//航班
				endvalue: '',//行李
				cap:{
					name:'HU7412',
					time:'2023-02-17',
					ct: 'CTU',
					time2: '12:00:00',
					cs:'CSX',
					time3: '14:23:00'
				},
				caps:{
					name:'HU7412',
					time:'2023-02-17',
					ct: 'CTU',
					time2: '12:00:00',
					cs:'CSX',
					time3: '14:23:00'
				},
			}
		},
		created(option) {
		},
		onLoad(option){
			// this.navname = JSON.parse(decodeURIComponent(option.item))
			// if (this.navname == '分拣') {
      //   this.tabname = '航班'
			// }
		},
		onUnload() {
			// this.$refs.showMask.show();
		},
		onShow() {
		},
		mounted() {
			// this.$refs.showMask.show();
			// console.log(this.stratvalue.length)
		},
		computed: {
			getFooterClass () {
				return this.stratvalue ? 'scanning_cds' : 'scanning_cd'
			},
			getlooterClasser () {
				return this.endvalue ? 'scanning_cds' : 'scanning_cd'
			}
		},
		components: {
			Navs,
			maskModel:maskModel,
		},
		methods: {
			//下拉
			up () {
				this.typeShow = false
				this.maskTitle = '是否确定要拉下该件行李？'
				this.headername = '下拉提示'
				this.$refs.showMask.show();
			},
			confirm:function(e){//确定按钮
				console.log('您点击了确定按钮');
			},
			cancel:function(){//取消按钮
				console.log('您点击了取消按钮');
			},
			clickOrder () {
				uni.redirectTo({
					url: "/pages/baggagecheck/index"
				})
			},
			fall () {
				uni.switchTab({
					url: "/pages/index/index"
				})
			},
			clicker () {
				this.action = !this.action
			},
			movetran (e) {
				let arr = uni.getSystemInfoSync().windowHeight;
				this.dataheight = (e.changedTouches[0].clientY/16) + 'rem'
				if (e.changedTouches[0].clientY/16 > 20.75) {
					this.dataheight = 20.75 + 'rem'
				} else if (e.changedTouches[0].clientY/16 < 7.3125) {
					this.dataheight = 6.3125 + 'rem'
				}
			},
			start(e) {
				this.startData.clientX = e.changedTouches[0].clientX;
			},
			end (e,item) {
				const subX = e.changedTouches[0].clientX - this.startData.clientX;
				if (subX > 50) {
					// console.log('右滑')
					item.types  = false
				} else if (subX < -50) {
					item.types  = true
					// console.log('左滑')
				}
			},
			checkMore (item) {
        console.log(item)
			}
		},
	}
</script>

<style lang="scss" scoped>
.app-content{
  position: relative;
	background: rgb(49, 85, 99);
	>.content{
		width: 100%;
		height: calc(100vh - 4.625rem);
		position: relative;
		// overflow: hidden;
		// background: rgb(49, 85, 99);
		>.content_top{
			width: 100%;
			// background: rgb(49, 85, 99);
			padding-bottom: 1.3125rem;
			>.craid{
				// width: 100%;
				height: 5.625rem;
				padding: 0 2.5625rem 0 2.5625rem;
				display: flex;
				justify-content: space-between;
				flex-wrap: wrap;
				align-items: center;
				>.craid_data{
					display: flex;
					flex-direction: column;
					justify-content: center;
					align-items: start;
					>p{
						color: rgb(255, 255, 255);
						font-family: Noto Sans SC;
						font-size: 18px;
						font-weight: 700;
					}
					>span{
						color: rgb(255, 255, 255);
						font-family: Noto Sans SC;
						font-size: 13px;
						font-weight: 500;
					}
				}
				>.aircraft{
					width: 1.75rem;
          height: 1.75rem;
					background: url('../../static/hang.png') no-repeat;
					background-size: 100% 100%;
				}
			}
			>.craids{
				height: 5.625rem;
				padding: 0 2.5625rem 0 2.5625rem;
				display: flex;
				justify-content: center;
				align-items: center;
				>p{
					color: rgb(189, 214, 231);
					font-family: Noto Sans SC;
					font-size: 13px;
					font-weight: 500;
				}
			}
			>.scanning{
				// height: 12rem;
				padding: 0 1.5rem 0 1.5rem;
				opacity: 1;
				transition: all 3s;
				>.gao{
					color: yellow;
				}
				.scanning_cd{
					width: 100%;
					height: 3rem;
					opacity: 1;
					transition: all 3s;
					background: rgb(59, 103, 123);
					margin-top: 1rem;
					margin-bottom: .5rem;
					border-radius: 4px;
					display: flex;
					justify-content: center;
					align-items: center;
					color: rgb(255, 255, 255);
					font-family: Noto Sans SC;
					font-size: 16px;
					>.log{
						width: .875rem;
						height: .875rem;
						background: url('../../static/saoma.png') no-repeat;
						background-size: 100% 100%;
						margin-left: 1rem;
					}
					>.log_l{
						width: .125rem;
						height: 1.3125rem;
						margin-left: 4rem;
						background: rgb(255, 255, 255);
					}
				}
				.scanning_cds{
					width: 100%;
					height: 3rem;
					opacity: 1;
					transition: all 3s;
					background: rgb(51, 161, 165);
					margin-top: 1rem;
					margin-bottom: .5rem;
					border-radius: 4px;
					display: flex;
					justify-content: center;
					align-items: center;
					color: rgb(255, 255, 255);
					font-family: Noto Sans SC;
					font-size: 16px;
					>.log{
						width: .875rem;
						height: .875rem;
						background: url('../../static/saoma.png') no-repeat;
						background-size: 100% 100%;
						margin-left: 1rem;
					}
					>.log_l{
						width: .125rem;
						height: 1.3125rem;
						margin-left: 4rem;
						background: rgb(255, 255, 255);
					}
				}
			}
		}
		>.content_bootom{
			width: 100%;
			// height: calc(100vh - 20.9375rem - 4.375rem);
			padding-bottom: 0;
			position: absolute;
			bottom: 0;
			top: 20.75rem;
			border-radius: 6px 6px 0px 0px;
			overflow: hidden;
			background: rgb(255, 255, 255);	
			>.choice{
				width: 100%;
				height: 2.5rem;
				display: flex;
				background: rgb(240, 241, 243);
				>.handle{
					width: 50%;
					display: flex;
					align-items: center;
					justify-content: center;
					color: rgb(0, 0, 0);
					font-family: Noto Sans SC;
					font-size: 15px;
					font-weight: 700;
					border-radius: 6px 6px 0px 0px;
					background: rgb(255, 255, 255);
				}
			  >.handles{
					width: 50%;
					display: flex;
					align-items: center;
					justify-content: center;
					color: rgb(0, 0, 0);
					font-family: Noto Sans SC;
					font-size: 15px;
					font-weight: 700;		
				}
			}
			.up{
				width: 100%;
				display: flex;
				align-items: center;
				margin-left: 1rem;
				border-bottom: 1px solid rgb(238, 238, 238);
				// transform: all 3s;
				>.down_up{
					width: .875rem;
					height: .875rem;
					background: url('../../static/xia.png') no-repeat;
					background-size: 100% 100%;
				}
				>.list{
					width: 97%;
					position: relative;
					height: 3.75rem;
					display: flex;
					align-items: center;
					transform: all 3s;
					right: 0;
					color: rgb(0, 0, 0);
					font-family: Noto Sans SC;
					font-size: 13px;
					font-weight: 500;
				}
				>.delete{
					width: 3.75rem;
					height: 3.75rem;
					background: rgb(237, 101, 101);
					display: flex;
					align-items: center;
					justify-content: center;
					position: relative;
					right: -3.75rem;
					transform: all 3s;
					>.log{
						width: .875rem;
						height: .875rem;
						background: url('../../static/vector@1x.png') no-repeat;
					  background-size: 100% 100%;
					}
				}
			}
			.ups{
				width: 100%;
				display: flex;
				align-items: center;
				margin-left: 1rem;
				border-bottom: 1px solid rgb(238, 238, 238);
				// transform: all 3s;
				>.down_up{
					width: .875rem;
					height: .875rem;
					position: relative;
					right:  1.875rem;
					background: url('../../static/xia.png') no-repeat;
					background-size: 100% 100%;
				}
				>.list{
					width: 97%;
					position: relative;
					height: 3.75rem;
					display: flex;
					align-items: center;
					right: 3.75rem;
					// right: 0;
					color: rgb(0, 0, 0);
					font-family: Noto Sans SC;
					font-size: 13px;
					font-weight: 500;
					transform: all 3s;
				}
				>.delete{
					width: 3.75rem;
					height: 3.75rem;
					background: rgb(237, 101, 101);
					display: flex;
					align-items: center;
					justify-content: center;
					position: relative;
					right: 1rem;
					transform: all 3s;
					// right: -3.75rem;
					>.log{
						width: .875rem;
						height: .875rem;
						background: url('../../static/vector@1x.png') no-repeat;
					  background-size: 100% 100%;
					}
				}
			}
			.scroll-Y {
				height: calc(100% - 2.5rem - 2.75rem - 2.25rem - 2.25rem);
			}
			.but{
				width: 20.5625rem;
        height: 2.75rem;
				background: linear-gradient(179.10deg, rgba(51,161,165,1.00) 11.326%,rgba(59,111,142,1.00) 119.032%,rgba(59,111,142,1.00) 119.032%,rgba(59,111,142,1.00) 119.032%);
        border-radius: .25rem;
				color: rgb(255, 255, 255);
				font-family: Noto Sans SC;
				font-size: 1rem;
				margin: 0 auto;
				display: flex;
				align-items: center;
				justify-content: center;
				margin-top: 2.25rem;
				margin-bottom: 2.25rem;
			}
		}
		>.footer{
			width: 100%;
			height: 7.4375rem;
			position: absolute;
			bottom: 0;
			display: flex;
			align-items: center;
			justify-content: center;
			>.switchBtndel{
				width: 9.4375rem;
				height: 2.75rem;
				box-sizing: border-box;
				background: rgb(243, 253, 255);
				border: 1px solid rgb(172, 218, 230);
				border-radius:
				4px;
				color: rgb(59, 150, 159);
				font-family: Noto Sans SC;
				font-size: 16px;
				font-weight: 700;
			}
			>.btnyes{
				width: 9.4375rem;
				height: 2.75rem;
				background: rgb(126, 138, 143);
				border-radius:
				4px;
				color: rgb(255, 255, 255);
				font-family: Noto Sans SC;
				font-size: 16px;
				font-weight: 700;
			}
		}
	}
}
</style>