<template>
	<!-- 设备 -->
	<view class="work-container">
		<Search @search='search' @screen='screen'/>
		<view class="list">
			<view class="item" v-for="index in 6" :key='index'>
				<u-image src="https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/unicloudlogo.png" width='160' height="160">
					<template v-slot:error>
						<view class="image-error">
							<u-icon name="photo" color="#c7c7c7" size="38"></u-icon>
							<view style="font-size: 24rpx;">暂无图片</view>
						</view>
					</template>
				</u-image>
				<view class="text">
					<view class="title">
						电梯设备
					</view>
					<view class="dec1">
						SB52225456
					</view>
					<view class="dec2">
						四厂区二楼三车间
					</view>
				</view>
			</view>
		</view>
		<view style="height: constant(safe-area-inset-bottom); height: env(safe-area-inset-bottom);"></view>
	</view>
</template>

<script>
	export default {
		data() {
			return {

			}
		},
		methods: {
			// 搜索
			search(keyWord) {
				console.log(keyWord)
			},
			// 筛选
			screen() {
				console.log(222)
				this.$tab.navigateTo(`/pages/device/screen`)
			}
		}
	}
</script>

<style lang="scss" scoped>
	.list {
		padding-bottom: 20rpx;

		.item {
			margin-top: 20rpx;
			background: white;
			padding: 30rpx;
			display: flex;
			align-items: center;

			.text{
				margin-left: 20rpx;
				.title {
					font-size: 32rpx;
					font-weight: bold;
				}

				.dec1 {
					font-size: 28rpx;
					margin-top: 16rpx;
					color: #acacac;
				}

				.dec2 {
					font-size: 28rpx;
					margin-top: 6rpx;
					color: #acacac;
				}	
			}
		}
	}
	.image-error{
		text-align: center;
	}
</style>