<template>
  <el-container class="base_info">
    <el-main style="padding:0 10px;" class="content_wrapper">
      <iframe :src="'/pageofficePath/pageoffice/show?rgstrId='+currentNodeId+'&type='+wordType+'&persId='+persId" 
        frameborder="0" width="100%" height="100%" style="overflow: auto"></iframe>
    </el-main>
  </el-container>
</template>

<script>

import request from "@/utils/gw_ajax_request.js";

export default {
  components: {},
  props: ["currentNodeId","type"],
  data() {
    return {
      ywType:'1', // 业务类型 基础信息
      wordType:'',
    };
  },
  mounted: function() {
    
  },
  computed: {
    persId() {
        return localStorage.getItem("userid")
            ? localStorage.getItem("userid")
            : "1098101939614724096";
    },
  },
  methods: {
    async getBaseInfo() {
      await this.setWordType()
    },
    setWordType(){
       // 不足补零 1是基础信息
      if(this.type != undefined && this.type.length == 1){
        this.wordType = this.ywType + "0"+this.type;
      }else if(this.type.length == 2){
        this.wordType = this.ywType + this.type;
      }
    }
  },
  created: function() {
    this.getBaseInfo()
  },
  watch: {
    currentNodeId() {
      this.getBaseInfo();
    },
    type(){
      this.getBaseInfo();
    }
  }
};
</script>

<style>
.content_wrapper {
  height: calc(100vh - 190px);
  overflow-y: auto;
}
</style>
