<template>
  <el-dialog
    :title="$t1('查看单据流程')"
    :append-to-body="true"
    :modal-append-to-body="true"
    :close-on-click-modal="false"
    v-if="showWfDialog2"
    :visible.sync="showWfDialog2"
    :modal="false"
    custom-class="dialog-style designer-dialog"
    width="100%"
    height="100%"
    top="0px"
    bottom="0px"
    :destroy-on-close="true"
    v-el-drag-dialog
  >
    <iframe :src="wfUrl2" :style="'width:100%;height:' + ($root.$el.clientHeight - 30 - 12) + 'px'"></iframe>
  </el-dialog>
</template>

<script>
export default {
  props: {},
  data() {
    return {
      showWfDialog2: false,
      wfUrl2: ''
    };
  },
  methods: {
    wfEdit(row) {
      let wfUrl = row.url;
      let id = row.objId;

      /*let arr = wfUrl.split('/');

      let a = arr.slice(0, 2);
      let b = arr.slice(2);
      b.unshift('');

      let prefix = a.join('/');
      let url = b.join('/');*/

      this.showWfDialog2 = true;
      this.wfUrl2 = MAIN_WEB_PREFIX + '/index.html/#/user/wf/iframe/index?wfDataId=' + id + '&wfUrl=' + wfUrl;
    }
  }
};
</script>

<style></style>
