<template>
	<view>
		<!-- header -->
		<view class="header">
			<view class="header_title" :class="active===1?'active':''" @click="click_item(1)">
				<view class="title">待审核</view>
				<view class="line"></view>
			</view>
			<view class="header_title" :class="active===2?'active':''"  @click="click_item(2)">
				<view class="title">已审核</view>
				<view class="line"></view>
			</view>
		</view>
		
		<!-- content -->
		<view class="content" v-if="active === 1">
			<view class="list">
				<view class="item">
					<view class="item_top">
						<view class="left">
							<view class="user_img">
								<image src="./icon/user.png" mode=""></image>
							</view>
							<view class="user_info">
								<view>编号：3E9MH27</view>
								<view>2019-4-9 11:46</view>
							</view>
						</view>
						<view class="right">
							<view class="sheet_info">正在审核</view>
						</view>
					</view>
					<view class="item_center">
						<view class="center_tip">物资领用</view>
						<view class="center_title">机电设备物资领用</view>
						<scroll-view scroll-x="true" >
							<view class="center_info">
								<view class="info_item">
									<view class="box">
										<view class="item_name">信息监测中心-张三</view>
										<view class="tip">通过</view>
									</view>
									<view class="icon">
										<uni-icons type="arrowthinright"></uni-icons>
									</view>
								</view>
								<view class="info_item">
									<view class="box">
										<view class="item_name">信息监测中心-张三</view>
										<view class="tip">通过</view>
									</view>
									<view class="icon">
										<uni-icons type="arrowthinright"></uni-icons>
									</view>
								</view>
								<view class="info_item">
									<view class="box">
										<view class="item_name">信息监测中心-张三</view>
										<view class="tip">通过</view>
									</view>
									<view class="icon">
										<uni-icons type="arrowthinright"></uni-icons>
									</view>
								</view>
							</view>
						</scroll-view>
					</view>
					<view class="item_bottom">
						<view class="bottom_btn">审核</view>
					</view>
				</view>
				<view class="item">
					<view class="item_top">
						<view class="left">
							<view class="user_img">
								<image src="./icon/user.png" mode=""></image>
							</view>
							<view class="user_info">
								<view>编号：3E9MH27</view>
								<view>2019-4-9 11:46</view>
							</view>
						</view>
						<view class="right">
							<view class="sheet_info">正在审核</view>
						</view>
					</view>
					<view class="item_center">
						<view class="center_tip">物资领用</view>
						<view class="center_title">机电设备物资领用</view>
						<scroll-view scroll-x="true" >
							<view class="center_info">
								<view class="info_item">
									<view class="box">
										<view class="item_name">信息监测中心-张三</view>
										<view class="tip">通过</view>
									</view>
									<view class="icon">
										<uni-icons type="arrowthinright"></uni-icons>
									</view>
								</view>
								<view class="info_item">
									<view class="box">
										<view class="item_name">信息监测中心-张三</view>
										<view class="tip">通过</view>
									</view>
									<view class="icon">
										<uni-icons type="arrowthinright"></uni-icons>
									</view>
								</view>
								<view class="info_item">
									<view class="box">
										<view class="item_name">信息监测中心-张三</view>
										<view class="tip">通过</view>
									</view>
									<view class="icon">
										<uni-icons type="arrowthinright"></uni-icons>
									</view>
								</view>
							</view>
						</scroll-view>
					</view>
					<view class="item_bottom">
						<view class="bottom_btn">审核</view>
					</view>
				</view>
							
			</view>
		
		</view>
		
		<!-- content -->
		<view class="content" v-if="active === 2">
			<view class="list">
				<view class="item" @click="go_m_worksheet_pass(1)">
					<view class="item_top">
						<view class="left">
							<view class="user_img">
								<image src="./icon/user.png" mode=""></image>
							</view>
							<view class="user_info">
								<view>开发者 调度室</view>
								<view>编号：#591 2019-4-9 11:46</view>
							</view>
						</view>
						<view class="right">
							<view class="sheet_info">已审核</view>
						</view>
					</view>
					<view class="item_center">
						<view class="center_tip">物资领用</view>
						<view class="center_title">机电设备物资领用</view>
						<scroll-view scroll-x="true" >
							<view class="center_info">
								<view class="info_item">
									<view class="box">
										<view class="item_name">开发者</view>
										<view class="tip"></view>
									</view>
									<view class="icon">
										<uni-icons type="arrowthinright"></uni-icons>
									</view>
								</view>
								<view class="info_item">
									<view class="box">
										<view class="item_name">开发者</view>
										<view class="tip"></view>
									</view>
									<view class="icon">
										<uni-icons type="arrowthinright"></uni-icons>
									</view>
								</view>
							
							</view>
						</scroll-view>
					</view>
				</view>
				<view class="item">
					<view class="item_top">
						<view class="left">
							<view class="user_img">
								<image src="./icon/user.png" mode=""></image>
							</view>
							<view class="user_info">
								<view>开发者 调度室</view>
								<view>编号：#591 2019-4-9 11:46</view>
							</view>
						</view>
						<view class="right">
							<view class="sheet_info">已审核</view>
						</view>
					</view>
					<view class="item_center">
						<view class="center_tip">物资领用</view>
						<view class="center_title">机电设备物资领用</view>
						<scroll-view scroll-x="true" >
							<view class="center_info">
								<view class="info_item">
									<view class="box">
										<view class="item_name">开发者</view>
										<view class="tip"></view>
									</view>
									<view class="icon">
										<uni-icons type="arrowthinright"></uni-icons>
									</view>
								</view>
								<view class="info_item">
									<view class="box">
										<view class="item_name">开发者</view>
										<view class="tip"></view>
									</view>
									<view class="icon">
										<uni-icons type="arrowthinright"></uni-icons>
									</view>
								</view>
							
							</view>
						</scroll-view>
					</view>
				</view>
							
			</view>
					
		</view>
	
	
	</view>
</template>

<script>
	export default {
		data() {
			return {
				// 默认选中表
				active:1,
				Authorization:'',
				
				// 待审核列表
				checkList:[],
				// 已审核列表
				checkedList:[]
			};
		},
		onLoad() {
			this.Authorization = uni.getStorageSync('token_type') +' '+uni.getStorageSync('Authorization')
			// this.getCheckList()
			// this.getCheckedList()
		},
		methods:{
			click_item(item){
				this.active = item
			},
			go_m_worksheet_pass(id){
				uni.navigateTo({
					url: './m-worksheet-pass/m-worksheet-pass?id='+id,
					animationType: 'fade-in',
					animationDuration: 200
				})
			},
			async getCheckList(){
				const Authorization = this.Authorization
				const res = await this.$myRequest({
					url:'/worksheet/check/list',
					header:{
						Authorization:Authorization
					}
				})
				
				console.log(res.data.data.data)
				this.checkList = res.data.data
			},
			async getCheckedList(){
				const Authorization = this.Authorization
				const res = await this.$myRequest({
					url:'/worksheet/checked/list',
					header:{
						Authorization:Authorization
					}
				})
				
				// console.log(res.data.data)
				this.checkedList = res.data.data
			}
		}
		
	}
</script>

<style lang="scss">
	.header{
		background-color: #fff;
		width: 100%;
		height: 97rpx;
		box-sizing: border-box;
		padding-top: 21rpx;
		
		display: flex;
		
		.header_title{
			width: 50%;
			.title{
				text-align: center;
				height: 47rpx;
				font-size: 33rpx;
				font-family: PingFangSC-Medium, PingFang SC;
				font-weight: 500;
				color: #BDC3C7;
				line-height: 47rpx;

			}
		}
		.active{
			.title{
				color: #16A085;
			}
			.line{
				margin-top: 21rpx;
				
				background-color: #16A085;
				height: 8rpx;
			
			}
		}
	}

	.content{
		width: 750rpx;
		.list{
			box-sizing: border-box;
			padding: 30rpx;
			.item{
				margin-bottom: 30rpx;
				width: 690rpx;
				border-radius: 6rpx;
				border: 1rpx solid #EDEFF9;
				border-top: 4rpx solid #2ECC71;
				
				box-sizing: border-box;
				padding: 20rpx 25rpx;
				.item_top{
					display: flex;
					justify-content: space-between;
					.left{
						height: 88rpx;
						display: flex;
						align-items: center;
						.user_img{
							width: 75rpx;
							height: 75rpx;
							border-radius: 50%;
							overflow: hidden;
							image{
								width: 75rpx;
								height: 75rpx;
							}
						}
						.user_info{
							margin-left: 22rpx;
							font-size: 21rpx;
							font-family: MicrosoftYaHei;
							color: #002257;
							line-height: 35rpx;

						}
					}
					.right{
						.sheet_info{
							margin-top: 8rpx;
							font-size: 21rpx;
							font-family: MicrosoftYaHei;
							color: #2ECC71;
							line-height: 35rpx;

						}
					}
				}
				.item_center{
					width: 640rpx;
					margin-top: 10rpx;
					border-radius: 6rpx;
					border: 1rpx solid #EDEFF9;
					
					box-sizing: border-box;
					padding-top: 10rpx;
					padding-left: 20rpx;
					padding-bottom: 20rpx;
					.center_tip{
						font-size: 18rpx;
						font-family: MicrosoftYaHei;
						color: #3498DB;
						line-height: 25px;

					}
					.center_title{
						font-size: 30rpx;
						font-family: MicrosoftYaHei;
						color: #002257;
						line-height: 40rpx;

					}
					.center_info{
						width: 400%;
						margin-top: 20rpx;
						display: flex;
						.info_item{
							display: flex;
							.box{
								.item_name{
									padding: 6rpx;
									border-radius: 6px;
									border: 2px solid #2ECC71;
									
									font-size: 21rpx;
									font-family: MicrosoftYaHei;
									color: #2ECC71;

								}
								.tip{
									margin-top: 5rpx;
									font-size: 21rpx;
									font-family: MicrosoftYaHei;
									color: #27AE60;
									line-height: 30rpx;
									text-align: center;
								}
							}
							.icon{
								
							}

						}
						.info_item:last-child{
							.icon{
								display: none;
							}
						}
					}
				}
				.item_bottom{
					margin-top: 30rpx;
					height: 50rpx;
					.bottom_btn{
						float: right;
						width: 100rpx;
						height: 50rpx;
						text-align: center;
						line-height: 50rpx;
						background: #1ABC9C;
						border-radius: 2rpx;
						
						font-size: 22rpx;
						font-family: MicrosoftYaHei;
						color: #FFFFFF;
					}
				}
			}
		}
	}

</style>
