<template>
	<view>
		<view class="warp" v-for="(item,index) in list" :key="index" @click="toDetail(item)">
			<!-- <view class="title">此处为标题内容</view> -->
			<view class="infobox">
				<view class="infoleft">
					<view class="tip">审批类型：{{item.formapproval && item.formapproval.name}}</view>
					<view class="tip">审请人：{{item.create_staff.name}}</view>
					<view class="tip" style="font-size:24rpx;">
						<image :src="BASE_IMG_URL+'time_over.png'" class="clockimg" mode=""></image>
						{{item.createtime}}
					</view>
				</view>
				<image :src="BASE_IMG_URL+'statusone.png'" v-if="item.check_status == 1 || item.check_status == 0" class="rightimg" mode=""></image>
				<image :src="BASE_IMG_URL+'statustwo.png'" v-if="item.check_status == 2" class="rightimg" mode=""></image>
				<image :src="BASE_IMG_URL+'statusthr.png'" v-if="item.check_status == 3" class="rightimg" mode=""></image>
			</view>
		</view>
		<view class="noData" v-if="list.length == 0">暂无更多</view>
	</view>
</template>

<script>
	import { BASE_IMG_URL } from '@/util/api.js'
	
	export default{
		props:{
			list:{
				type:Array,
				default:()=>{
					return []
				}
			}
		},
		data() {
			return{
				BASE_IMG_URL:BASE_IMG_URL,
			}
		},
		methods:{
			toDetail(item) {
				uni.navigateTo({
					url:'/pagesA/work/approve/approveDetail?id='+item.id+'&formid='+item.formapproval_id+'&name='+item.formapproval.name
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.noData{
		margin:120rpx auto;
		text-align: center;
		font-size: 26rpx;
		color:#666;
	}
	.warp{
		box-sizing: border-box;
		width: 690rpx;
		background: #FFFFFF;
		border-radius: 20rpx;
		margin:24rpx auto 0;
		padding:24rpx 30rpx 8rpx;
		.title{
			font-size:28rpx;
			color:#666666;
			padding-bottom:24rpx;
			border-bottom:1rpx solid #f5f5f5;
			overflow: hidden;
			text-overflow:ellipsis;
			white-space: nowrap;
		}
		.infobox{
			display: flex;
			justify-content: space-between;
			align-items: center;
			padding-right:30rpx;
			// padding-top:20rpx;
			.infoleft{
				.tip{
					display: flex;
					justify-content: flex-start;
					align-items: center;
					font-size:26rpx;
					color:#999999;
					margin-bottom:15rpx;
					.clockimg{
						width:24rpx;
						height:24rpx;
						margin-right:15rpx;
					}
				}
			}
			.rightimg{
				width:122rpx;
				height:96rpx;
			}
		}
	}
</style>
