<template>
	<view class="mission-details-page">
		<scroll-view class="scroll-y" scroll-y="true">
			<list-item :isClose="true" />
			<view class="mission-plan">
				<view class="label">
					<text>改善进度</text>
				</view>
				<view class="plan-box">
					<template v-for="(item, i) in list">
						<view class="row" :key="i">
							<view class="col">
								<image 
								  class="plan-icon" 
									:src="`/static/${i === list.length - 1 ? 'check-radio' : 'check-no'}.png`">
								</image>
								<view class="line" v-show="i != list.length -1"></view>
							</view>
						  <view class="col">
								<view class="title">
									<text>{{ item.title }}</text>
								</view>
								<view class="sub-box">
									<view class="sub-title">
										<text>{{ item.subTitle }}</text>
									</view>	
									<view class="sub-title">
										<text>{{ item.date }}</text>
									</view>
								</view>
						  </view>
						</view>
					</template>
					<view class="btn-group">
						<tm-button />
					</view>
				</view>
			</view>
		</scroll-view>
	</view>
</template>

<script>
	// 改善任务
	import listItem from '../mission/components/mission-list/list-item.vue';
	export default {
		data() {
			return {
        list: [
					{title: '查核人：王晓雪', subTitle: '发送改善通知，查核结果：主要缺失', date: '2020-11-22 15:30:22'},
					{title: '单位负责人', subTitle: '发送改善通知，查核结果：主要缺失', date: '2020-11-22 15:30:22'}
				]
			}
		},
		methods: {
			
		},
		components: {
			listItem, 
		}
	}
</script>

<style lang="less">
	.mission-details-page {
		height: 100%;
		padding-top: 15rpx;
		background-color: #F5F6FA;
		
		.scroll-y {
			height: 100%;
			
			.mission-plan {
				
				.label {
					margin-top: 25rpx;
					margin-bottom: 15rpx;
					height: 20rpx;
					line-height: 20rpx;
					padding-left: 25rpx;
					
					text {
						font-size: 20rpx;
						color: #666F80;
					}
				}
				
				.plan-box {
					padding: 25rpx;
					background-color: #fff;
					
					.row {
						display: flex;
						
						.col {
							
							.title {
								display: flex;
								align-items: center;
								margin-bottom: 15rpx;
								height: 25rpx;
							
							  >text {
									font-size: 22.5rpx;
									color: #292C33;
								}
							}
							
							.sub-box {
								display: flex;
								flex-direction: column;
								
								.sub-title {
									display: flex;
									align-items: center;
									margin-bottom: 15rpx;
									height: 20rpx;
									
									&:last-child {
										margin-bottom: 34.37rpx;
									}
									
									>text {
										font-size: 20rpx;
										color: #666E80;
									}
								}
							}
							
							&:first-child {
								display: flex;
								flex-direction: column;
								align-items: center;
								margin-right: 15rpx;
								width: 25rpx;
								
								.plan-icon {
									margin-bottom: 17.5rpx;
									width: 25rpx;
									height: 25rpx;
								}
								
								.line {
									width: 5rpx;
									height: 75rpx;
									background-color: #E6EAF2;
								}
							}
						}
					}
				}
			}
		}
	}

</style>
