<template>
<el-dialog

  :modal="true"
  :close-on-click-modal="false"
  :close-on-press-escape="false"
  destroy-on-close
  title="查看日志"
  :model-value="dialogVisible"
  :append-to-body="true"
  :before-close="handleClose"
>
 <div class="form">
   <diy-el-form v-model:model-form="forms" :span="24" :forms="dataImputationRecordDetailDialogForm"/>
 </div>

</el-dialog>
</template>

<script>
import {dataImputationRecordDetailDialogForm} from "@/data/all-forms";
import DiyElForm from "@/components/common/DiyElForm.vue";
import {onBeforeMount, ref} from "vue";
import {getDataImputationDialogTabled} from "@/service/data-gj/data-imputation-record";

export default {
  name: "DataImputationRecordDetailDialog",
  components: {DiyElForm},
  props:{
    dialogVisible:{

    },
    currentDialogObj:{}
  },
  setup(props,{emit}){
    const forms = ref({

    })
    onBeforeMount(() => {
      getDataImputationDialogTabled(props.currentDialogObj.BATCH_ID).then(res => {
          if (res.msg[0]&&res.msg[0]?.Rows[0]){
            forms.value = {
              ...forms.value,
              ...(res.msg[0]?.Rows[0] || {})
            }
          }
      })
    })
    function handleClose(){
      emit('update:dialogVisible',false)
    }
    return {
      handleClose,
      dataImputationRecordDetailDialogForm,
      forms
    }
  }
}
</script>

<style scoped lang="scss">
 .form{
   max-width:700px;
   margin-left: auto;
   margin-right: auto;

 }
</style>
