<template>
	<view style="background:#f1f1f1;height:1500rpx" class="padding-sm">
		<view class="section1 section bg-white padding-xs">
			<view class=" static-tabs grid margin-bottom text-center col-3 margin-top-sm margin-bottom-sm">
				<view class="padding-sm active">报警信息统计</view>
				<view class="padding-sm">数据等级统计</view>
				<view class="padding-sm">设备运行转态</view>
			</view>
			<view class="time text-center">统计时段：2020年09月12日～2020年11月11日
			</view>
			<view class="echarts padding">
				<chart></chart>
			</view>
		</view>

		<!-- 宫格列表 -->
		<view class="section2 section  bg-white margin-top-sm margin-bottom-sm">
			<view class="cu-list grid" :class="['col-' + gridCol,gridBorder?'':'no-border']">
				<view class="cu-item" v-for="(item,index) in cuIconList" :key="index" v-if="index<gridCol*2">
					<view :class="['cuIcon-' + item.cuIcon,'text-' + item.color]">
						<view class="cu-tag badge" v-if="item.badge!=0">
							<block v-if="item.badge!=1">{{item.badge>99?'99+':item.badge}}</block>
						</view>
					</view>
					<text>{{item.name}}</text>
				</view>
			</view>
		</view>




		<view class="box ">
			<view class="cu-bar tabbar bg-white">
				<view class="action" @click="NavChange" data-cur="login">
					<view class="cuIcon-cu-image">
						<span class="icon iconfont">&#xe64e;</span>
					</view>
					<view class="text-green">主页</view>
				</view>
				<view class="action">
					<view class="cuIcon-cu-image">
						<span class="icon iconfont">&#xe606;</span>

					</view>
					<view class="text-gray">消息</view>
				</view>
				<view class="action">
					<view class="cuIcon-cu-image">
						<span class="icon iconfont">&#xe858;</span>
						<view class="cu-tag badge">99</view>
					</view>
					<view class="text-gray">分析</view>
				</view>
				<view class="action">
					<view class="cuIcon-cu-image">
						<span class="icon iconfont">&#xe606;</span>
						<view class="cu-tag badge"></view>
					</view>
					<view class="text-gray">设置</view>
				</view>
			</view>

		</view>
	</view>



</template>

<script>
	 import chart from './components/chart/chart.vue';

	export default {
		components: {
		   chart
		},
		data() {
			return {
				title: 'Hello222',
				InputBottom: 0,
				// 宫格列表
				cuIconList: [{
					cuIcon: 'cardboardfill',
					color: 'red',
					badge: 120,
					name: 'VR'
				}, {
					cuIcon: 'recordfill',
					color: 'orange',
					badge: 1,
					name: '录像'
				}, {
					cuIcon: 'picfill',
					color: 'yellow',
					badge: 0,
					name: '图像'
				}, {
					cuIcon: 'noticefill',
					color: 'olive',
					badge: 22,
					name: '通知'
				}, {
					cuIcon: 'upstagefill',
					color: 'cyan',
					badge: 0,
					name: '排行榜'
				}, {
					cuIcon: 'clothesfill',
					color: 'blue',
					badge: 0,
					name: '皮肤'
				}],
				modalName: null,
				gridCol: 3,
				gridBorder: false,
				menuBorder: false,
				menuArrow: false,
				menuCard: false,
				skin: false,
				listTouchStart: 0,
				listTouchDirection: null,
			};

		},
		onLoad() {},
		methods: {



			InputFocus(e) {
				this.InputBottom = e.detail.height
			},
			InputBlur(e) {
				this.InputBottom = 0
			}



		}
	}
</script>

<style>
	body {
		background: #f1f1f1 !important;
	}


	.switch-sex::after {
		content: "\e716";
	}

	.switch-sex::before {
		content: "\e7a9";
	}

	.switch-music::after {
		content: "\e66a";
	}

	.switch-music::before {
		content: "\e6db";
	}

	/* 
	.section {

		width: 100%;
		heght: 100rpx;
		background: pink
	} */

	.static-tabs {
		border-radius: 50rpx;
		border: 1rpx solid #4074E7;
	}

	.static-tabs>view {
		color: #4074E7;
		font-size: 30rpx;
	}

	.static-tabs>view.active {
		color: #fff;
		background: #4074E7
	}

	.static-tabs>view:first-child {
		border-top-left-radius: 50rpx;
		border-bottom-left-radius: 50rpx;
	}

	.static-tabs>view:nth-child(2) {
		border-left: 1px solid #4074E7;
		border-right: 1px solid #4074E7
	}

	.static-tabs>view:last-child {
		border-top-right-radius: 50rpx;
		border-bottom-right-radius: 50rpx;
	}


	/* 检测时间 */
	.time {
		border-radius: 50rpx;
		background: #FAFCFF;
		border: 1px solid #E8F1FF;
		padding: 20rpx;
		color: #666666;
		font-size: 28rpx;

	}

	.echarts {
		height: 630rpx;
		background: pink;
		display:inline-block;
		width:100%
	}


	/* 底部 */
	.box {
		position: fixed;
		bottom: 0;
		width: 100%;
		border-top: 1px solid pink
	}

	.cuIcon-cu-image .iconfont {
		width: 38rpx;
		height: 38rpx;
		display: inline-block;
		margin-bottom: 10rpx;
	}

	.text-gray {
		font-size: 26rpx;
	}
</style>
