<template>
	<view>
		<view class="top">
			<view class="icon">
				<image src="./icon/icon.png" mode=""></image>
			</view>
			<view class="title">网格化管理</view>
			<view class="time">{{detail.create_date}}</view>
		</view>
		
		<view class="section">
			<view class="text">检查记录</view>
		</view>
		
		<view class="content">
			<view class="inner">
				<view class="label">网格编号：</view>
				<view class="text">{{detail.number_name}}</view>
			</view>
			<view class="inner">
				<view class="label">网格范围：</view>
				<view class="text">{{detail.range_name}}</view>
			</view>
			<view class="inner">
				<view class="label">网格区域：</view>
				<view class="text">{{detail.region_name}}</view>
			</view>
			<view class="inner">
				<view class="label">巡检人员：</view>
				<view class="text">{{detail.owner_name}}</view>
			</view>
			<view class="inner">
				<view class="label">巡检日期：</view>
				<view class="text">{{detail.inspection_date}}</view>
			</view>
			<view class="inner">
				<view class="label">现场照片：</view>
				<view class="img">
					<image :src="detail.img_url" mode=""></image>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				detail:{}
			};
		},
		onLoad(option) {
			this.get_trouble_grid_check_detail(option.id)
		},
		methods:{
			get_trouble_grid_check_detail(id) {
				uni.showLoading({
					mask:true
				})
				this.$api.trouble_grid_check_detail({
					id: id
				}).then((res)=>{
					uni.hideLoading()
					console.log(res.data.data)
					this.detail = res.data.data
				})
			},
		}
	}
</script>

<style lang="scss">
	.top{
		text-align: center;
		box-sizing: border-box;
		padding: 25rpx;
		.icon{
			image{
				width: 91rpx;
				height: 106rpx;
			}
		}
		.title{
			line-height: 60rpx;
		}
		.time{
			font-size: 28rpx;
			color: #999999;
		}
	}
	
	.section{
		box-sizing: border-box;
		padding: 15rpx 25rpx;
		background-color: #ECF0F1;;
		.text{
			line-height: 50rpx;
			color: #009FE8;
			border-left: 6rpx solid #009FE8;
			padding-left: 20rpx;
		}
	}
	
	.content{
		box-sizing: border-box;
		padding: 0 25rpx;
		.inner {
			padding-top: 40rpx;
			width: 700rpx;
			display: flex;
			font-size: 32rpx;
		
			.label {
				width: 200rpx;
			}
		
			.text {
				width: 500rpx;
			}
			
			.img{
				image{
					width: 300rpx;
					height: 300rpx;
				}
			}
		}
	}
</style>
