import React from 'react';
import { Modal, Table } from 'antd';

const RecordModal: React.FC<{
  visible: boolean;
  record?: any;
  onCancel: () => void;
}> = ({ visible, onCancel }) => {
  const columns = [
    { title: '序号', dataIndex: 'index', render: (_: any, __: any, index: number) => index + 1 },
    { title: '操作人', dataIndex: 'user' },
    { title: '审批结果', dataIndex: 'result' },
    { title: '时间', dataIndex: 'time' },
  ];

  const data = [
    { key: '1', user: '张三', result: '通过', time: '2025-06-10' },
    { key: '2', user: '李四', result: '驳回', time: '2025-06-11' },
  ];

  return (
    <Modal title="审批记录" visible={visible} footer={null} onCancel={onCancel}>
      <Table rowKey="key" columns={columns} dataSource={data} pagination={false} />
    </Modal>
  );
};

export default RecordModal;
