<!DOCTYPE html>
<html>
	<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>

	</head>
	<div id="app">
		<div class="wrapper" v-cloak>
			<!-- 商户头部信息 -->
			<div class="header">
				<van-search v-model="merName" show-action placeholder="请输入商家关键词" @search="onSearch">
					<template #action>
						<div @click="onSearch"></div>
					</template>
				</van-search>
				<!-- Tab栏 -->
				<van-tabs v-model:active="activeTab" @click="tabChange" title-active-color="#1989fa" line-height="2px"
					style="margin-bottom: 15px;">
					<van-tab title="隐患整改" name="0"></van-tab>
					<van-tab title="整改逾期" name="1"></van-tab>
				</van-tabs>
			</div>

			<van-list v-model:loading="loading" :offset="10" :finished="finished" finished-text="没有更多了" @load="getList" :immediate-check="false">
				<van-cell v-for="item in hazardList" :key="item.id" @click="viewDetail(item)">
					<div style="width: 100%;position: relative;">
						<!-- 第一行：商户名称 -->
						<div class="tab1-row1 bold">{{ item.merName }}</div>
				  
						<!-- 第二行：场所类型 + 检查单位（两列） -->
						<div class="tab1-row1">
						  <span>{{ item.placeType }}</span>
						</div>
				  
						<!-- 第三行：监察人 + 检查日期（两列） -->
						<div class="tab1-row2">
						  <span>上报日期：{{ item.pushDate }}</span>
						   <span>上报人：{{ item.pushPeople }}</span>
						</div>

						<div class="tab1-row1">
							<span v-if="activeTab=='0'">整改次数:{{ item.rectificationCount }}</span>
							<span v-if="activeTab=='1'">整改截止日期：{{ item.rectificationDeadline }}</span>
						</div>
					</div>
				
				</van-cell>
			</van-list>
		</div>
	</body>

</html>