干燥机配套车间生产管理系统/云平台前端
src/views/dry/dataDefine/DryEquipment.data.ts
@@ -21,52 +21,6 @@
      dataIndex: 'type_dictText',
   },
   {
      title: '制造商',
      align: 'center',
      dataIndex: 'manufacturer',
   },
   {
      title: '购入日期',
      align: 'center',
      dataIndex: 'purchaseDate',
   },
   {
      title: '启用日期',
      align: 'center',
      dataIndex: 'startDate',
   },
   {
      title: '安装位置',
      align: 'center',
      dataIndex: 'location',
   },
   {
      title: '设备状态',
      align: 'center',
      dataIndex: 'status',
      customRender: ({text}) => {
         // 0-'新增',1-'在用', 2-'停用', 3-'维修', 4-'报废'
      const options = {
        '0': '新增',
        '1': '在用',
        '2': '停用',
        '3': '维修',
        '4': '报废'
      };
      return options[text] || text;
    }
   },
   {
      title: '报废日期',
      align: 'center',
      dataIndex: 'scrapDate',
   },
   {
      title: '设备描述',
      align: 'center',
      dataIndex: 'remark',
   },
   {
      title: '设备IP',
      align: 'center',
      dataIndex: 'ip',
@@ -87,6 +41,53 @@
         ])
      },
   },
   {
      title: '设备状态',
      align: 'center',
      dataIndex: 'status',
      customRender: ({text}) => {
         // 0-'新增',1-'在用', 2-'停用', 3-'维修', 4-'报废'
      const options = {
        '0': '新增',
        '1': '在用',
        '2': '停用',
        '3': '维修',
        '4': '报废'
      };
      return options[text] || text;
    }
   },
  {
    title: '制造商',
    align: 'center',
    dataIndex: 'manufacturer',
  },
  {
    title: '购入日期',
    align: 'center',
    dataIndex: 'purchaseDate',
  },
  {
    title: '启用日期',
    align: 'center',
    dataIndex: 'startDate',
  },
  {
    title: '安装位置',
    align: 'center',
    dataIndex: 'location',
  },
   {
      title: '报废日期',
      align: 'center',
      dataIndex: 'scrapDate',
   },
   {
      title: '设备描述',
      align: 'center',
      dataIndex: 'remark',
   },
]
//查询数据
export const searchFormSchema: FormSchema[] = [
@@ -140,6 +141,37 @@
      },
   },
   {
    label: '车间id',
    field: 'shopId',
    component: 'JDictSelectTag',
    componentProps: {
      dictCode: 'dry_shop,name,id,tenant_id=' + getTenantId(),
    },
    dynamicRules: ({ }) => {
      return [{ required: true, message: '请输入车间id!' }]
    },
  },
  {
    label: '设备类型',
    field: 'type',
    component: 'JDictSelectTag',
    componentProps: {
      dictCode: 'dry_eqp_type,name,id,tenant_id=' + getTenantId(),
    },
    dynamicRules: ({  }) => {
      return [{ required: true, message: '请输入设备类型!' }]
    },
  },
  {
    label: '设备IP',
    field: 'ip',
    component: 'Input',
    dynamicRules: ({ model, schema }) => {
      return [{ required: true, message: '请绑定设备IP!' }, { ...rules.duplicateCheckRule('dry_equipment', 'ip', model, schema)[0] }]
    },
  },
   {
      label: '制造商',
      field: 'manufacturer',
      component: 'Input',
@@ -190,41 +222,13 @@
         format: 'YYYY-MM-DD'
      },
   },
   {
      label: '设备IP',
      field: 'ip',
      component: 'Input',
      dynamicRules: ({ model, schema }) => {
         return [{ required: true, message: '请绑定设备IP!' }, { ...rules.duplicateCheckRule('dry_equipment', 'ip', model, schema)[0] }]
      },
   },
   {
      label: '设备类型',
      field: 'type',
      component: 'JDictSelectTag',
      componentProps: {
         dictCode: 'dry_eqp_type,name,id,tenant_id=' + getTenantId(),
      },
      dynamicRules: ({  }) => {
         return [{ required: true, message: '请输入设备类型!' }]
      },
   },
   {
      label: '设备描述',
      field: 'remark',
      component: 'Input',
   },
   {
      label: '车间id',
      field: 'shopId',
      component: 'JDictSelectTag',
      componentProps: {
         dictCode: 'dry_shop,name,id,tenant_id=' + getTenantId(),
      },
      dynamicRules: ({ }) => {
         return [{ required: true, message: '请输入车间id!' }]
      },
   },
   {
      label: '启用状态',
      field: 'enable',