<template>
  <BasicModal
    :width="800"
    :footer="null"
    :title="types === 0 ? '超期未检验电梯' : '超期未保养电梯'"
    @register="registerInnerModal"
  >
    <BasicTable @register="registerTable"> </BasicTable>
  </BasicModal>
</template>
<script lang="ts" setup>
import { defineModel, defineExpose, ref } from 'vue';
import { BasicTable, useTable } from '@/components/Table';
import { BasicModal, useModalInner } from '@/components/Modal';
import { infoList } from '@/api/basicInfo/elevator';
import { columns4 } from './trapped.data';
import dayjs from 'dayjs';
const arrayPass = ref<any>(null);
const [registerInnerModal, { modalLoading, closeModal }] = useModalInner(
  async (data: { arrayPass: any }) => {
    const { arrayPass } = data;
    console.log(arrayPass, '000-------------------------------------');
    modalLoading(true);
    arrayPass.value = arrayPass;
    await initEleList(arrayPass);

    modalLoading(false);
  },
);

const initEleList = async (arrayPass) => {

  const res = await infoList({ elevatorNumlist: arrayPass });

  setTableData(res.rows);
};
const [registerTable, { reload, setTableData }] = useTable({
  title: '',
  showIndexColumn: false,
  useSearchForm: false,
  showTableSetting: false,
  columns: columns4,
});
</script>

<style lang="less" scoped>
/deep/.ant-card-body {
  padding: 0 !important;
}
</style>
