index.ts 1.68 KB
import {BasicColumn, FormSchema} from "/@/components/Table";
import {useI18n} from "/@/hooks/web/useI18n";
const { t } = useI18n();
const statusOptions = [

];
export const columns: BasicColumn[] = [
  {
    title: t('faultReport.facility.nameCode'),
    dataIndex: 'code',
  },
  {
    title: t('faultReport.facility.themeText'),
    dataIndex: 'name',
  },
  {
    title: t('faultReport.facility.status'),
    dataIndex: 'status',
    slots: { customRender: 'status' },
  },
  {
    title: t('faultReport.facility.reportText'),
    dataIndex: 'reportText',
    slots: { customRender: 'reportText' },
  },
  {
    title: t('faultReport.facility.departmentText'),
    dataIndex: 'departmentText',
    slots: { customRender: 'departmentText' },
  },
  {
    title: t('faultReport.facility.remarks'),
    dataIndex: 'remarks',
    slots: { customRender: 'remarks' },
  },
  {
    title: t('faultReport.facility.creatorText'),
    dataIndex: 'creator',
    slots: { customRender: 'creator' },
  },
  {
    title: t('faultReport.facility.creatorDate'),
    dataIndex: 'creatorDate',
  }
];

export const searchFormSchema: FormSchema[] = [
  {
    field: 'deviceNameText',
    label: t('faultReport.facility.nameText'),
    component: 'Input',
    colProps: { span: 6 },
  },
  {
    field: 'nameCode',
    label: t('faultReport.facility.nameCode'),
    component: 'Input',
    colProps: { span: 6 },
  },
  {
    field: 'nameText',
    label: t('faultReport.facility.nameText'),
    component: 'Input',
    colProps: { span: 6 },
  },
  {
    field: 'status',
    label: t('faultReport.facility.status'),
    component: 'Select',
    colProps: { span: 6 },
    componentProps: {
      options: statusOptions,
    },
  },
];