import { BasicColumn } from '/@/components/Table';
import { FormSchema } from '@/components/Form';
import { listDictModel } from '/@/api/common';

export const disinfectRecordColumns: BasicColumn[] = [
  {
    title: '病区/床位',
    dataIndex: 'inpatientWard',
    width: 100,
  },
  {
    title: '班次',
    dataIndex: 'sailingSort',
    width: 100,
  },
  {
    title: '开始时间',
    dataIndex: 'beginTime',
    width: 170,
  },
  {
    title: '设备编号',
    dataIndex: 'deviceCode',
    width: 110,
  },
  {
    title: '设备型号',
    dataIndex: 'deviceModel',
    width: 110,
  },
  {
    title: '内部消毒类型',
    dataIndex: 'disinfectionType',
    width: 150,
  },
  {
    title: '内部消毒液',
    dataIndex: 'disinfectant',
    width: 150,
  },
  {
    title: '物表消毒',
    dataIndex: 'disinfectantName',
    width: 150,
  },
  {
    title: '细菌过滤器',
    dataIndex: 'otherMaintenanceBacterialFilter',
    width: 120,
  },
  {
    title: '消毒液',
    dataIndex: 'otherMaintenanceDisinfectant',
    width: 120,
  },
  {
    title: '操作人',
    dataIndex: 'updatorName',
    width: 150,
  },
];

export const dataDisinfectMaintenanceFormSchema: FormSchema[] = [
  {
    field: 'ddt_disinfectant_hot',
    component: 'PlainTitle',
    defaultValue: '热消毒',
    colProps: {
      span: 24,
    },
  },
  {
    label: '消毒剂',
    field: 'hot_disinfectant',
    required: true,
    component: 'ApiSelect',
    componentProps: {
      api: listDictModel,
      params: {
        dictCode: 'ddt_disinfectant_hot',
      },
    },
  },
  {
    label: '消毒时间（min）',
    field: 'hot_disinfectionTime',
    required: true,
    component: 'InputNumber',
    componentProps: {
      placeholder: '请输入消毒时间（min）',
      min: 1,
    },
  },

  {
    field: 'ddt_disinfectant_chemistry',
    component: 'PlainTitle',
    defaultValue: '化学消毒',
    colProps: {
      span: 24,
    },
  },
  {
    label: '消毒剂',
    field: 'chemistry_disinfectant',
    required: true,
    component: 'ApiSelect',
    componentProps: {
      api: listDictModel,
      params: {
        dictCode: 'ddt_disinfectant_chemistry',
      },
    },
  },
  {
    label: '消毒时间（min）',
    field: 'chemistry_disinfectionTime',
    required: true,
    component: 'InputNumber',
    componentProps: {
      placeholder: '请输入消毒时间（min）',
      min: 1,
    },
  },

  {
    field: 'ddt_disinfectant_chemistry_hot',
    component: 'PlainTitle',
    defaultValue: '热化学消毒',
    colProps: {
      span: 24,
    },
  },
  {
    label: '消毒剂',
    field: 'chemistryHot_disinfectant',
    required: true,
    component: 'ApiSelect',
    componentProps: {
      api: listDictModel,
      params: {
        dictCode: 'ddt_disinfectant_chemistry_hot',
      },
    },
  },
  {
    label: '消毒时间（min）',
    field: 'chemistryHot_disinfectionTime',
    required: true,
    component: 'InputNumber',
    componentProps: {
      placeholder: '请输入消毒时间（min）',
      min: 1,
    },
  },

  {
    field: 'ddt_disinfectant_other',
    component: 'PlainTitle',
    defaultValue: '其他消毒',
    colProps: {
      span: 24,
    },
  },
  {
    label: '消毒剂',
    field: 'other_disinfectant',
    required: true,
    component: 'ApiSelect',
    componentProps: {
      api: listDictModel,
      params: {
        dictCode: 'ddt_disinfectant_other',
      },
    },
  },
  {
    label: '消毒时间（min）',
    field: 'other_disinfectionTime',
    required: true,
    component: 'InputNumber',
    componentProps: {
      placeholder: '请输入消毒时间（min）',
      min: 1,
    },
  },
];
