<template>
	<div class="app-container" v-loading="loading">
		<el-row :gutter="20">
			<el-col :xs="24" :sm="24" :md="24" :lg="24">
				<el-card class="update-log">
					<template v-slot:header>
						<div class="clearfix">
							<span>赛事分析 {{ data && data.reportTime }}</span>
						</div>
					</template>
					<div class="body">
						<p v-if="!loading && data && data.report">
							{{ data && data.report }}
						</p>
						<el-empty v-else description="暂无数据"></el-empty>
					</div>
				</el-card>
			</el-col>
		</el-row>
	</div>
</template>

<script setup name="EventAnalysisReportDetail">
import { reportDetail } from '@/api/tc/eventAnalysisReport'
const route = useRoute()

const id = ref(0)
const data = ref({})
const loading = ref(false)

function getDetail() {
	loading.value = true
	reportDetail(id.value).then(res => {
		data.value = res.data
	}).finally(() => {
		loading.value = false
	})
}

onMounted(() => {
	if (route.query.id) {
		id.value = route.query.id
		getDetail()
	}
})


</script>
