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: 'caseNo',
    width: 200,
  },{
    title: '案件描述',
    dataIndex: 'caseDescription',
    width: 200,
  },{
    title: '办结状态',
    dataIndex: 'handleStatusName',
    width: 200,
  },{
    title: '上报人',
    dataIndex: 'createUsername',
    width: 200,
  },{
    title: '上报时间',
    dataIndex: 'createTime',
    width: 200,
  }
];

export const searchFormSchema: FormSchema[] = [
  {
    field: 'key',
    label: '关键字段',
    component: 'Input',
    colProps: { span: 6 },
  },
  {
    field: 'is_intact',
    component: 'Select',
    label: '案件状态',
    colProps: {
      span: 6,
    },
    componentProps: {
      options: [
        {
          label: '全部',
          value: null,
          key: null,
        },
        {
          label: '未判读',
          value: '0',
          key: '0',
        },{
          label: '已提交',
          value: '1',
          key: '1',
        },{
          label: '已关闭',
          value: '99',
          key: '99',
        },
      ],
    },
  },
 
];

export const formSchema: FormSchema[] = [
  {
    field: 'id',
    label: '角色名称',
    required: true,
    component: 'Input',
    ifShow:false,
  },
  {
    field: 'name',
    label: '角色名称',
    required: true,
    component: 'Input',
  },
  {
    field: 'status',
    label: '状态',
    component: 'RadioButtonGroup',
    defaultValue: 0,
    componentProps: {
      options: [
        { label: '启用', value: 0},
        { label: '停用', value: 1 },
      ],
    },
  },
];
