<template>
	<view :style="{height:'100vh',overflow:'auto',backgroundColor: '#f0f0f0'}">
		<u-status-bar></u-status-bar>
		<u-navbar title="气象预警" :autoBack="true" :titleStyle="{
				fontSize:'18px'
			}" :height='44' :safeAreaInsetTop=true leftIconSize='20' leftIconColor='rgb(153, 153, 153)'>
		</u-navbar>
		
		<view class="" style="margin-top:44px;border-top: 1px solid #f0f0f0">
			<view class="itemYj">
				<view class="itemYjCont" v-for="item in list" >
					<view class="item" >
						<view class="justify-between">
							<image src="../../../static/c1.png"  style="width: 79px;height: 68px;"></image>
							<view class="">
								<view class="title">
									{{item.title}}
								</view>
								<view class=title>
									[Ⅱ级/严重]
								</view>
								<view class="time">
									{{item.tm}}
								</view>
							</view>
						</view>
						<view class="content">
							{{item.content}}
						</view>
					</view>
				</view>
			</view>
			

		</view>
		<u-calendar :show="show" mode="range" @confirm="confirm" @cancel='cancel'></u-calendar>
	</view>
</template>

<script>
	import moment from 'moment'

	export default {
		data() {
			return {
				show: false,
				model: {
					stm: '',
					etm: ''
				},
				customStyle: {
					background: '#000'
				},
				list: [{
						title: '5-29日常巡检',
						state: 0,
						xjx: '上游坝面、坝顶',
						name: '王自荣',
						time: '2024-05-30 09:31:23',
						type:'水位告警',
					},
					{
						title: '5-29日常巡检',
						state: 1,
						xjx: '上游坝面、坝顶',
						name: '王自荣',
						time: '2024-05-30 09:31:23',
						type:'水位告警',
					},
					{
						title: '5-29日常巡检',
						state: 1,
						xjx: '上游坝面、坝顶',
						name: '王自荣',
						time: '2024-05-30 09:31:23',
						type:'水位告警',
					},
				]
			};
		},
		onLoad(options){
			// this.list = JSON.parse(decodeURIComponent(options.arr))
		},
		methods: {
			confirm(e) {
				console.log(e);
				this.model.stm = e[0]
				this.model.etm = e[1]
				this.show = false
			},
			cancel() {
				this.show = false
			}
		}
	}
</script>

<style lang="scss" scoped>
	.itemYj{
		.itemYjCont{
			    margin: 10px;
			    background: #fff;
				padding: 10px;
				.title{
					    font-family: 'Arial Normal', 'Arial', sans-serif;
					    font-weight: 400;
					    color: #333333;
					    vertical-align: none;
						font-size: 16px;
						text-align: center;
				}
				.time{
					    font-size: 14px;
					    color: #7F7F7F;
						text-align: right;
				}
				.content{
					font-size: 14px;
					letter-spacing: 1px;
					color: #333333;
				}
		}
	}
	
</style>