device.vue 3.57 KB
<template>
	<view class="device-page">
		<!-- 公共组件-每个页面必须引入 -->
		<public-module></public-module>
		<view class="org-sty">
			<view class="org-item">
				<view class="u-flex" style="flex-direction: row;margin-top: 26rpx;margin-left: 15rpx;">
					<image style="width: 30rpx;height: 30rpx;" src="../../static/org.png" mode=""></image>
					<text style="color:#333333;font-size: 15px;margin-left: 14rpx;">组织关系</text>
				</view>
				<view style="margin-top: 5rpx;margin-left: 15rpx" class=""><text style="color:#666666;font-size: 12px;">设备数:1234</text></view>
			</view>
			<view class="org-item" style="">
				<image style="width: 10px;height: 10px;float: right; margin-right: 34rpx; margin-top: 58rpx;" src="../../static/right-arrow.png" mode=""></image>
			</view>
		</view>
		<view class="device-list">
			<view class="list-item" v-for="(item, index) in list" :key="index">
				<view class="item">
					<view>
						<text style="color:#333333;font-size: 15px;">{{ item.name1 }}</text>
					</view>
					<view class="u-flex" style="flex-direction: column;justify-content: flex-start;margin-top: 8rpx;">
						<view>
							<text style="color:#666666;font-size: 14px;">{{ item.name2 }}</text>
						</view>
						<view style="margin-left: -122rpx;">
							<text style="color:#666666;font-size: 14px;">{{ item.name3 }}</text>
						</view>
					</view>
				</view>
				<view class="item">
					<view class="u-flex" style="flex-direction: row;margin-top: -6rpx;">
						<image style="width: 30rpx;height: 30rpx;margin-top: 5rpx;margin-right: 5rpx;" :src="item.name4" mode=""></image>
						<view class="">
							<text style="color: #377DFF;font-size: 13px;margin-left: 5rpx;margin-top: 20rpx;">{{ item.name5 }}</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 {
			list: [
				{
					name1: '1号楼1楼三单元水表',
					name2: '设备编号:SN987633433',
					name3: '所属组:XXXXXX',
					name4: '../../static/online.png',
					name5: '在线'
				},
				{
					name1: '2号楼1楼三单元水表',
					name2: '设备编号:SN987633433',
					name3: '所属组:XXXXXX',
					name4: '../../static/online.png',
					name5: '在线'
				},
				{
					name1: '3号楼1楼三单元水表',
					name2: '设备编号:SN987633433',
					name3: '所属组:XXXXXX',
					name4: '../../static/baojing.png',
					name5: '离线'
				},
				{
					name1: '4号楼1楼三单元水表',
					name2: '设备编号:SN987633433',
					name3: '所属组:XXXXXX',
					name4: '../../static/unonline.png',
					name5: '未激活'
				},
				{
					name1: '5号楼1楼三单元水表',
					name2: '设备编号:SN987633433',
					name3: '所属组:XXXXXX',
					name4: '../../static/online.png',
					name5: '在线'
				}
			]
		};
	},
	onLoad() {
		// 隐藏原生的tabbar
		uni.hideTabBar();
	}
};
</script>

<style lang="scss" scoped>
.device-page {
	padding: 0rpx 15rpx;
	min-height: 100vh;
	background-color: #f8f9fa;
}
.org-sty {
	width: 750rpx;
	height: 150rpx;
	margin-top: 1rpx;
	background-color: #fff;
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	.org-item {
		width: 350rpx;
		height: 200rpx;
	}
}
.device-list {
	display: flex;
	flex-direction: column;
	.list-item {
		height: 200rpx;
		background-color: #fff;
		margin-top: 24rpx;
		display: flex;
		flex-direction: row;
		border-radius: 10px;
		justify-content: space-between;
		.item {
			margin: 30rpx;
		}
	}
}
</style>