提交 ddecda14 authored 作者: lidongxu's avatar lidongxu

refactor(jimu): 把tenantId换成部门 ID 的值

同上
上级 17c87096
...@@ -2,27 +2,24 @@ ...@@ -2,27 +2,24 @@
<i-frame :src="openUrl" <i-frame :src="openUrl"
id="jimuReportFrame"></i-frame> id="jimuReportFrame"></i-frame>
</template> </template>
<script> <script setup>
// 报表设计器 // 报表设计器
import { getToken } from '@/utils/auth' import { getToken } from '@/utils/auth'
import iFrame from '@/components/iFrame/index' import iFrame from '@/components/iFrame/index'
export default { // 获取 pinia 里保存的用户部门 id
name: "Jimu", import useUserStore from '@/store/modules/user'
components: { iFrame },
data() { // 这里写暴露的统一的网关地址
return { const store = useUserStore()
// 这里写暴露的统一的网关地址 const openUrl = ref(`${import.meta.env.VITE_APP_REPORT_URL}/report/jmreport/list?token=` + getToken() + `&tenantId=${store.$state.userInfo.deptId}`)
openUrl: `${import.meta.env.VITE_APP_REPORT_URL}/report/jmreport/list?token=` + getToken() + '&tenantId=${tenantId}',
};
}
};
</script> </script>
<style lang="scss" scoped> <style lang="scss"
#jimuReportFrame { scoped>
width: 100%; #jimuReportFrame {
// 为了隐藏积木报表顶部的广告栏 width: 100%;
min-height: calc(100vh - 40px) !important; // 为了隐藏积木报表顶部的广告栏
margin-top: -45px; min-height: calc(100vh - 40px) !important;
} margin-top: -45px;
}
</style> </style>
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论