<template>
	<view class="page-box-bg-fff r-30 p-30 sys-weight-400" :class="is_margin_top?'m-t20':''">
		<StatisticsTitle :genre="genre" :leftText="leftText" :rightText="rightText" @onHandle="onHandle">
		</StatisticsTitle>
		<view v-if="is_type == 1">
			<view class="ranking_item sys-from-background-color m-b16 r-20 p-20 p-tb40" v-for="(item,index) in 3"
				:key="index">
				<view class="row-justify-sb center sys-weight-400 size-28 color-000 r-20">
					<view class="row-c line-40">
						<image class="wh-36 m-r20" :src="`/static/img/statistics/${iconList[index]}.png`"
							mode="aspectFill">
						</image>
						<text>综合业务部一部</text>
					</view>
					<text>34笔</text>
					<view class="sys-weight-600 line-30">
						<text class=" text-color-12 m-r10">800万</text>
						<uni-icons type="forward" size="14" color="#D8D8D8"></uni-icons>
					</view>
				</view>
			</view>
		</view>
		<view v-if="is_type == 2">
			<view class="ranking_item sys-from-background-color m-b16 r-20 p-20 row-justify-sb center"
				v-for="(item,index) in 3" :key="index">
				<view class="row-c sys-weight-400">
					<image class="wh-36 m-r20" :src="`/static/img/statistics/${userIconList[index]}.png`"
						mode="aspectFill">
					</image>
					<image class="wh-60" src="/static/img/index/index-avatar.png" mode=""></image>
					<view class="column m-l16">
						<text class="size-28 text-color-000 p-b10">张三</text>
						<text class="size-24 text-color-666">2024.12.14 12:45</text>
					</view>
				</view>
				<text class="size-28 color-000 sys-weight-600">200万</text>
			</view>
		</view>
		<view v-if="is_type == 3">
			<view class="ranking_item sys-from-background-color m-b16 r-20 p-20 row-justify-sb center"
				v-for="(item,index) in 4" :key="index">
				<view class="row-c sys-weight-400">
					<image class="wh-60 m-r30" :src="`/static/img/statistics/${taskIconLsit[index]}.png`"
						mode="aspectFill">
					</image>
					<text class="size-28 text-color-000 p-b10">房抵业务</text>
				</view>
				<view class="row-c">
					<text class="size-28 color-000 sys-weight-600 m-r10">200万</text>
					<uni-icons type="forward" size="16" color="#8F99B1"></uni-icons>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import StatisticsTitle from "./statistics_title.vue";

	export default {
		name: 'stat_ranking',
		components: {
			StatisticsTitle
		},
		props: {
			genre: {
				type: Number,
				default: 0
			},
			is_type: {
				type: Number,
				default: 1
			},
			is_margin_top: {
				type: Boolean,
				default: true
			},
			leftText: {
				type: String,
				default: ''
			},
			rightText: {
				type: String,
				default: '全部'
			},
		},
		data() {
			return {
				iconList: ['champion', 'runner-up', 'third'],
				userIconList: ['one', 'two', 'three'],
				taskIconLsit: ['task-one', 'task-two', 'task-three', 'task-four']
			};
		}
	}
</script>

<style lang="scss" scoped>
	.ranking_item:last-child {
		margin-bottom: 0;
	}
</style>