52 lines
953 B
Vue
52 lines
953 B
Vue
|
|
<template>
|
|
<div>
|
|
<div class="iframe_warp_header">
|
|
<iframe :src="iframeUrl" class="iframe_warp"></iframe>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
<script lang="ts">
|
|
export default {
|
|
name: "MaturationWarn"
|
|
};
|
|
</script>
|
|
<script lang="ts" setup>
|
|
|
|
import { reactive, onMounted, nextTick, toRefs, ref} from 'vue'
|
|
|
|
const iframeUrl = ref('http://172.22.10.217:8088/report/#/bidm/config-render/render/7');
|
|
|
|
const state = reactive({
|
|
spinning: true,
|
|
})
|
|
const {
|
|
spinning,
|
|
} = toRefs(state);
|
|
function init() {
|
|
const iframe = document.getElementById('_iframe')
|
|
// console.log(111, iframe)
|
|
if (!iframe) return false
|
|
iframe.onload = () => {
|
|
state.spinning = false
|
|
}
|
|
}
|
|
onMounted(() => nextTick(() => init()))
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
.iframe_warp_header {
|
|
height: calc(100vh - 40px);
|
|
width: 100%;
|
|
}
|
|
.iframe_warp {
|
|
width: 100%;
|
|
height: 100%;
|
|
.ant-spin-container,
|
|
.my_iframe {
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
}
|
|
</style>
|