<template>
	<view class="common-nav-container">
		<u-grid :border="true" @click="gridCheck" col="4">
			<u-grid-item v-for="(item,index) in gridItemList" :key="index" :name="item.url">
				<u-icon :customStyle="{paddingTop:20+'rpx'}" :name="item.icon" :size="128"></u-icon>
				<text class="grid-text">{{item.name}}</text>
			</u-grid-item>
		</u-grid>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				gridItemList: [
					{
						name: 'agv操作',
						icon: 'grid-fill',
						url: '/pages/agv/agv-action/agv-action'
					},
					{
						name: '上料工单',
						icon: 'grid-fill',
						url: '/pages/agv/agv-in/agv-in'
					},
				]
			}
		},
		methods: {
			gridCheck(url) {
				if (url === '') {
					return;
				}
				uni.navigateTo({
					url
				});
			},
		}
	}
</script>

<style scoped>
	.background {
		/* margin-top: 20px;
		height: 692px; */
		/* background-color: #4671d5; */
	}

	.title-box {
		width: 100%;
		height: 150px;
	}

	.grid-box {
		width: 100%;
		height: 100%;
	}

	.grid-box .item {
		width: 100%;
		height: 100%;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.item {
		background-color: rgba(128, 128, 128, 0.5);
	}

	.text {
		font-size: 24px;
		color: white;
	}
</style>