车间能级提升-智能设备管理系统
朱桂飞
2025-02-12 3f476e9dc149c89df5fff1513a690ff05ec545c9
eims-ui/apps/web-antd/src/views/eims/equ/data.tsx
@@ -3,10 +3,9 @@
import { DictEnum } from '@vben/constants';
import { getPopupContainer } from '@vben/utils';
import { Tag } from 'ant-design-vue';
import { type FormSchemaGetter, z } from '#/adapter/form';
import { getDictOptions } from '#/utils/dict';
import { renderDict } from '#/utils/render';
export const querySchema: FormSchemaGetter = () => [
  {
@@ -50,26 +49,7 @@
    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,
@@ -83,7 +63,7 @@
    fixed: 'left'
  },
  {
    title: '设备编号',
    title: '设备编码',
    field: 'equCode',
    sortable: true,
    minWidth: 100