/**
 * 考核信息-列表
 */

import React from 'react';
import VMTable from '../../../vm-table';

interface ListProps {
    khData: Array<any>;
}

const List = (props: ListProps) => {
    const { khData } = props;

    // const { khData, zgData } = BaseService.useAppraisal(id, startTime, endTime);
    const columns = [
        {
            title: '考核扣分',
            dataIndex: 'totalDeductPoints',
            key: 'totalDeductPoints',
        },
        {
            title: '考核时间',
            dataIndex: 'checkDate',
            key: 'checkDate',
            width: 140,
        },
        {
            title: '考核单位',
            dataIndex: 'checkDepartName',
            key: 'checkDepartName',
            width: 160,
            ellipsis: true,
        },
        {
            title: '考核人',
            dataIndex: 'checkUserName',
            key: 'checkUserName',
        },
        {
            title: '记录状态',
            dataIndex: 'statusName',
            key: 'statusName',
        },
        {
            title: '操作',
            dataIndex: 'operation',
            key: 'operation',
            render: () => {
                return <a onClick={() => {}}>查看图片集</a>;
            },
        },
    ];

    const tableProps = {
        height: 440,
        pagination: {
            current: 1,
            pageSize: 10,
        },
    };

    return (
        <div className="appraisal-content-list">
            <div className="appraisal-content-list-table">
                <VMTable columns={columns} rowKey="key" {...tableProps} dataSource={khData} />
            </div>
        </div>
    );
};

export default List;
