<template>
  <i-frame :src="openUrl"
    id="jimuReportFrame"></i-frame>
</template>
<script setup>
// 报表设计器
import { getToken } from '@/utils/auth'
import iFrame from '@/components/iFrame/index'
// 获取 pinia 里保存的用户部门 id
import useUserStore from '@/store/modules/user'

const userStore = useUserStore()
const openUrl = ref(`${import.meta.env.VITE_APP_REPORT_URL}/report/jmreport/list?token=` + getToken() + `&tenantId=${userStore.$state.userInfo.deptId}`)
</script>

<style lang="scss"
  scoped>
  #jimuReportFrame {
    width: 100%;
    // 为了隐藏积木报表顶部的广告栏
    min-height: calc(100vh - 40px) !important;
    margin-top: -45px;
  }
</style>