<template>
  <Dialog
    v-model="dialogVisible"
    diaTitle="报告模板预览"
    width="80%"
    height="700"
    @close="closeFun"
  >
    <div class="flow-box">
      <ReportView type="review" :reportFileId="reportFileId" :reportUuid="reportUuid"></ReportView>
    </div>
  </Dialog>
</template>
<script setup lang="ts">
import Dialog from '@/components/common/dialog/index.vue';
import { computed, onMounted } from 'vue';
import ReportView from './reportView.vue';

const props = defineProps({
  showDialog: {
    type: Boolean,
    default: false,
  },
  reportFileId: {
    type: String,
    default: '',
  },
  reportUuid: {
    type: String,
    default: '',
  },
});
const emits = defineEmits(['update:showDialog']);

const dialogVisible = computed({
  get() {
    return props.showDialog;
  },
  set(val) {
    emits('update:showDialog', val);
  },
});

const closeFun = () => {
  emits('update:showDialog', false);
};

onMounted(async () => {});
</script>
<style lang="scss" scoped>
.flow-box {
  height: calc(100% - 4px);
}
</style>
