import { BasicColumn, FormSchema } from '@/components/Table';
import { h } from 'vue';
import { Switch, Tag } from 'ant-design-vue';
import { setRoleStatus } from '@/api/demo/system';
import { useMessage } from '@/hooks/web/useMessage';

type CheckedType = boolean | string | number;
export const columns: BasicColumn[] = [
  {
    title: '任务名称',
    dataIndex: 'taskName',
  },
  {
    title: '任务时间',
    dataIndex: 'taskDate',
  },

  {
    title: '图片数量',
    dataIndex: 'imageCount',
  },
  {
    title: '创建时间',
    dataIndex: 'createTime',
  },
];

export const searchFormSchema: FormSchema[] = [
  {
    field: 'taskName',
    label: '任务名称',
    component: 'Input',
    colProps: { span: 8 },
  },
  {
    field: '[beginDate, endDate]',
    component: 'RangePicker',
    label: '日期范围',
    componentProps: {
      format: 'YYYY-MM-DD',
      placeholder: ['开始日期', '结束日期'],
    },
    colProps: { span: 8 },
  },
];

export const formSchema: FormSchema[] = [
  {
    field: 'taskName',
    label: '任务名称',
    required: true,
    component: 'Input',
  },
  {
    field: 'taskDate',
    label: '任务时间',
    required: true,
    component: 'DatePicker',
  },
];
