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: 'jkdgbidzlkjg',
    width:80,
  },
  
  {
    title: '可见光监控',
    dataIndex: 'jkdmckjg',
    width: 100,
  }, {
    title: '热成像监控',
    dataIndex: 'jkdmcrcx',
    width: 100,
  },
  {
    title: '监控类型',
    dataIndex: 'jklx',
    width: 80,
    customRender: ({ record }) => {
      return "高空瞭望";
    },
   
  },{
    title: '所属县区',
    dataIndex: 'qx',
    width:80,
  }, 
  {
    title: '位置',
    dataIndex: 'jd',
    width: 80,
    customRender: ({ record }) => {
      return record.jd+" , "+record.wd;
    },
  },
];

export const searchFormSchema: FormSchema[] = [
  {
    field: 'key',
    label: '关键字',
    component: 'Input',
    colProps: { span: 8 },
  },
 
];

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