<template>
	<view class="page-index">
		<view class="status_bar"></view>
		<div class="title">
			<text class="tab">我的</text>
			<text class="tab active">部门</text>
		</div>
		<div class="statistics">
			<div class="head">任务统计</div>
			<div class="container">
				<div class="item">
					<img class="icon" src="/static/index/wait.png" alt="">
					<text>待巡检{{statistics.wait}}个</text>
				</div>
				<div class="item">
					<img class="icon" src="/static/index/expire.png" alt="">
					<text>已逾期{{statistics.expire}}个</text>
				</div>
				<div class="item">
					<img class="icon" src="/static/index/complete.png" alt="">
					<text>已完成{{statistics.complete}}个</text>
				</div>
			</div>
		</div>
		<div class="task-list">
			<div class="head">待办任务</div>
			<div class="item" v-for="(item,index) in 10" :key="index">
				<div class="task-title">{2号-770-32002}:采空区封堵完好，无渗水情况。</div>
				<div class="time">2022-02-03 09:00</div>
			</div>
		</div>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				statusBarHeight:0,
				statistics: {
					wait:3,
					expire:2,
					complete:10
				}
			}
		},
		onLoad(){
			this.initStatusBarHeight()
		},
		methods: {
			initStatusBarHeight(){
				console.log(uni.getSystemInfoSync())
				this.statusBarHeight=uni.getSystemInfoSync().statusBarHeight
			}
		}
	}
</script>

<style lang="scss" scoped>
	.page-index{
		background: linear-gradient(180deg, #4D73FF 0%, rgba(77, 115, 255, 0) 100%);
		padding: 0 30upx;
		.title{
			.tab{
				font-size: 34upx;
				line-height: 50upx;
				margin-right: 32upx;
				color: #fff;
				&.active{
					color: rgba(255, 255, 255, 0.6);
				}
			}
		}
		.statistics{
			&{
				border-radius: 24upx;
				background-color: #fff;
				padding:36upx 0 44upx 24upx;
				margin-top: 48upx;
			}
			.head{
				font-weight: 900;
				font-size: 34upx;
				line-height: 50upx;
				color: #151515;			
			}
			.container{
				display: flex;
				justify-content: center;
				align-items: center;
				.item{
					width: 33.33%;
					display: flex;
					justify-content: center;
					align-items: center;
					flex-direction: column;
					.icon{
						display: block;
						width:88upx;
						height: 88upx;
					}
					text{
						font-size: 28upx;
						line-height: 42upx;
						color: #151515;
						padding-top: 18upx;
					}				
				}
			}
		}
		.task-list{
			border-radius: 24upx;
			background-color: #fff;
			margin-top: 24upx;
			padding: 36upx 24upx;
			.head{
				font-weight: 900;
				font-size: 34upx;
				line-height: 50upx;
				color: #151515;			
			}
			.item{
				padding: 30upx 40upx 38upx 40upx;
				.task-title{
					color: #212121;
					font-size: 32upx;	
					padding-bottom: 24upx;
				}
				.time{
					background-image: url(/static/index/time.png);
					background-repeat: no-repeat;
					background-position: left center;
					background-size: 24upx 24upx;
					padding-left: 36upx;
					color: #999;
					font-size: 24upx;
				}
			}
		}
	}
	.container {
		padding: 20px;
		font-size: 14px;
		line-height: 24px;
	}
</style>
