<template>
  <div class="bigBox">
    <div class="top-btn">
      <el-button class="btn-clas" @click="handleClose">
        <span>返回</span>
      </el-button>
    </div>

    <div class="config">
      <div class="title-lable">
        <el-icon class="lable-bq">
          <Management />
        </el-icon>
        <span class="titles">责任书预览</span>
      </div>
      <div class="box-big">
        <div class="content">
          <iframe :src="pdfurl" :width="'100%'" height="100%" frameborder="0" scrolling="no" title="在线Word文档"></iframe>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup>
import { ref, onMounted, defineProps, defineEmits, reactive, watch } from "vue";
import { getFileUrl, getFile } from "@/utils/getFile.js";
const emits = defineEmits(["changedialog"]);
const pdfurl = ref('')
const props = defineProps({
  files: {
    type: String,
    default: ''
  },

});


onMounted(async () => {
  pdfurl.value = await getFileUrl(props.files);
});


// 关闭
const handleClose = () => {
  UE.getEditor('editor').setEnabled()
  emits("changedialog", false);
};
// 保存

</script>
<style lang="scss" scoped>
.config {
  margin: 20px auto;
  height: 82vh;
  background-color: #fff;
  width: 1482px;
}

.content {
  width: 1480px;
  height: 78vh;
}
</style>
