<template>
	<view class="sbox">
		<u-list @scrolltolower="scrolltolower" height="100%">
			<u-list-item v-for="(item, index) in list" :key="item.id">
				<view class="sbox-item">
					<view class="sbox-item-top adfacjb">
						<view class="sbox-item-top-left adfac">
							<image :src="imgBase+'avatar.png'"></image>
							<text>{{item.memberName||''}}</text>
							<view class="type">{{item.categoryName}}</view>
						</view>
						<view class="sbox-item-top-right adfac">
							<image :src="imgBase+'send_success.png'"></image>
							<!-- <image :src="imgBase+'send_fail.png'"></image> -->
							<text>{{'发送成功'}}</text>
						</view>
					</view>
					<view class="sbox-item-pre first adfacjb">
						<view class="sbox-item-pre-left">报告名称：</view>
						<view class="sbox-item-pre-right">{{item.reportName||''}}/{{typeDict[item.type]||''}}</view>
					</view>
					<view class="sbox-item-pre adfacjb">
						<view class="sbox-item-pre-left">团队名称：</view>
						<view class="sbox-item-pre-right">{{item.teamName||''}}</view>
					</view>
					<view class="sbox-item-pre adfacjb">
						<view class="sbox-item-pre-left">发送时间：</view>
						<view class="sbox-item-pre-right">{{item.createDate||''}}</view>
					</view>
				</view>
			</u-list-item>
		</u-list>
	</view>
</template>

<script>
	export default {
		props:{
			list:{
				typeof:Array,
				default:[]
			}
		},
		data(){
			return {
				typeDict:{
					'1':'基础版',
					'2':'专业版',
					'3':'专家版'
				}
			}
		},
		methods:{
			scrolltolower(){
				this.$emit('scrolltolower')
			},
		}
	}
</script>

<style scoped lang="scss">
	.sbox{
		height: 100%;
		&-item{
			margin-top: 20rpx;
			background: #FFFFFF;
			border-radius: 24rpx;
			padding: 36rpx 24rpx;
			&-top{
				&-left{
					image{
						width: 48rpx;
						height: 48rpx;
					}
					text{
						font-family: PingFang-SC, PingFang-SC;
						font-weight: bold;
						font-size: 32rpx;
						color: #002846;
						line-height: 32rpx;
						margin-left: 20rpx;
					}
					.type{
						padding: 5rpx 16rpx;
						background: #FFF7DC;
						border-radius: 20rpx;
						margin-left: 11rpx;
						font-family: PingFangSC, PingFang SC;
						font-weight: 400;
						font-size: 22rpx;
						color: #BA9B31;
						line-height: 30rpx;
					}
				}
				&-right{
					image{
						width: 26rpx;
						height: 26rpx;
					}
					text{
						font-family: PingFangSC, PingFang SC;
						font-weight: 400;
						font-size: 24rpx;
						color: #95A5B1;
						line-height: 32rpx;
						margin-left: 6rpx;
					}
				}
			}
			&-pre{
				margin-top: 36rpx;
				&-left{
					font-family: PingFangSC, PingFang SC;
					font-weight: 400;
					font-size: 26rpx;
					color: #667E90;
					line-height: 26rpx;
					width: 130rpx;
				}
				&-right{
					width: calc(100% - 130rpx);
					padding-left: 10rpx;
					box-sizing: border-box;
					font-family: PingFangSC, PingFang SC;
					font-weight: 400;
					font-size: 26rpx;
					color: #002846;
					line-height: 26rpx;
					text-align: right;
				}
				&.first{
					margin-top: 24rpx;
					border-top: 1rpx solid #EFEFEF;
					padding-top: 24rpx;
				}
			}
		}
	}
</style>