<!-- 收费员业绩 -->
<template>
	<view class="performance">
		<template v-if="type === 'table'">
			<TableRanking :loading="loading" :title="title" :tableTh="tableTh" :tableData="tableData"/>
		</template>
		<template v-else>
			<LineChart :chartData="chartData" :title="title"/>
		</template>
	</view>
</template>

<script>
	import TableRanking from '@/components/tableRanking.vue'
	import LineChart from '@/components/lineChart.vue'
	export default {
		components: {
			TableRanking,
			LineChart
		},
		props: {
			type: {
				type: String,
				default: 'line'
			},
			loading: {
				type: Boolean,
				default: false
			},
			title: {
				type: String,
				default: ''
			},
			tableTh: {
				type: Array,
				default: () => []
			},
			tableData: {
				type: Object,
				default: () => {
					return {
						current: 1,
						total: 0,
						list: []
					}
				}
			},
			chartData: {
				type: Object,
				default: () => {
					return {}
				}
			}
		}
	}
</script>
