<!--
 * @Title: 
 * @Description: 巡检填报详情
 * @Author: swp
 * @Date: 2022-08-24 10:49:21
 * @LastEditors: 
 * @LastEditTime: 2022-08-24 10:49:21
-->
<template>
	<view class="container">
		<uni-section title="站点基础信息">
			<template v-slot:decoration>
				<view class="decoration"></view>
			</template>
			<uni-card title="测站名称">
				<view class="item-text-line">
					<text class="item-title">{{data.rtuName}}</text>/<text class="item-text">{{data.rtuCode}}</text>
				</view>
			</uni-card>
			<uni-card title="测站类型">
				<view class="item-text-line">
					<text class="item-text">{{getSiteKind}}</text>
				</view>
			</uni-card>
			<uni-card title="测站安装地址">
				<view class="item-text-line">
					<text class="item-text-block">{{data.locationDesc}}</text>
				</view>
			</uni-card>
			<uni-card title="经纬度">
				<view class="item-text-line">
					<text class="item-text">{{data.lng}}/{{data.lat}}</text>
				</view>
			</uni-card>
			<uni-card title="行政区划">
				<view class="item-text-line">
					<text class="item-text">{{getAreaName}}</text>
				</view>
			</uni-card>
		</uni-section>
		<uni-section title="站点状态检查信息">
			<template v-slot:decoration>
				<view class="decoration"></view>
			</template>
			<uni-card title="已选检查项">
				<view class="item-text-line">
					<text class="item-title select-text">{{getSiteCheckStatus}}</text>
				</view>
			</uni-card>
			<uni-card title="站点检查补充说明">
				<view class="item-text-line">
					<text class="item-text-block">{{data.siteCheckRemark}}</text>
				</view>
			</uni-card>
			<uni-card title="拍摄照片">
				<view v-if="data.siteCheckPhotos && data.siteCheckPhotos.length>0" class="view-flex-cc">
					<image v-for="(item, index) in data.siteCheckPhotos" :key="index" class="cover-image"
						mode="widthFix" style="width: 100%;" :src="toOss(item)">
					</image>
				</view>
			</uni-card>
		</uni-section>
		<uni-section title="雨量站检查信息">
			<template v-slot:decoration>
				<view class="decoration"></view>
			</template>
			<uni-card title="已选检查项">
				<view class="item-text-line">
					<text class="item-title select-text">{{getRainSiteCheckItems}}</text>
				</view>
			</uni-card>
			<uni-card title="拍摄照片">
				<view v-if="data.rainSiteCheckPhotos && data.rainSiteCheckPhotos.length>0" class="view-flex-cc">
					<image v-for="(item, index) in data.rainSiteCheckPhotos" :key="index" class="cover-image"
						mode="widthFix" style="width: 100%;" :src="toOss(item)">
					</image>
				</view>
			</uni-card>
			<uni-card title="巡检结果">
				<view class="item-text-line">
					<text v-if="data.rainSiteCheckResult==0" class="item-title error-text">异常</text>
					<text v-else class="item-title normally-text">正常</text>
				</view>
			</uni-card>
			<uni-card title="雨量站检查补充说明">
				<view class="item-text-line">
					<text class="item-text-block">{{data.rainSiteCheckRemark}}</text>
				</view>
			</uni-card>
		</uni-section>
		<uni-section title="水位站检查信息">
			<template v-slot:decoration>
				<view class="decoration"></view>
			</template>
			<uni-card title="已选检查项">
				<view class="item-text-line">
					<text class="item-title select-text">{{getWaterSiteCheckItems}}</text>
				</view>
			</uni-card>
			<uni-card v-if="data.waterSiteCheckPhotos.length>0" title="拍摄照片">
				<view class="view-flex-cc">
					<image v-for="(item, index) in data.waterSiteCheckPhotos" :key="index" class="cover-image"
						mode="widthFix" style="width: 100%;" :src="toOss(item)">
					</image>
				</view>
			</uni-card>
			<uni-card title="巡检结果">
				<view class="item-text-line">
					<text v-if="data.waterSiteCheckResult==0" class="item-title error-text">异常</text>
					<text v-else class="item-title normally-text">正常</text>
				</view>
			</uni-card>
			<uni-card title="检查补充说明">
				<view class="item-text-line">
					<text class="item-text-block">{{data.waterSiteCheckRemark}}</text>
				</view>
			</uni-card>
		</uni-section>
		<uni-section title="墒情站检查信息">
			<template v-slot:decoration>
				<view class="decoration"></view>
			</template>
			<uni-card title="已选检查项">
				<view class="item-text-line">
					<text class="item-title select-text">{{getGroundSiteCheckItems}}</text>
				</view>
			</uni-card>
			<uni-card title="拍摄照片">
				<view v-if="data.groundSiteCheckPhotos && data.groundSiteCheckPhotos.length>0" class="view-flex-cc">
					<image v-for="(item, index) in data.groundSiteCheckPhotos" :key="index" class="cover-image"
						mode="widthFix" style="width: 100%;" :src="toOss(item)">
					</image>
				</view>
			</uni-card>
			<uni-card title="巡检结果">
				<view class="item-text-line">
					<text v-if="data.groundSiteCheckResult==0" class="item-title error-text">异常</text>
					<text v-else class="item-title normally-text">正常</text>
				</view>
			</uni-card>
			<uni-card title="检查补充说明">
				<view class="item-text-line">
					<text class="item-text-block">{{data.groundSiteCheckRemark}}</text>
				</view>
			</uni-card>
		</uni-section>
		<uni-section title="其他设备检查信息">
			<template v-slot:decoration>
				<view class="decoration"></view>
			</template>
			<uni-card title="已选检查项">
				<view class="item-text-line">
					<text class="item-title select-text">{{getOthersEquipmentCheckItems}}</text>
				</view>
			</uni-card>
			<uni-card title="拍摄照片">
				<view v-if="data.othersEquipmentCheckPhotos && data.othersEquipmentCheckPhotos.length>0"
					class="view-flex-cc">
					<image v-for="(item, index) in data.othersEquipmentCheckPhotos" :key="index" class="cover-image"
						mode="widthFix" style="width: 100%;" :src="toOss(item)">
					</image>
				</view>
			</uni-card>
			<uni-card title="巡检结果">
				<view class="item-text-line">
					<text v-if="data.otherEquipmentCheckResult==0" class="item-title error-text">异常</text>
					<text v-else class="item-title normally-text">正常</text>
				</view>
			</uni-card>
			<uni-card title="其他设备检查补充说明">
				<view class="item-text-line">
					<text class="item-text-block">{{data.othersEquipmentCheckRemark}}</text>
				</view>
			</uni-card>
		</uni-section>
		<uni-section title="设备更换信息">
			<template v-slot:decoration>
				<view class="decoration"></view>
			</template>
			<view style="min-height: 50px;">
				<uni-card v-if="data.equipmentsReplaceItems.items[0].checked" title="更换RTU">
					<view class="item-text-line">
						<text class="item-text-block">{{data.rtuModelRemark}}</text>
					</view>
				</uni-card>
				<uni-card title="RTU更换照片">
					<view v-if="data.rtuReplacePhotos && data.rtuReplacePhotos.length>0" class="view-flex-cc">
						<image v-for="(item, index) in data.rtuReplacePhotos" :key="index" class="cover-image"
							mode="widthFix" style="width: 100%;" :src="toOss(item)">
						</image>
					</view>
				</uni-card>

				<uni-card v-if="data.equipmentsReplaceItems.items[1].checked" title="更换雨量计">
					<view class="item-text-line">
						<text class="item-text-block">{{data.rainSensorModelRemark}}</text>
					</view>
				</uni-card>
				<uni-card title="雨量计更换照片">
					<view v-if="data.rainSensorReplacePhotos&&data.rainSensorReplacePhotos.length>0"
						class="view-flex-cc">
						<image v-for="(item, index) in data.rainSensorReplacePhotos" :key="index" class="cover-image"
							mode="widthFix" style="width: 100%;" :src="toOss(item)">
						</image>
					</view>
				</uni-card>
				<uni-card v-if="data.equipmentsReplaceItems.items[2].checked" title="更换水位计">
					<view class="item-text-line">
						<text class="item-text-block">{{data.waterSensorModelRemark}}</text>
					</view>
				</uni-card>
				<uni-card title="水位计更换照片">
					<view v-if="data.waterSensorReplacePhotos &&data.waterSensorReplacePhotos.length>0"
						class="view-flex-cc">
						<image v-for="(item, index) in data.waterSensorReplacePhotos" :key="index" class="cover-image"
							mode="widthFix" style="width: 100%;" :src="toOss(item)">
						</image>
					</view>
				</uni-card>
				<uni-card v-if="data.equipmentsReplaceItems.items[3].checked" title="更换墒情计">
					<view class="item-text-line">
						<text class="item-text-block">{{data.groundSensorModelRemark}}</text>
					</view>
				</uni-card>
				<uni-card v-if="data.groundSensorReplacePhotos&&data.groundSensorReplacePhotos.length>0"
					title="墒情计更换照片">
					<view class="view-flex-cc">
						<image v-for="(item, index) in data.groundSensorReplacePhotos" :key="index" class="cover-image"
							mode="widthFix" style="width: 100%;" :src="toOss(item)">
						</image>
					</view>
				</uni-card>
				<uni-card v-if="data.equipmentsReplaceItems.items[4].checked" title="更换蓄电池">
					<view class="item-text-line">
						<text class="item-text-block">{{data.batteryModelRemark}}</text>
					</view>
				</uni-card>
				<uni-card v-if="data.batteryReplacePhotos&&data.batteryReplacePhotos.length>0" title="蓄电池更换照片">
					<view class="view-flex-cc">
						<image v-for="(item, index) in data.batteryReplacePhotos" :key="index" class="cover-image"
							mode="widthFix" style="width: 100%;" :src="toOss(item)">
						</image>
					</view>
				</uni-card>
				<uni-card v-if="data.equipmentsReplaceItems.items[5].checked" title="更换太阳能板">
					<view class="item-text-line">
						<text class="item-text-block">{{data.sunPowerModelRemark}}</text>
					</view>
				</uni-card>
				<uni-card v-if="data.sunPowerReplacePhotos&&data.sunPowerReplacePhotos.length>0" title="太阳能板更换照片">
					<view class="view-flex-cc">
						<image v-for="(item, index) in data.sunPowerReplacePhotos" :key="index" class="cover-image"
							mode="widthFix" style="width: 100%;" :src="toOss(item)">
						</image>
					</view>
				</uni-card>
				<uni-card v-if="data.equipmentsReplaceItems.items[6].checked" title="更换充电控制器">
					<view class="item-text-line">
						<text class="item-text-block">{{data.batteryControlModelRemark}}</text>
					</view>
				</uni-card>
				<uni-card v-if="data.batteryControllerReplacePhotos&&data.batteryControllerReplacePhotos.length>0"
					title="充电控制器更换照片">
					<view class="view-flex-cc">
						<image v-for="(item, index) in data.batteryControllerReplacePhotos" :key="index"
							class="cover-image" mode="widthFix" style="width: 100%;" :src="toOss(item)">
						</image>
					</view>
				</uni-card>
				<uni-card v-if="data.equipmentsReplaceItems.items[7].checked" title="更换其他设备">
					<view class="item-text-line">
						<text class="item-text-block">{{data.otherEquipmentModelRemark}}</text>
					</view>
				</uni-card>
				<uni-card v-if="data.otherEquipmentReplacePhotos&&data.otherEquipmentReplacePhotos.length>0"
					title="其他设备更换照片">
					<view class="view-flex-cc">
						<image v-for="(item, index) in data.otherEquipmentReplacePhotos" :key="index"
							class="cover-image" mode="widthFix" style="width: 100%;" :src="toOss(item)">
						</image>
					</view>
				</uni-card>
			</view>
		</uni-section>
		<uni-section title="遗留问题补充说明">
			<template v-slot:decoration>
				<view class="decoration"></view>
			</template>
			<view class="item-text-line"
				style="padding-left: 10px;padding-right: 10px;padding-top: 10px;min-height: 50px;">
				<text class="item-text-block">{{data.inspectionRemainProblemsRemark}}</text>
			</view>
		</uni-section>
		<uni-section title="巡检工作留存照片">
			<template v-slot:decoration>
				<view class="decoration"></view>
			</template>
			<view style="min-height: 50px;">
				<uni-card v-if="data.inspectionWorkPhotos&&data.inspectionWorkPhotos.length>0" title="拍摄照片">
					<view class="view-flex-cc">
						<image v-for="(item, index) in data.inspectionWorkPhotos" :key="index" class="cover-image"
							mode="widthFix" style="width: 100%;" :src="toOss(item)">
						</image>
					</view>
				</uni-card>
			</view>
		</uni-section>
	</view>

</template>

<script>
	import {
		role
	} from "@/api/role.js";
	import http from '@/http/api.js';
	import {
		oss
	} from '@/common/setting';
	export default {
		components: {

		},
		props: {
			inspectionId: {
				type: String,
				required: true,
			},
		},
		data() {
			return {
				query: {},
				title: '巡检填报详情',
				data: {
					rtuCode: '',
					rtuName: '',
					isRain: false,
					isRiver: false,
					isRes: false,
					isGround: false,
					isCamera: false,
					lng: '',
					lat: '',
					adCity: '',
					adDist: '',
					locationDesc: '',
					//站点状态检查项
					siteCheckStatus: {
						items: [{
							'id': '0',
							'dictValue': '水毁'
						}, {
							'id': '1',
							'dictValue': '丢失'
						}, {
							'id': '2',
							'dictValue': '损坏'
						}, {
							'id': '3',
							'dictValue': '正常'
						}],
						current: 3
					},
					siteCheckPhotos: [],
					siteCheckRemark: '',
					//雨量站检查数据
					rainSiteCheckItems: {
						items: [{
							'id': '0',
							'checked': false,
							'dictValue': '故障排查'
						}, {
							'id': '1',
							'checked': false,
							'dictValue': '清理堵塞'
						}, {
							'id': '2',
							'checked': false,
							'dictValue': '雨量计校核'
						}],
						current: 0
					},
					rainSiteCheckPhotos: [],
					rainSiteCheckResult: 1,
					rainSiteCheckRemark: '',
					//水位站检查数据
					waterSiteCheckItems: {
						items: [{
							'id': '0',
							'checked': false,
							'dictValue': '故障排查'
						}, {
							'id': '1',
							'checked': false,
							'dictValue': '水位计校核'
						}],
						current: 0
					},
					waterSiteCheckPhotos: [],
					waterSiteCheckResult: 1,
					waterSiteCheckRemark: '',
					//墒情站检查数据
					groundSiteCheckItems: {
						items: [{
							'id': '0',
							'checked': false,
							'dictValue': '故障排查'
						}, {
							'id': '1',
							'checked': false,
							'dictValue': '墒情计校核'
						}],
						current: 0
					},
					groundSiteCheckPhotos: [],
					groundSiteCheckRemark: '',
					groundSiteCheckResult: 1,
					//其他设备检查
					othersEquipmentCheckItems: {
						items: [{
							'id': '0',
							'checked': false,
							'dictValue': '设备接地检测'
						}, {
							'id': '1',
							'checked': false,
							'dictValue': '电源电压检测'
						}, {
							'id': '2',
							'checked': false,
							'dictValue': '太阳能板检查'
						}, {
							'id': '3',
							'checked': false,
							'dictValue': '蓄电池检查'
						}, {
							'id': '4',
							'checked': false,
							'dictValue': '网络通信检查'
						}],
						current: 0
					},
					othersEquipmentCheckPhotos: [],
					othersEquipmentCheckRemark: '',
					otherEquipmentCheckResult: 1,
					//设备替换
					equipmentsReplaceItems: {
						items: [{
							'id': '0',
							'checked': false,
							'dictValue': 'RTU'
						}, {
							'id': '1',
							'checked': false,
							'dictValue': '雨量计'
						}, {
							'id': '2',
							'checked': false,
							'dictValue': '水位计'
						}, {
							'id': '3',
							'checked': false,
							'dictValue': '墒情计'
						}, {
							'id': '4',
							'checked': false,
							'dictValue': '蓄电池'
						}, {
							'id': '5',
							'checked': false,
							'dictValue': '太阳能板'
						}, {
							'id': '6',
							'checked': false,
							'dictValue': '充电控制器'
						}, {
							'id': '7',
							'checked': false,
							'dictValue': '其他'
						}],
						current: 0
					},
					rtuModelRemark: '',
					rtuReplacePhotos: [],
					rainSensorModelRemark: '',
					rainSensorReplacePhotos: [],
					waterSensorModelRemark: '',
					waterSensorReplacePhotos: [],
					groundSensorModelRemark: '',
					groundSensorReplacePhotos: [],
					batteryModelRemark: '',
					batteryReplacePhotos: [],
					sunPowerModelRemark: '',
					sunPowerReplacePhotos: [],
					batteryControlModelRemark: '',
					batteryControlReplacePhotos: [],
					otherEquipmentModelRemark: '',
					otherEquipmentReplacePhotos: [],
					//巡检遗留问题描述
					inspectionRemainProblemsRemark: '',
					//工作留存数据
					inspectionWorkPhotos: [],

				},
			}
		},
		onLoad(options) {
			console.log("ddddd onLoad")
		},
		onShow() {
			console.log("ddd onShow")
		},
		created() {
			console.log("dddd created")
			console.log("id " + this.inspectionId)
			let params = {};
			params['id'] = this.inspectionId;
			console.log("id " + this.inspectionId)
			this.getDetail(params);
		},
		computed: {
			getSiteKind() {
				let htmltext = '';
				if (this.data.isRain === 1) {
					htmltext = htmltext + "雨量站";
				}
				if (this.data.isRiver == 1 || this.data.isRes == 1) {
					if (htmltext.length > 0) {
						htmltext = htmltext + ' / ';
					}
					htmltext = htmltext + '水位站';
				}
				if (this.data.isGround == 1) {
					if (htmltext.length > 0) {
						htmltext = htmltext + ' / ';
					}
					htmltext = htmltext + '墒情站';
				}
				if (this.data.isVideo == 1) {
					if (htmltext.length > 0) {
						htmltext = htmltext + ' / ';
					}
					htmltext = htmltext + '视频站';
				}
				return htmltext;
			},
			getAreaName() {
				let htmltext = '';
				if (this.data.adCity) {
					htmltext = htmltext + this.data.adCity;
				}
				if (this.data.adDist) {
					if (htmltext.length > 0) {
						htmltext = htmltext + ' / ';
					}
					htmltext = htmltext + this.data.adDist;
				}
				return htmltext;
			},
			getSiteCheckStatus() {
				return this.data.siteCheckStatus.items[this.data.siteCheckStatus.current].dictValue;
			},
			getRainSiteCheckItems() {
				//console.log(JSON.stringify(this.data.rainSiteCheckItems))
				let text = '';
				for (let i = 0; i < this.data.rainSiteCheckItems.items.length; i++) {
					if (this.data.rainSiteCheckItems.items[i].checked) {
						if (text.length > 0) {
							text = text + ' / ';
						}
						text = text + this.data.rainSiteCheckItems.items[i].dictValue;
					}
				}
				return text;
			},
			getWaterSiteCheckItems() {
				let text = '';
				for (let i = 0; i < this.data.waterSiteCheckItems.items.length; i++) {
					if (this.data.waterSiteCheckItems.items[i].checked) {
						if (text.length > 0) {
							text = text + ' / ';
						}
						text = text + this.data.waterSiteCheckItems.items[i].dictValue;
					}
				}
				return text;
			},
			getGroundSiteCheckItems() {
				let text = '';
				for (let i = 0; i < this.data.groundSiteCheckItems.items.length; i++) {
					if (this.data.groundSiteCheckItems.items[i].checked) {
						if (text.length > 0) {
							text = text + ' / ';
						}
						text = text + this.data.groundSiteCheckItems.items[i].dictValue;
					}
				}
				return text;
			},
			getOthersEquipmentCheckItems() {
				let text = '';
				for (let i = 0; i < this.data.othersEquipmentCheckItems.items.length; i++) {
					if (this.data.othersEquipmentCheckItems.items[i].checked) {
						if (text.length > 0) {
							text = text + ' / ';
						}
						text = text + this.data.othersEquipmentCheckItems.items[i].dictValue;
					}
				}
				return text;
			},
		},
		methods: {
			toOss(path) {
				return oss + path;
			},
			toBack() {
				uni.navigateBack({
					delta: 1
				})
			},
			getDetail(params = {}) {
				console.log(JSON.stringify(params))
				let that = this;
				this.query = {};
				Object.assign(this.query, params);
				console.log(JSON.stringify(this.query))
				http.request({
					url: '/galaxy-business/equipment/inspection/report/detail',
					method: 'GET',
					params: this.query
				}).then(res => {
					if (res.success) {
						that.data.rtuName = res.data['rtuName'];
						that.data.rtuCode = res.data['rtuCode'];
						that.data.isRain = res.data['isRain'];
						that.data.isRiver = res.data['isRiver'];
						that.data.isRes = res.data['isRes'];
						that.data.isGround = res.data['isGround'];
						that.data.lng = res.data['lng'];
						that.data.lat = res.data['lat'];
						that.data.adCity = res.data['adCity'];
						that.data.adDist = res.data['adDist'];
						that.data.locationDesc = res.data['locationDesc'];
						that.data.siteCheckStatus.current = Number(res.data['siteCheckItem']);
						that.data.siteCheckRemark = res.data['siteCheckRemark'];
						that.data.siteCheckPhotoCount = 0;
						that.data.siteCheckPhotos = [];
						let photos = res.data['siteCheckPhotos'];
						if (null != photos && photos.length > 0) {
							let photoList = photos.split(",");
							that.data.siteCheckPhotos = photoList;
							//that.data.siteCheckPhotoCount = photoList.length;
						}
						//雨量站检查
						let items = res.data['rainSiteCheckItem'];
						if (null != items && items.length > 0) {
							let itemList = items.split(",");
							that.data.rainSiteCheckItems.items[0].checked = (itemList[0] == 0) ? false : true;
							that.data.rainSiteCheckItems.items[1].checked = (itemList[1] == 0) ? false : true;
							that.data.rainSiteCheckItems.items[2].checked = (itemList[2] == 0) ? false : true;
						}

						that.data.rainSiteCheckResult = res.data['rainSiteCheckResult'];
						//that.data.rainSiteCheckPhotoCount = 0;
						that.data.rainSiteCheckPhotos = [];
						photos = res.data['rainSiteCheckPhotos'];
						if (null != photos && photos.length > 0) {
							let photoList = photos.split(",");
							that.data.rainSiteCheckPhotos = photoList;
							//that.data.rainSiteCheckPhotoCount = photoList.length;
						}
						that.data.rainSiteCheckRemark = res.data['rainSiteCheckRemark'];
						//水位站检查
						items = res.data['waterSiteCheckItem'];
						if (null != items && items.length > 0) {
							let itemList = items.split(",");
							that.data.waterSiteCheckItems.items[0].checked = (itemList[0] == 0) ? false : true;
							that.data.waterSiteCheckItems.items[1].checked = (itemList[1] == 0) ? false : true;
						}
						//that.data.waterSiteCheckPhotoCount = 0;
						that.data.waterSiteCheckPhotos = [];
						photos = res.data['waterSiteCheckPhotos'];
						if (null != photos && photos.length > 0) {
							let photoList = photos.split(",");
							that.data.waterSiteCheckPhotos = photoList;
							//that.data.waterSiteCheckPhotoCount = photoList.length;
						}
						that.data.waterSiteCheckRemark = res.data['waterSiteCheckRemark'];
						that.data.waterSiteCheckResult = res.data['waterSiteCheckResult'];
						items = res.data['groundSiteCheckItem'];
						if (null != items && items.length > 0) {
							let itemList = items.split(",");
							that.data.groundSiteCheckItems.items[0].checked = itemList[0] == 0 ? false : true;
							that.data.groundSiteCheckItems.items[1].checked = itemList[1] == 0 ? false : true;
						}
						//that.data.groundSiteCheckPhotoCount = 0;
						that.data.groundSiteCheckPhotos = [];
						photos = res.data['groundSiteCheckPhotos'];
						if (null != photos && photos.length > 0) {
							let photoList = photos.split(",");
							that.data.groundSiteCheckPhotos = photoList;
							//that.data.groundSiteCheckPhotoCount = photoList.length;
						}
						that.data.groundSiteCheckRemark = res.data['groundSiteCheckRemark'];
						that.data.groundSiteCheckResult = res.data['groundSiteCheckResult'];
						items = res.data['otherEquipmentCheckItem'];
						if (null != items && items.length > 0) {
							let itemList = items.split(",");
							that.data.othersEquipmentCheckItems.items[0].checked = itemList[0] == 0 ? false : true;
							that.data.othersEquipmentCheckItems.items[1].checked = itemList[1] == 0 ? false : true;
							that.data.othersEquipmentCheckItems.items[2].checked = itemList[2] == 0 ? false : true;
							that.data.othersEquipmentCheckItems.items[3].checked = itemList[3] == 0 ? false : true;
							that.data.othersEquipmentCheckItems.items[4].checked = itemList[4] == 0 ? false : true;

						}
						//that.data.othersEquipmentCheckPhotoCount = 0;
						that.data.othersEquipmentCheckPhotos = [];
						photos = res.data['otherEquipmentCheckPhotos'];
						if (null != photos && photos.length > 0) {
							let photoList = photos.split(",");
							that.data.othersEquipmentCheckPhotos = photoList;
							//that.data.othersEquipmentCheckPhotoCount = photoList.length;
						}
						that.data.othersEquipmentCheckRemark = res.data['otherEquipmentCheckRemark'];
						that.data.otherEquipmentCheckResult = res.data['otherEquipmentCheckResult'];
						that.data.equipmentsReplaceItems.items[0].checked = res.data['rtuReplace'] == 0 ? false :
							true;
						that.data.equipmentsReplaceItems.items[1].checked = res.data['rainSensorReplace'] == 0 ?
							false :
							true;
						that.data.equipmentsReplaceItems.items[2].checked = res.data['waterSensorReplace'] == 0 ?
							false :
							true;
						that.data.equipmentsReplaceItems.items[3].checked = res.data['groundSensorReplace'] == 0 ?
							false : true;
						that.data.equipmentsReplaceItems.items[4].checked = res.data['batteryReplace'] == 0 ?
							false :
							true;
						that.data.equipmentsReplaceItems.items[5].checked = res.data['sunPowerReplace'] == 0 ?
							false :
							true;
						that.data.equipmentsReplaceItems.items[6].checked = res.data['batteryControllerReplace'] ==
							0 ?
							false : true;
						that.data.equipmentsReplaceItems.items[7].checked = res.data['otherEquipmentReplace'] ==
							0 ?
							false : true;

						that.data.rtuModelRemark = res.data['rtuModelRemark'];
						that.data.rtuReplacePhotos = [];
						photos = res.data['rtuReplacePhotos'];
						if (null != photos && photos.length > 0) {
							let photoList = photos.split(",");
							that.data.rtuReplacePhotos = photoList;
							//that.data.inspectionWorkPhotoCount = photoList.length;
						}
						that.data.inspectionRemainProblemsRemark = res.data['remainQuestion'];
						that.data.rtuReplacePhotos = [];
						photos = res.data['rtuReplacePhotos'];
						if (null != photos && photos.length > 0) {
							let photoList = photos.split(",");
							that.data.rtuReplacePhotos = photoList;
							//that.data.inspectionWorkPhotoCount = photoList.length;
						}
						that.data.rainSensorModelRemark = res.data['rainSensorModelRemark'];
						that.data.rainSensorReplacePhotos = [];
						photos = res.data['rainSensorReplacePhotos'];
						if (null != photos && photos.length > 0) {
							let photoList = photos.split(",");
							that.data.rainSensorReplacePhotos = photoList;
							//that.data.inspectionWorkPhotoCount = photoList.length;
						}
						that.data.waterSensorModelRemark = res.data['waterSensorModelRemark'];
						that.data.waterSensorReplacePhotos = [];
						photos = res.data['waterSensorReplacePhotos'];
						if (null != photos && photos.length > 0) {
							let photoList = photos.split(",");
							that.data.waterSensorReplacePhotos = photoList;
							//that.data.inspectionWorkPhotoCount = photoList.length;
						}
						that.data.groundSensorModelRemark = res.data['groundSensorModelRemark'];
						that.data.groundSensorReplacePhotos = [];
						photos = res.data['groundSensorReplacePhotos'];
						if (null != photos && photos.length > 0) {
							let photoList = photos.split(",");
							that.data.groundSensorReplacePhotos = photoList;
							//that.data.inspectionWorkPhotoCount = photoList.length;
						}
						that.data.batteryModelRemark = res.data['batteryModelRemark'];
						that.data.batteryReplacePhotos = [];
						photos = res.data['batteryReplacePhotos'];
						if (null != photos && photos.length > 0) {
							let photoList = photos.split(",");
							that.data.batteryReplacePhotos = photoList;
							//that.data.inspectionWorkPhotoCount = photoList.length;
						}
						that.data.sunPowerModelRemark = res.data['sunPowerModelRemark'];
						that.data.sunPowerReplacePhotos = [];
						photos = res.data['sunPowerReplacePhotos'];
						if (null != photos && photos.length > 0) {
							let photoList = photos.split(",");
							that.data.sunPowerReplacePhotos = photoList;
							//that.data.inspectionWorkPhotoCount = photoList.length;
						}
						that.data.batteryControlModelRemark = res.data['batteryControllerModelRemark'];
						that.data.batteryControllerReplacePhotos = [];
						photos = res.data['batteryControllerReplacePhotos'];
						if (null != photos && photos.length > 0) {
							let photoList = photos.split(",");
							that.data.batteryControllerReplacePhotos = photoList;
							//that.data.inspectionWorkPhotoCount = photoList.length;
						}
						that.data.otherEquipmentModelRemark = res.data['otherEquipmentModelRemark'];
						that.data.otherEquipmentReplacePhotos = [];
						photos = res.data['otherEquipmentReplacePhotos'];
						if (null != photos && photos.length > 0) {
							let photoList = photos.split(",");
							that.data.otherEquipmentReplacePhotos = photoList;
							//that.data.inspectionWorkPhotoCount = photoList.length;
						}
						//that.data.inspectionWorkPhotoCount = 0;
						that.data.inspectionWorkPhotos = [];
						photos = res.data['inspectionWorkPhotos'];
						if (null != photos && photos.length > 0) {
							let photoList = photos.split(",");
							that.data.inspectionWorkPhotos = photoList;
							//that.data.inspectionWorkPhotoCount = photoList.length;
						}
						that.data.inspectionRemainProblemsRemark = res.data['remainQuestion'];

					}
				}).catch(err => {
					console.log(err)
				})
			},

		}
	}
</script>

<style>
	/* page {
		background-color: rgb(240, 242, 244);
	} */
</style>

<style lang="scss" scoped>

	.uni-body {
		font-size: 0.7rem;
	}

	.decoration {
		width: 6px;
		height: 6px;
		margin-right: 4px;
		border-radius: 50%;
		background-color: cadetblue;
	}

	.view-flex-rs {
		display: flex;
		flex-direction: row;
		justify-content: flex-start;
		align-items: center;
	}

	.view-flex-rs-flex-wrap {
		display: flex;
		flex-direction: row;
		justify-content: flex-start;
		flex-wrap: wrap;
	}

	.view-flex-rc {
		display: flex;
		flex-direction: row;
		justify-content: center;
		align-items: center;
	}

	.view-flex-re {
		display: flex;
		flex-direction: row;
		justify-content: flex-end;
		align-items: center;
	}

	.view-flex-cs {
		display: flex;
		flex-direction: column;
		justify-content: flex-start;
		align-items: center;
	}

	.view-flex-cc {
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
	}

	.view-flex-ce {
		display: flex;
		flex-direction: column;
		justify-content: flex-end;
		align-items: center;
	}

	.cell-hover-class {
		background-color: rgb(235, 237, 238);
	}

	.view-flex-ce {
		display: flex;
		flex-direction: column;
		justify-content: flex-end;
	}

	.line-body {
		padding-left: 10px;
		padding-right: 10px;
	}

	.item-text-line {
		width: 100%;
		display: flex;
		flex-direction: row;
		justify-content: flex-start;

		.item-title {
			font-size: 0.7rem;
			font-weight: bold;
		}

		.item-text {
			overflow: hidden;
			margin-left: 5px;
			font-size: 0.7rem;
			white-space: nowrap;
			text-overflow: ellipsis;
		}

		.item-text-block {
			margin-left: 5px;
			font-size: 0.7rem;
			word-wrap: break-word;
			word-break: normal;
		}

		.error-text {
			color: #FF0000;
		}

		.normally-text {
			color: darkgreen;
		}

		.select-text {
			color: royalblue;
		}
	}

	.required-star {
		color: #FF0000;
		font-size: 15px;
		width: 20px;
		text-align: center;
		padding-left: 0px;
		padding-right: 2px;
	}

	.item-title {
		color: #909399;
		font-size: 15px;
	}

	.mline-text {
		padding-left: 2px;
		width: 100%;
		/* background-color:#909399; */
		height: 70px;
		border: 1px solid #FF5A5F;
		border-radius: 5px;
	}


	.img-container {
		margin-bottom: 0px;
		width: 100px;
		height: 100px;

		.note-image-box {
			margin-top: 0px;
			display: flex;
			flex-wrap: wrap;
			padding: 10px;

			.note-image-item {
				position: relative;
				width: 100%;
				height: 0;
				padding-top: 100%;
				box-sizing: border-box;
				// background-color: #18B566;

				.close-icon {
					display: flex;
					justify-content: center;
					align-items: center;
					position: absolute;
					right: 0px;
					top: 0px;
					width: 22px;
					height: 22px;
					border-radius: 50%;
					background-color: #d5d5d5;
					z-index: 2;
				}

				.image-box {
					display: flex;
					justify-content: center;
					align-items: center;
					position: absolute;
					top: 0px;
					right: 0px;
					border: 0px;
					left: 0px;
					border: 1px #eee solid;
					border-radius: 5px;
					overflow: hidden;
					width: 99%;
					height: 99%;

				}


			}
		}
	}

	.input-body {
		background-color: #fff;
		padding: 10px;
	}
</style>
