<template>
  <BasicModal v-bind="$attrs" @register="registerModal" :title="title" :showFooter="showFooter" @ok="handleSubmit" width="90%" :showCancelBtn="false" :showOkBtn="false">
    <!--引用表格-->
    <BasicTable @register="registerTable" :ellipsis="false">
      <!--插槽:table标题-->
      <!-- <template #tableTitle>
        <a-button type="primary" preIcon="ant-design:export-outlined" v-auth="'monitor-export'" @click="onExportXlsx"> 导出</a-button>
        <j-upload-button type="primary" preIcon="ant-design:import-outlined" v-auth="'monitor-import'" @click="onImportXls">导入</j-upload-button>
        <j-upload-button type="primary" preIcon="ant-design:import-outlined" v-auth="'monitor-import'" @click="onImportXlsHis">导入历史</j-upload-button>
      </template> -->
      <!--操作栏-->
    </BasicTable>
  </BasicModal>
</template>

<script setup lang="ts">
  import { ActionItem, BasicTable, TableAction } from '/@/components/Table';
  import { useListPage } from '/@/hooks/system/useListPage';
  import { BasicModal, useModalInner } from '/@/components/Modal';
  import { ref } from 'vue'
  import { listHis,  } from '../api';
  import { columnsHis, searchFormSchemaHis } from '../data';

  //注册model
  //表单赋值
  const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
    
  });
  // 列表页面公共参数、方法
  const { tableContext, onExportXlsx, onImportXls } = useListPage({
    tableProps: {
      title: '重点建设用地安全利用率',
      api: listHis,
      columns:columnsHis,
      canResize: false,
      actionColumn: {
        width: 120,
        fixed: 'right',
      },
      showActionColumn: false,
      formConfig: {
        labelWidth: 120,
        schemas: searchFormSchemaHis,
        autoSubmitOnEnter: true,
        showAdvancedButton: false,
      },
    },
    
  });
  //BasicTable绑定注册
  const [registerTable, { reload }, {}] = tableContext;

  const title = ref("导入历史")
  const showFooter = ref(false);
  function handleSubmit(){

  }
  /**
   * 成功回调
   */
  function handleSuccess() {
    reload();
  }
  
  
</script>
