<template>
  <div class="mesBusLog-container">
    <el-dialog v-model="state.isShowDialog" v-if="state.isShowDialog" fullscreen draggable="" :close-on-click-modal="false">
      <template #header>
        <div style="color: #fff">
          <span>{{ props.title }}</span>
        </div>
      </template>
      <div style="width:100%;height:100%;">
        <div id="pdf-container" style="height: 100%;width:100%;">
          <iframe ref="pdfviewerRef" :src="viewurl" frameborder="0" scrolling="no" style="height: 100%;width:100%;"></iframe>
        </div>
      </div>
    </el-dialog>
  </div>
</template>
    <style lang="scss" scoped>
:deep(.el-select),
:deep(.el-input-number) {
	width: 100%;
}
.mesBusLog-container :deep(.el-dialog__body){
  height: 100%;
}
</style>
    <script lang="ts" setup>
import { ref, onMounted, reactive } from 'vue';
import { ElMessage } from 'element-plus';
import type { FormRules } from 'element-plus';
import { formatDate } from '/@/utils/formatTime';

//父级传递来的参数
var props = defineProps({
	title: {
		type: String,
		default: '',
	},
});

//父级传递来的函数，用于回调
const emit = defineEmits(['reloadTable']);
const pdfviewerRef = ref();
const viewurl = ref('');
const handleQuery = () => {};
const state = reactive({
	isShowDialog: false,
});

// 页面加载时
onMounted(() => {});

// 打开弹窗
const openDialog = async (row: any) => {
	// 改用detail获取最新数据来编辑
	let rowData = JSON.parse(JSON.stringify(row));
  debugger
	viewurl.value = rowData.url;
	state.isShowDialog = true;
};

// 关闭弹窗
const closeDialog = () => {
	emit('reloadTable');
	state.isShowDialog = false;
};

// 取消
const cancel = () => {
	state.isShowDialog = false;
};

//将属性或者函数暴露给父组件
defineExpose({ openDialog });
</script>
    
    
    
    
    