<script>
import { getToken } from "@/utils/auth";
export default {
  name: "bi",
  data() {
    return {

    };
  },
  //可访问data属性
  created() {

  },
  //计算集
  computed: {

  },
  //方法集
  methods: {
    async closeOuterTab() {
      await this.$nextTick();
      this.$tab.closePage();
    }
  },
  render(h) {
    const token = getToken();
    if (!token) {
      this.$message.warning("获取auth令牌失败");
      this.closeOuterTab();
      return;
    }
    window.open(`${process.env.VUE_APP_BI_SYSTEM_ADDRESS}?DSK_SYSTEM_AUTH_TOKEN=${token}`, "DSK_BI_SYSTEM");
    this.closeOuterTab();
  },
}
</script>
<style lang="scss" scoped>
</style>
