<template>
  <div class="app-container">
    <el-card class="container">
      <template #header>
        <div class="card-header">
          <span>报表列表</span>
        </div>
      </template>
      <div v-for="item in reportList"
        class="item">
        <el-link icon="Document"
          :href="baseURL + item.previewUrl"
          target="_blank">{{ item.name }}</el-link>
      </div>
    </el-card>
  </div>
</template>

<script setup>
import { getReportListAPI } from '@/api'
const baseURL = ref(import.meta.env.VITE_APP_REPORT_URL + '/report')
const reportList = ref([])
const getReportList = async () => {
  const { data } = await getReportListAPI()
  reportList.value = data
}
getReportList()
</script>

<style scoped
  lang="scss">
  .item {
    margin: 10px 0;
  }
</style>