车间能级提升-智能设备管理系统
朱桂飞
2025-02-10 34c674d503e23c0cf6d0b6dec063f3049885e5f8
eims-ui/apps/web-antd/src/views/eims/equ/data.tsx
@@ -7,6 +7,7 @@
import { type FormSchemaGetter, z } from '#/adapter/form';
import { getDictOptions } from '#/utils/dict';
import { renderDict } from '#/utils/render';
export const querySchema: FormSchemaGetter = () => [
  {
@@ -29,7 +30,7 @@
  },
  {
    component: 'RangePicker',
    fieldName: 'createTime',
    fieldName: 'deployDate',
    label: '使用日期'
  }
];
@@ -47,28 +48,10 @@
  {
    title: '状态',
    field: 'status',
    sortable: true,
    slots: {
      default: ({ row }) => {
        const statu = row.status;
        switch (statu) {
          case '0': {
            return <Tag color="cyan">试用</Tag>;
          }
          case '1': {
            return <Tag color="green">入固</Tag>;
          }
          case '2': {
            return <Tag color="orange">迁移</Tag>;
          }
          case '3': {
            return <Tag color="red">报废</Tag>;
          }
          case null: {
            return '';
          }
          // No default
        }
        return '';
        return renderDict(row.status, DictEnum.SYS_EQU_STATUS);
      }
    },
    minWidth: 80,
@@ -77,12 +60,14 @@
  {
    title: '资产编号',
    field: 'assetNo',
    sortable: true,
    minWidth: 100,
    fixed: 'left'
  },
  {
    title: '设备编号',
    field: 'equCode',
    sortable: true,
    minWidth: 100
  },
  {
@@ -133,6 +118,7 @@
  {
    title: '采购日期',
    field: 'purchaseDate',
    sortable: true,
    minWidth: 120
  },
  {
@@ -158,11 +144,13 @@
  {
    title: '导入状态',
    field: 'importStatus',
    slots: { default: 'importStatus' },
    minWidth: 100
  },
  {
    title: '盘点标志',
    field: 'inventoryFlag',
    slots: { default: 'inventoryFlag' },
    minWidth: 100
  },
  {
@@ -185,7 +173,7 @@
    fixed: 'right',
    slots: { default: 'action' },
    title: '操作',
    width: 180
    width: 200
  }
];
@@ -282,8 +270,8 @@
  {
    component: 'Select',
    componentProps: {
      // 选中了就只能修改 不能重置为无负责人
      allowClear: true,
      showSearch: true,
      getPopupContainer
    },
    fieldName: 'respPerson',