<template>
	<view>
		<view class="tabbox">
			<view class="tabli" v-for="(item,index) in list" :key="index" @click="toCreate(item)">
				<image :src="item.img" class="tabimg" mode=""></image>
				<view class="tabname">{{item.name}}</view>
			</view>
		</view>
	</view>
</template>

<script>
	import { netWorkExamineName } from '@/api/index'
	
	export default{
		data() {
			return{
				list:[]
			}
		},
		onLoad() {
			this.getTab()
		},
		methods:{
			getTab() {
				netWorkExamineName().then(res=>{
					this.list = res.data
				})
			},
			toCreate(item) {
				uni.navigateTo({
					url:'/pagesA/work/approve/createForm?id='+item.id+'&name='+item.name
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.tabbox{
		display: flex;
		justify-content: flex-start;
		align-items: center;
		flex-wrap: wrap;
		padding:30rpx;
		.tabli{
			flex-shrink: 0;
			width:187rpx;
			height:187rpx;
			box-shadow: 0px 0px 7px 0px rgba(0, 0, 0, 0.17);
			background:#fff;
			border-radius: 10rpx;
			display: flex;
			flex-direction: column;
			justify-content: center;
			align-items: center;
			margin-right:64rpx;
			margin-bottom:24rpx;
			&:nth-child(3n){
				margin-right:0;
			}
			.tabimg{
				width:70rpx;
				height:70rpx;
			}
			.tabname{
				font-size:26rpx;
				color:#666666;
				text-align: center;
				margin-top:15rpx;
			}
		}
	}
</style>
