<template>
  <div>
    <div class="app-container">
      <div class="container">
        <iframe :src="iframeURL"
          frameborder="0"
          width="100%"
          height="800px"></iframe>
      </div>
    </div>
  </div>
</template>

<script setup>
import { useRoute } from 'vue-router'
import { getTicketId } from '@/api'
import { onMounted } from 'vue'
const route = useRoute()
const ticket = ref('')
const iframeURL = ref('')
onMounted(() => {
  getTicketId({
    id: route.query.id
  }).then(response => {
    ticket.value = response.data.accessTicket
    iframeURL.value = `https://bi.aliyun.com/token3rd/dashboard/view/pc.htm?pageId=db99e0ec-f416-4abd-97be-d1543b286de8&embedDisplayParam=%7B%22showTitle%22%3Afalse%7D&accessTicket=${ticket.value}`
  })
})
</script>

<style scoped></style>