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 columnsDataPreview: BasicColumn[] = [
  {
    title: '服务名称',
    dataIndex: 'streetname',
    width: 120,
  },{
    title: '服务地址',
    dataIndex: 'allCount',
    width: 120,
  },{
    title: '服务类型',
    dataIndex: 'handleStatus',
    width: 120,
  },{
    title: '创建时间',
    dataIndex: 'mask',
    width: 120,
  },{
    title: '创建时间',
    dataIndex: 'mask',
    width: 120,
  }
];

export const columns: BasicColumn[] = [
  {
    title: '服务名称',
    dataIndex: 'streetname',
    width: 120,
  },{
    title: '服务地址',
    dataIndex: 'allCount',
    width: 120,
  },{
    title: '服务类型',
    dataIndex: 'handleStatus',
    width: 120,
  },{
    title: '创建时间',
    dataIndex: 'mask',
    width: 120,
  },{
    title: '创建时间',
    dataIndex: 'mask',
    width: 120,
  }
];

export const searchFormSchema: FormSchema[] = [
  {
    field: 'key',
    label: '服务名称',
    component: 'Input',
    colProps: { span: 12 },
  },
  // {
  //   field: '[identification_start_time, identification_end_time]',
  //   label: '日期范围',
  //   component: 'RangePicker',
  //   colProps: { span: 8 },
  //   componentProps: {
  //     format: 'YYYY-MM-DD',
  //     placeholder: ['开始日期', '结束日期'],
  //   },
  // },
 
];



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 },
      ],
    },
  },
];
