车间能级提升-智能设备管理系统
zhuguifei
5 天以前 453f63fd6cd6466222304df619e62b3a5667ca68
eims-ui/apps/web-antd/src/views/eims/fault-know/data.tsx
@@ -5,47 +5,56 @@
import { type FormSchemaGetter } from '#/adapter/form';
import { getDictOptions } from '#/utils/dict';
import { renderDict } from '#/utils/render';
import type { DescItem } from '#/components/description';
export const querySchema: FormSchemaGetter = () => [
  // {
  //   component: 'Input',
  //   fieldName: 'faultCode',
  //   label: '知识编号'
  // },
  // {
  //   component: 'Input',
  //   fieldName: 'equName',
  //   label: '设备名称'
  // },
  // {
  //   component: 'Input',
  //   fieldName: 'assetNo',
  //   label: '资产编号'
  // },
  // {
  //   component: 'Select',
  //   componentProps: {
  //     options: getDictOptions(DictEnum.EIMS_EQU_PART)
  //   },
  //   fieldName: 'equPart',
  //   label: '设备部位'
  // },
  // {
  //   component: 'Select',
  //   componentProps: {
  //     options: getDictOptions(DictEnum.REPAIR_FAULT_TYPE)
  //   },
  //   fieldName: 'faultType',
  //   label: '故障类别'
  // },
  {
    component: 'Input',
    fieldName: 'faultCode',
    label: '知识编号'
  },
  {
    component: 'Input',
    fieldName: 'equName',
    label: '设备名称'
  },
  {
    component: 'Input',
    fieldName: 'assetNo',
    label: '资产编号'
  },
  {
    component: 'Select',
    fieldName: 'params.searchValue',
    componentProps: {
      options: getDictOptions(DictEnum.EIMS_EQU_PART)
      placeholder: '请输入设备名称或资产编号'
    },
    fieldName: 'equPart',
    label: '设备部位'
    label: '关键字'
  },
  {
    component: 'Select',
    componentProps: {
      options: getDictOptions(DictEnum.REPAIR_FAULT_TYPE)
    },
    fieldName: 'faultType',
    label: '故障类别'
  },
  {
    component: 'Select',
    componentProps: {
      options: getDictOptions(DictEnum.EIMS_FAULT_REASON)
    },
    fieldName: 'faultReason',
    label: '故障原因'
  },
  // {
  //   component: 'Select',
  //   componentProps: {
  //     options: getDictOptions(DictEnum.EIMS_FAULT_REASON)
  //   },
  //   fieldName: 'faultReason',
  //   label: '故障原因'
  // },
  {
    component: 'Input',
    fieldName: 'reqDesc',
@@ -60,24 +69,25 @@
export const columns: VxeGridProps['columns'] = [
  { type: 'checkbox', width: 60, fixed: 'left' },
  {
    title: '知识编码',
    field: 'faultCode',
    minWidth: 200
  },
  {
    title: '设备名称',
    field: 'equName',
    minWidth: 140,
    fixed: 'left',
    slots: { default: 'equName' }
    fixed: 'left'
  },
  {
    title: '资产编号',
    field: 'assetNo',
    sortable: true,
    minWidth: 140,
    fixed: 'left'
  },
  {
    title: '知识编码',
    field: 'faultCode',
    minWidth: 200
  },
  {
    title: '设备类型',
@@ -112,20 +122,20 @@
    },
    minWidth: 120
  },
  {
    title: '故障原因',
    field: 'faultReason',
    sortable: true,
    slots: {
      default: ({ row }) => {
        if (row.faultReason === null || row.faultReason === '') {
          return '';
        }
        return renderDict(row.faultReason, DictEnum.EIMS_FAULT_REASON);
      }
    },
    minWidth: 120
  },
  // {
  //   title: '故障原因',
  //   field: 'faultReason',
  //   sortable: true,
  //   slots: {
  //     default: ({ row }) => {
  //       if (row.faultReason === null || row.faultReason === '') {
  //         return '';
  //       }
  //       return renderDict(row.faultReason, DictEnum.EIMS_FAULT_REASON);
  //     }
  //   },
  //   minWidth: 120
  // },
  {
    title: '报修描述',
    field: 'reqDesc',
@@ -141,7 +151,7 @@
    fixed: 'right',
    slots: { default: 'action' },
    title: '操作',
    width: 200
    width: 80
  }
];
@@ -203,3 +213,31 @@
    label: '处理措施'
  }
];
export const descSchema: DescItem[] = [
  {
    field: 'equName',
    label: '设备名称'
  },
  {
    field: 'assetNo',
    label: '资产编号'
  },
  {
    field: 'resCode',
    label: '维修工单'
  },
  {
    field: 'faultCode',
    label: '知识编码'
  },
  {
    field: 'reqDesc',
    label: '报修描述'
  },
  {
    field: 'resHandle',
    label: '处理措施'
  }
];