<!DOCTYPE html>
<html lang="zh-CN">

	<head>
		<meta charset="UTF-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport"
			content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0, viewprot-fit:cover">
		<title>消防安全检查清单</title>
		<script type="text/javascript" src="../sdk/includeHead.js"></script>
		<script type="text/javascript" src="_check_info_data.js"></script>
	</head>

	<body>
		<!-- 原 HTML 主体内容保持不变 -->
		<div id="app">
			<div class="checklist-header">
				<p  v-if="flag=='ADD'">
					1.不合格或不满足等选择“否”的检查项，需将问题进行拍照上传，并描述问题详情。<br>
					2.检查人员对管辖范围内企业安全情况负责，需如实上报。
				</p>
				<h5>九小场所安全检查清单</h5>
			</div>
			<div class="checklist-container">
				<div class="item_title">
					{{ checkData[checkPageIndex].title }}
				</div>
				<div v-for="(item, index) in checkData[checkPageIndex]['gqCheckItemVoList']" :key="item.id" class="check-item">
					<div class="item-header">
						<!-- <div class="item-number">{{ index + 1 }}</div> -->
						<div class="item-title">{{ index + 1 }}.{{ item.name }}</div>
					</div>

					<!-- 单选按钮组 -->
					<van-radio-group v-model="item.selected" @change="handleSelectionChange(item)"
						:disabled="flag!=='ADD'" direction="horizontal">
						<van-radio name="yes">是</van-radio>
						<van-radio name="no">否</van-radio>
						<van-radio name="na">不涉及</van-radio>
					</van-radio-group>

					<!-- 否选项扩展内容 -->
					<div v-show="item.selected === 'no'" class="expand-section">
						<div>
							<!-- 子检查项 -->
							<div class="sub-checkbox-group" v-if="flag=='ADD'">
								<van-checkbox v-for="(subItem, subIndex) in item.gqCheckQuestionDtoList" :key="subIndex"
									v-model="subItem.check" shape="square">
									{{ subItem.name}}
								</van-checkbox>
							</div>


							<!-- 隐患描述-新增情况 -->
							<van-cell-group v-if="flag=='ADD'">
								<p class="title_require">请输入隐患描述</p>
								<van-field v-model="item.description" type="textarea" rows="1"></van-field>
							</van-cell-group>
							<!-- 隐患描述-非新增情况 -->
							<van-cell-group v-if="flag!=='ADD'">
								<p class="title_require">请输入隐患描述</p>
								<p class="yh_desc">{{item.description||'未配置安全出口指示标志'}}</p>
							</van-cell-group>
						

							<!-- 照片上传 -->
							<van-cell-group v-if="flag=='ADD'">
								<van-cell><span class="title_require">请上传隐患图片:</span><span
										style="color: red;">(格式png/jpg/jpeg,最多4张)</span>
									<div>
										<van-uploader style="width: 80px; height:80px;" v-model="item.photos"
											:max-count="4" :after-read="handleFileUpload" class="uploader-wrapper" />
									</div>
								</van-cell>
							</van-cell-group>
							
							<van-cell-group>
								<van-cell  v-if="flag==='JC_XQ' || flag==='YH_XQ' ||  flag==='ZG_XQ' ">
									<span class="">隐患图片:</span>
									<div>
										<img src="https://dummyimage.com/90x90 " alt="" srcset="" />
										<img src="https://dummyimage.com/90x90 " alt="" srcset="" />
										<img src="https://dummyimage.com/90x90 " alt="" srcset="" />
										<img src="https://dummyimage.com/90x90 " alt="" srcset="" />
									</div>
								</van-cell>
								
								<van-cell  v-if="flag==='JC_XQ' || flag==='YH_XQ'"><span class="">整改情况:</span>
									<div>
										<img src="https://dummyimage.com/90x90 " alt="" srcset="" />
										<img src="https://dummyimage.com/90x90 " alt="" srcset="" />
										<img src="https://dummyimage.com/90x90 " alt="" srcset="" />
										<img src="https://dummyimage.com/90x90 " alt="" srcset="" />
									</div>
								</van-cell>
							</van-cell-group>
							
							<van-cell-group v-if="flag=='ZG_XQ'">
								<van-cell><span class="title_require">请上传整改图片:</span><span
										style="color: red;">(格式png/jpg/jpeg,最多4张)</span>
									<!-- <div>
										<van-uploader style="width: 80px; height:80px;" v-model="item.photos" multiple
											:max-count="4" :after-read="handleFileUpload" class="uploader-wrapper" />
									</div> -->
									<van-uploader v-model="item.photos" multiple  :max-count="2" />
								</van-cell>
							</van-cell-group>

							<!-- 整改期限 -->
							<van-cell-group v-if="flag=='ADD'">
								<van-cell>

									<div class="limit_date_wrapper">
										<span class="title_require">整改期限:</span>
										<select class="day_select" name="" v-model="item.deadlineDays"
											@change="handleDeadlineConfirm($event, item)">
											<option value="1">1</option>
											<option value="3">3</option>
											<option value="5">5</option>
											<option value="7">7</option>
										</select>
										<span> 截止整改日期: <b style="color:#148ef7">{{item.deadlineDate}}</b></span>
									</div>
								</van-cell>
							</van-cell-group>
							<van-cell-group v-if="flag!=='ADD'">
								<van-cell>
									<div class="limit_date_wrapper">
										<span>整改期限:  {{checkDate}}</span>
									</div>
								</van-cell>
							</van-cell-group>
						</div>
					</div>
				</div>
				<van-form>
					<van-cell>
						<van-field label="检查人员" v-model="checkPerson" readonly />
					</van-cell>
					<van-cell>
						<van-field label="检查日期" v-model="checkDate" />
					</van-cell>
					<van-cell v-if="flag==='YH_XQ'||flag==='ZG_XQ'">
						<van-field label="整改截止日期" v-model="checkDate" />
					</van-cell>
					<van-cell v-if="flag==='YH_XQ'">
						<van-field label="审核日期" v-model="checkDate" />
					</van-cell>
					<van-cell v-if="flag==='YH_XQ'">
						<van-field label="审核记录" v-model="checkDate" />
					</van-cell>
				</van-form>


				<!-- 隐患详情底部栏 -->
				<!-- 	<div class="bottom_bar">
					<div>
						<van-button type="primary" size="small" @click="navTo1" >上报行业主管部门</van-button>
						<van-button type="info" size="small" @click="navTo1" >限期3天整改</van-button>
					</div>
				</div> -->
				
				<div class="bottom_bar" v-if="flag=='ZG_XQ'">
					<div style="display: flex;justify-content: center;gap: 1rem;">
						<van-button type="info" size="small" @click="navTo1" style="width:2rem" >提交整改</van-button>
					</div>
				</div>
				
				<div class="bottom_bar" v-if="flag=='YH_XQ'">
					<div style="display: flex;justify-content: center;gap: 1rem;">
						<van-button type="danger" size="small" @click="navTo1" style="width:2rem" >拒绝</van-button>
						<van-button type="info" size="small" @click="navTo1" style="width:2rem" >通过</van-button>
					</div>
				</div>

				<!-- 新增底部栏 -->
				<div class="bottom_bar" v-if="flag=='ADD' || flag=='JC_XQ'">
					<div>
						<span class="check_num">{{ notNullCount }}/{{totalItems}}</span>
						<span class="yh_num">{{noCount}} 隐患</span>
						<van-button type="info" size="small" @click="navTo1"
							v-show="checkPageIndex===3&&flag=='ADD'">完成检查</van-button>
						<van-button v-show="checkPageIndex<3" type="info" size="small"
							@click="checkPageIndex++">下一项</van-button>
					</div>

				</div>
			</div>
			
		</div>
	</body>

</html>