index.vue 6.69 KB
<template>
	<view class="index-page">
		<!-- 公共组件-每个页面必须引入 -->
		<public-module></public-module>
		<view>
			<!-- 基础统计 -->
			<view class="basic-sty">
				<view class=""><text style="font-size: 15px;color:#333333">基础统计</text></view>
				<view class="basic" style="margin-top: 25rpx;">
					<view class="basic-item">
						<view class="item-child u-flex" style="justify-content: space-between;padding: 30rpx;">
							<image style="width: 50rpx;height: 50rpx;" src="../../static/device-total.png" mode=""></image>
							<text style="color:#333333;font-size: 14px;margin-left: 10rpx;">设备统计</text>
						</view>
						<view class="item-child u-flex" style="justify-content: space-between;align-items: center;">
							<view style="width: 200rpx;height: 150rpx;justify-content: space-between;flex-direction: column;" class="u-flex">
								<view style="height: 70rpx;font-size:14px;color:#333333;font-weight:500"><text>2</text></view>
								<view style="position:relative;top:-40rpx;height: 60rpx;font-size:12px;color:#999999"><text>在线</text></view>
							</view>
							<view style="margin-left: 45rpx;width: 200rpx;height: 150rpx;justify-content: space-between;flex-direction: column;" class="u-flex">
								<view style="height: 70rpx;font-size:14px;color:#333333;font-weight:500"><text>52</text></view>
								<view style="position:relative;top:-40rpx;height: 60rpx;font-size:12px;color:#999999"><text>离线</text></view>
							</view>
							<view style="margin-left: 45rpx;width: 200rpx;height: 150rpx;justify-content: space-between;flex-direction: column;" class="u-flex">
								<view style="height: 70rpx;font-size:14px;color:#333333;font-weight:500"><text>299</text></view>
								<view style="position:relative;top:-40rpx;height: 60rpx;font-size:12px;color:#999999"><text>未激活</text></view>
							</view>
						</view>
					</view>
					<view class="basic-item">
						<view class="item-child u-flex" style="justify-content: space-between;padding: 30rpx;">
							<image style="width: 50rpx;height: 50rpx;" src="../../static/alert.png" mode=""></image>
							<text style="color:#333333;font-size: 14px;margin-left: 10rpx;">告警统计</text>
						</view>
						<view class="item-child u-flex" style="justify-content: space-between;align-items: center;">
							<view style="width: 200rpx;height: 150rpx;justify-content: space-between;flex-direction: column;" class="u-flex">
								<view style="height: 70rpx;font-size:14px;color:#333333;font-weight:500"><text>12</text></view>
								<view style="position:relative;top:-40rpx;height: 60rpx;font-size:12px;color:#999999"><text>未处理</text></view>
							</view>
							<view style="margin-left: 45rpx;width: 200rpx;height: 150rpx;justify-content: space-between;flex-direction: column;" class="u-flex">
								<view style="height: 70rpx;font-size:14px;color:#333333;font-weight:500"><text>522</text></view>
								<view style="position:relative;top:-40rpx;height: 60rpx;font-size:12px;color:#999999"><text>已处理</text></view>
							</view>
							<view style="margin-left: 45rpx;width: 200rpx;height: 150rpx;justify-content: space-between;flex-direction: column;" class="u-flex">
								<view style="height: 70rpx;font-size:14px;color:#333333;font-weight:500"><text>99</text></view>
								<view style="position:relative;top:-40rpx;height: 60rpx;font-size:12px;color:#999999"><text>误报</text></view>
							</view>
						</view>
					</view>
				</view>
			</view>
			<view class="grid-container">
				<view class="grid-item">
					<view class="item-center">
						<view class="center"><image style="width: 100rpx;height: 100rpx;margin-top: 20rpx;" src="../../static/form.png" mode=""></image></view>
						<view class="center" style="position:relative;left:-34rpx;text-align: center;font-size: 13px;line-height: 144rpx;">
							<text style="font-size:13px;color:#333333">维修工单</text>
						</view>
					</view>
				</view>
				<view @click="openCamera" class="grid-item">
					<view class="item-center">
						<view class="center"><image style="width: 100rpx;height: 100rpx;margin-top: 20rpx;" src="../../static/camer.png" mode=""></image></view>
						<view class="center" style="position:relative;left:-34rpx;text-align: center;font-size: 13px;line-height: 144rpx;">
							<text style="font-size:13px;color:#333333">摄像头管理</text>
						</view>
					</view>
				</view>
				<view class="grid-item">
					<view class="item-center">
						<view class="center"><image style="width: 100rpx;height: 100rpx;margin-top: 20rpx;" src="../../static/device.png" mode=""></image></view>
						<view class="center" style="position:relative;left:-34rpx;text-align: center;font-size: 13px;line-height: 144rpx;">
							<text style="font-size:13px;color:#333333">设备接入</text>
						</view>
					</view>
				</view>
				<view @click="openOrgStatus" class="grid-item">
					<view class="item-center">
						<view class="center"><image style="width: 100rpx;height: 100rpx;margin-top: 20rpx;" src="../../static/status.png" mode=""></image></view>
						<view class="center" style="position:relative;left:-34rpx;text-align: center;font-size: 13px;line-height: 144rpx;">
							<text style="font-size:13px;color:#333333">组态</text>
						</view>
					</view>
				</view>
			</view>
		</view>
		<f-tabbar></f-tabbar>
	</view>
</template>

<script>
import fTabbar from '@/components/module/f-tabbar/f-tabbar';

export default {
	components: {
		fTabbar
	},
	data() {
		return {
			openCamera() {
				uni.navigateTo({
					url: 'camera/camera'
				});
			},
			openOrgStatus() {
				uni.navigateTo({
					url: 'orgStatus/orgStatus'
				});
			}
		};
	},
	onLoad() {
		// 隐藏原生的tabbar
		uni.hideTabBar();
	}
};
</script>

<style lang="scss" scoped>
.index-page {
	padding: 27rpx 15rpx;
	min-height: 100vh;
	background-color: #f8f9fa;
}
.grid-container {
	display: grid;
	width: 750rpx;
	height: 400rpx;
	grid-template-columns: repeat(2, 350rpx);
	grid-template-rows: repeat(2, 200rpx);
	grid-gap: 20rpx;
	margin-top: 50rpx;
}

.grid-item {
	background-color: #fff;
	border: 0.01rpx solid #fff;
	padding: 40rpx;
	border-radius: 7px;
	.item-center {
		width: 290rpx;
		height: 150rpx;
		margin: -15rpx;
		display: flex;
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
		.center {
			width: 130rpx;
			height: 150rpx;
		}
	}
}
.basic-sty {
	padding: 0 10rpx;
	// margin-top: 50rpx;
	.basic {
		width: 750rpx;
		height: 500rpx;
		display: flex;
		justify-content: space-between;
		align-items: flex-start;
		flex-direction: column;
		.basic-item {
			width: 700rpx;
			height: 240rpx;
			background-color: #fff;
			display: flex;
			justify-content: space-between;
			align-items: flex-start;
			flex-direction: column;
			.item-child {
			}
		}
	}
}
</style>