<template>
  <div id="containt">
    <component
      v-if="showWfContent && wfContent"
      :is="wfContent"
      visible-key="showWfContent"
      :_dataId.sync="wfDataId"
      :parent-target="_self"
      :toWfArea.sync="toWfArea"
      @reload="$reloadHandle"
    ></component>
  </div>
</template>

<script>
export default {
  data() {
    return {
      reportCode: null,
      showWfContent: true,
      wfContent: null,
      wfDataId: '',
      toWfArea: true
    };
  },
  created() {
    this.initData();
  },
  methods: {
    initData() {
      let wfDataId = this.$route.query.wfDataId;
      let wfUrl = this.$route.query.wfUrl;

      let url = wfUrl + '.vue';
      let id = wfDataId;
      this.wfDataId = !id || typeof id == 'object' ? 0 : id;
      // this.showWfDialog = true;
      this.showWfContent = true;
      this.wfContent = require('@/views' + url).default;

    }
  }
};
</script>

<style></style>
