orgStatus.vue 1.96 KB
<template>
	<view class="status-page">
		<f-navbar navbarType="2" @leftClick="leftClick">
			<view class="u-flex" slot="left" style="justify-content: space-between;flex-direction: row;">
				<view style="width: 700rpx;"><u--input prefixIcon="search" placeholder="请输入组态名称" border="surround" shape="circle"></u--input></view>
			</view>
		</f-navbar>
		<!-- 公共组件-每个页面必须引入 -->
		<public-module></public-module>
		<view class="status-container">
			<view @click="openStatusDetail(item.id)" v-for="(item, index) in list" :key="index" class="status-item u-flex" style="flex-direction: column;justify-content: space-between;">
				<view style="margin-top: 38rpx;"><image style="width: 198rpx;height: 119rpx;" :src="item.icon" mode=""></image></view>
				<view style="position: relative;top: -25rpx;">
					<text style="color: #333333;font-size: 14px;">{{ item.name }}</text>
				</view>
			</view>
		</view>
		<f-tabbar></f-tabbar>
	</view>
</template>

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

export default {
	components: {
		fTabbar,
		fNavbar
	},
	data() {
		return {
			list: [
				{
					id:1,
					name: '智慧办公室1',
					icon: '../../../static/test.png'
				},
				{
					id:2,
					name: '智慧办公室2',
					icon: '../../../static/test.png'
				},
			]
		};
	},
	onLoad() {
		// 隐藏原生的tabbar
		uni.hideTabBar();
	},
	methods: {
		leftClick() {
			return false;
		},
		openStatusDetail(e){
			console.log(e);
			uni.navigateTo({
				url:'statusDetail'
			})
		}
	}
};
</script>

<style lang="scss" scoped>
.status-page {
	padding: 15rpx 15rpx;
}
.status-container {
	width: 700rpx;
	height: 250rpx;
	display: flex;
	flex-wrap: wrap;
	align-content: space-between;
	justify-content: space-between;
	flex-direction: row;
	.status-item {
		width: 300rpx;
		height: 250rpx;
		margin: 23rpx;
		background-color: #ffffff;
		border-radius: 20px;
	}
}
</style>