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

<script>
import { getToken } from '@/utils/auth'
import { getBiUrl } from '@/api/tool/jimu'
import iFrame from '@/components/iFrame/index.vue'
import {getCurrentDeptTree} from "@/api/business/unit";

export default {
  name: "orderInfo",
  components: {
    iFrame
  },
  data() {
    return {
      url: ''
    }
  },
  created() {
    this.init()
  },
  methods: {
    init() {
      getCurrentDeptTree().then(response => {
        let deptIds = response.data.map((item) => {
          return item.deptId
        })
        console.log('deptIds',deptIds.join(','))
        this.url = `http://${window.location.hostname}:8099/jmreport/view/1174907222744879104?token=Bearer `+ getToken()
        console.log('url', this.url)
      });
    },
  }
}
</script>
