<template>
	<view :style="{height:'100vh',overflow:'hidden',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="" v-for="item in list" style="margin: 10px;background-color: #fff;padding: 10px;">
				<view class="item">
					<text>{{item.stationCode}}</text>
					<text>{{item.tm}}</text>
					
				</view>
				<view class="contentItem">
					<view class="itemC">
						<text>预警级别:</text>
						<text>{{item.level===1?'黄色':'红色'}}</text>
					</view>
					<view class="itemC">
						<text>监测值(mm):</text>
						<text>{{item.value}}</text>
					</view>
					<view class="itemC">
						<text>阈值:</text>
						<text>{{item.time}}</text>
					</view>
					<view class="itemC">
						<text>校验规则描述:</text>
						<text>{{item.ruleDesc}}</text>
					</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'
					},
					{
						title: '5-29日常巡检',
						state: 1,
						xjx: '上游坝面、坝顶',
						name: '王自荣',
						time: '2024-05-30 09:31:23'
					},
				]
			};
		},
		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
			},
			toDetail(){
				uni.navigateTo({
					url:'/pages/wtcl/detail/index'
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.myTitleStyle {
		font-size: 30px;
		background-color: red;
		height: 200px;
	}

	.tabsClass {
		margin-top: 44px;
		height: 44px;
		padding: 0 40px;
		border-top: 1px solid #eee;
		border-bottom: 1px solid #eee;
	}

	.item {
		border-bottom: 1px solid #f0f0f0;
		padding-bottom: 10px;
		display: flex;
		justify-content: space-between;

		.title {
			border-width: 0px;
			font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑', sans-serif;
			font-weight: 700;
			font-style: normal;
			font-size: 15px;
			color: #666666
		}

		.titleRight {
			display: flex;

		}

	}
	.contentItem{
		display: flex;
		flex-wrap: wrap;
		.itemC{
			display: flex;
			justify-content: space-between;
			display: flex;
			color: #666666;
			padding: 10px;
		}
	}
</style>