<template>
  <div v-loading="loading">
    <!-- <div v-if="link">
      <iframe
        :src="link"
        frameborder="0"
        width="100%"
        scrolling="auto"
        id="iframe"
        class="iframe-container"
      ></iframe>
    </div> -->
    <el-button type="primary" @click="realvisitscreenFn">请点击跳转商户实时走访大屏</el-button>
  </div>
</template>

<script>
import { Base64 } from "js-base64";
export default {
  data() {
    return {
      link: "",
      loading: false
    };
  },
  mounted() {
    let paramsString = "";
    let deptId = this.$store.state.user.deptId;
    let deptType = this.$store.state.user.deptType;
    let str1 = Base64.encode("bank_no=" + deptId);
    let str2 = Base64.encode("bank_level=" + deptType);
    paramsString = `${str1}&${str2}`;
    this.link = `http://64.202.32.42/share/b1f9665b4632ca89362f8003d3589973?${paramsString}`;
    this.realvisitscreenFn();
  },
  methods: {
    realvisitscreenFn(){
      window.open(this.link)
    }
  }
};
</script>

<style  scoped>
.iframe-container {
  position: relative;
  width: 100%;
  min-height: calc(100vh - 150px);
  border: none;
  padding-bottom: 16px;
}
</style>