<template>
  <BasicModal v-bind="$attrs" @register="registerModal" :title="title" width="70%">
    <template #footer></template>
    <HistoryInfo :wrdkid="wrdkid" :scjdbm="scjdbm" dksdzt="1" :faid="faid" :type="type" :pgtype="pgtype" />
  </BasicModal>
</template>

<script setup>
  import { ref } from 'vue';
  import HistoryInfo from './HistoryInfo.vue';
  import { BasicModal, useModalInner } from '/@/components/Modal';
  const wrdkid = ref('');
  const scjdbm = ref('');
  const dksdzt = ref('');
  const faid = ref('');
  const type = ref('');
  const pgtype = ref('');

  const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
    setModalProps({ confirmLoading: false, showCancelBtn: data?.showFooter, showOkBtn: data?.showFooter });
    wrdkid.value = data.record.wrdkid;
    scjdbm.value = data.record.scjdbm;
    faid.value = data.record?.faid || '';
    type.value = data.record?.type || '';
    pgtype.value = data.record?.pgtype || '';
  });
  //设置标题
  const title = ref('抽查历史');
</script>
