车间能级提升-智能设备管理系统
zhuguifei
2025-02-25 c3c585edd4d3cf269a307ba48ac2abb11bf0b640
eims-ui/apps/web-antd/src/views/eims/repair-req/data.tsx
@@ -3,9 +3,14 @@
import { DictEnum } from '@vben/constants';
import { getPopupContainer } from '@vben/utils';
import dayjs from 'dayjs';
import { type FormSchemaGetter } from '#/adapter/form';
import { REPAIR_REQ_TYPE } from '#/constants/dict';
import { getDictOptions } from '#/utils/dict';
import { renderDict } from '#/utils/render';
const curDateTime = dayjs().format('YYYY-MM-DD HH:mm:ss');
export const querySchema: FormSchemaGetter = () => [
  {
@@ -27,7 +32,7 @@
    // 在drawer里更新 这里不需要默认的componentProps
    defaultValue: undefined,
    fieldName: 'reqDept',
    label: '报修部门',
    label: '报修部门'
    // rules: 'selectRequired',
  },
  {
@@ -108,10 +113,20 @@
    minWidth: 200
  },
  {
    title: '设备名称',
    field: 'equName',
    title: '设备(工具)名称',
    sortable: true,
    minWidth: 120
    minWidth: 150,
    slots: {
      default: ({ row }) => {
        if (row.reqType === REPAIR_REQ_TYPE.EQU) {
          return row.equName;
        } else if (row.reqType === REPAIR_REQ_TYPE.FIXTURE) {
          return row.fixtureName;
        } else {
          return '';
        }
      }
    }
  },
  {
    title: '故障类别',
@@ -159,7 +174,7 @@
  {
    component: 'Select',
    componentProps: {
      getPopupContainer,
      getPopupContainer
    },
    fieldName: 'reqType',
    label: '报修类型',
@@ -213,6 +228,7 @@
      options: getDictOptions(DictEnum.REPAIR_REQ_STATUS)
    },
    fieldName: 'status',
    defaultValue: '0',
    label: '处理状态'
  },
  {
@@ -223,6 +239,7 @@
      valueFormat: 'YYYY-MM-DD HH:mm:ss',
      getPopupContainer
    },
    defaultValue: curDateTime,
    fieldName: 'reqTime',
    label: '报修时间'
  },