import { BasicColumn, FormSchema } from '@/components/Table';
export const levelOptions = [
  { label: '全部', value: 0 },
  { label: '注意', value: 1 },
  { label: '告警', value: 2 },
]
export const modelOptions = [
  { label: '全部', value: 0 },
  { label: '设备管理', value: 1 },
  { label: '媒体管理', value: 2 },
  { label: 'HMS告警', value: 3 },
]
export const columns = [
  {
    title: '告警等级',
    dataIndex: 'level',
  },
  {
    title: '告警开始时间',
    dataIndex: 'createTime',
  },
  {
    title: '告警结束时间',
    dataIndex: 'updateTime',
  },
  {
    title: '设备',
    dataIndex: 'module',
  },
  {
    title: '错误码',
    dataIndex: 'code',
  },
  {
    title: '告警内容',
    dataIndex: 'messageZh',
  },
  {
    title: '解决方案',
    dataIndex: 'messageEn',
  },
];
export const searchFormSchema: FormSchema[] = [
  {
    field: 'time',
    component: 'RangePicker',
    colProps: { span: 4 },
  },
  {
    field: 'level',
    label: '告警等级',
    component: 'Select',
    componentProps: {
      options: levelOptions,
    },
    colProps: { span: 4 },
  },
  {
    field: 'model',
    label: '设备',
    component: 'Select',
    componentProps: {
      options: modelOptions,
    },
    colProps: { span: 4 },
  },
  {
    field: 'message',
    label: '告警信息',
    component: 'Input',
    colProps: { span: 6 },
  },
];