import React, { useMemo } from 'react';
import DetailPro from '@/components/DetailPro';
import AutoTable from '@/components/AutoTable/mtable';
import { Tooltip } from "antd";
const Operatinghistory = ({ setdrawer, drawer }) => {
    const columns = useMemo(() => {
        return [
            {
                title: '操作时间',
                dataIndex: 'f3',
                key: 'f3',
                valueType: 'dateRange',
            },
            {
                title: '操作人',
                dataIndex: 'f4',
                key: 'f4'
            },
            {
                title: '操作类型',
                dataIndex: 'f20',
                key: 'f20',
                valueType: 'select',
                options: drawer.item.f12 == 1 ? [
                    { label: '闲置', value: '1' },
                    { label: '预占', value: '2' },
                    { label: '租赁', value: '3' },
                    { label: '待复检', value: '4' },
                    { label: '报废', value: '5' },
                    { label: '新增', value: '6' },
                    { label: '销售', value: '8' },
                ] : [
                    { label: '报废', value: '5' },
                    { label: '未绑定', value: '6' },
                    { label: '绑定', value: '7' },
                    { label: '新增', value: '8' },
                ]
            },
        ];
    }, [drawer.item]);
    return (
        <AutoTable
            columns={columns}
            path={'/'}
            resizeable={false}
            dataSource={[{ f1: '111', f2: '222', id: 1, status: 1, f12: 1, intelligentUnit: '11' }]}
            pageextra="none"
            bordered={false}
        />
    );
};
export default Operatinghistory;
