<template>
  <i-frame :src="url"/>
</template>

<script>
import { getToken } from '@/utils/auth'
import { getReportUrl } from '@/api/tool/jimu'
import iFrame from "@/components/iFrame/index.vue"

export default {
  name: "ReportDesign",
  components: {
    iFrame
  },
  data() {
    return {
      url: ''
    }
  },
  created() {
    this.init()
  },
  methods: {
    init() {
      getReportUrl().then(res => {
        this.url = res + "?token=Bearer " + getToken()
      }).catch(error => {
        console.error("获取报表URL失败:", error)
      })
    }
  }
}
</script>
