<template>
  <div v-loading="loading" :style="'height:'+ height">
    <iframe :src="src" frameborder="no" style="width: 100%;height: 100%" scrolling="auto"/>
  </div>
</template>

<script> 

  export default {
    name: "Ureport",
    data() {
      return {
        // src: "http://36.138.180.82:8905/gassafety/ureport/preview?_u=file:按条件查询报表测试.ureport.xml&_t=2,9,3&date=2024&complaintCategory=0",
        src: "http://localhost:8905/gassafety/ureport/preview?_u=file:按条件查询报表测试.ureport.xml&_t=2,9,3&date=2024&complaintCategory=0",
        height: document.documentElement.clientHeight - 94.5 + "px;",
        loading: true
      };
    },
    mounted: function() {
      setTimeout(() => {
        this.loading = false;
      }, 230);
      const that = this;
      window.onresize = function temp() {
        that.height = document.documentElement.clientHeight - 94.5 + "px;";
      };
    }
  };
</script>