import { FormSchema } from '/@/components/Table';
import { BasicColumn } from '/@/components/Table';

export const basicInfoFormSchema: FormSchema[] = [
  {
    field: 'indicatorsname',
    label: '指标名称',
    component: 'Input',
    required: true,
    colProps: { span: 10 },
    componentProps: {
      maxLength: 255,
      placeholder: '',
    },
  },
  {
    field: 'indicatorscode',
    label: '指标编码',
    component: 'Input',
    required: true,
    colProps: { span: 10 },
    componentProps: {
      maxLength: 255,
      placeholder: '',
    },
  },
  {
    field: 'abbreviation',
    label: '指标简称',
    component: 'Input',
    required: true,
    colProps: { span: 10 },
    componentProps: {
      maxLength: 255,
      placeholder: '',
    },
  },
  {
    field: 'indicatorstype',
    label: '指标类型',
    component: 'Select',
    colProps: { span: 10 },
    componentProps: {
      maxLength: 255,
      placeholder: '',
    },
  },
  {
    field: 'frequency',
    label: '采集频率',
    component: 'InputNumber',
    colProps: { span: 10 },
    componentProps: {
      maxLength: 255,
      placeholder: '',
    },
  },
  {
    field: 'mode',
    label: '模式',
    component: 'Select',
    colProps: { span: 10 },
    componentProps: {
      maxLength: 255,
      placeholder: '',
    },
  },
  {
    field: 'group',
    label: '指标分组',
    component: 'Input',
    colProps: { span: 10 },
    componentProps: {
      maxLength: 255,
      placeholder: '',
    },
  },
  {
    field: 'label',
    label: '指标标签',
    component: 'Input',
    colProps: { span: 10 },
    componentProps: {
      maxLength: 255,
      placeholder: '',
    },
  },
  {
    field: 'groupindex',
    label: '分组序号',
    component: 'Input',
    colProps: { span: 10 },
    componentProps: {
      maxLength: 255,
      placeholder: '',
    },
  },
  {
    field: 'indicatorsindex',
    label: '指标序号',
    component: 'Input',
    colProps: { span: 10 },
    componentProps: {
      maxLength: 255,
      placeholder: '',
    },
  },
];
export const deviceFormSchema: FormSchema[] = [
  {
    field: 'binddevice',
    label: '设备绑定',
    component: 'Select',
    colProps: { span: 20 },
    componentProps: {
      maxLength: 255,
      placeholder: '',
    },
  },
  {
    field: 'remark',
    label: '备注',
    component: 'Input',
    required: true,
    colProps: { span: 20 },
    componentProps: {
      maxLength: 255,
      placeholder: '',
    },
  },
];
export const directivesFormSchema: FormSchema[] = [
  {
    field: 'range',
    label: '量程',
    component: 'Input',
    // component: 'InputGroup',
    colProps: { span: 10 },
    componentProps: {
      maxLength: 255,
      placeholder: '',
    },
  },
  {
    field: 'precision',
    label: '精度',
    component: 'Input',
    colProps: { span: 10 },
    componentProps: {
      maxLength: 255,
      placeholder: '',
    },
  },
  {
    field: 'unit',
    label: '单位',
    component: 'Input',
    colProps: { span: 10 },
    componentProps: {
      maxLength: 255,
      placeholder: '',
    },
  },
];
export const thresholdTableColums: BasicColumn[] = [
  {
    title: '指令',
    dataIndex: 'code',
    width: 120,
  },
  {
    title: '指令含义',
    dataIndex: 'codemeans',
    width: 120,
  },
  {
    title: '备注',
    dataIndex: 'remark',
    width: 120,
  },
  {
    title: '操作',
    dataIndex: 'action',
    width: 120,
  },
];
