车间能级提升-智能设备管理系统
朱桂飞
2025-02-14 9518ee94bf232c771edd97e2c6a00ba5d7f18242
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
import type { VxeGridProps } from '#/adapter/vxe-table';
 
import { DictEnum } from '@vben/constants';
 
import { type FormSchemaGetter } from '#/adapter/form';
import { getDictOptions } from '#/utils/dict';
import { renderDict } from '#/utils/render';
 
export const querySchema: FormSchemaGetter = () => [
  {
    component: 'Input',
    fieldName: 'equCode',
    label: '设备编码'
  },
  {
    component: 'Input',
    fieldName: 'equName',
    label: '设备名称'
  },
  {
    component: 'Input',
    fieldName: 'equAssetNo',
    label: '资产编号'
  },
  {
    component: 'Input',
    fieldName: 'location',
    label: '所在场所'
  },
  {
    component: 'Select',
    componentProps: {
      options: getDictOptions(DictEnum.SYS_EQU_STATUS)
    },
    fieldName: 'equStatus',
    label: '设备状态'
  }
  /* {
    component: 'Select',
    componentProps: {
      options: getDictOptions(DictEnum.EIMS_INVENTORY_DETAIL_STATU)
    },
    fieldName: 'status',
    label: '盘点明细'
  }*/
];
 
export const columns: VxeGridProps['columns'] = [
  { type: 'checkbox', width: 60, fixed: 'left' },
  {
    title: '盘点状态',
    field: 'status',
    sortable: true,
    minWidth: 100,
    fixed: 'left',
    slots: {
      default: ({ row }) => {
        return row.status === null || row.status === '' ? '' : renderDict(row.status, DictEnum.EIMS_INVENTORY_DETAIL_STATU);
      }
    }
  },
  {
    title: '设备编码',
    field: 'equCode',
    minWidth: 120,
    fixed: 'left'
  },
  {
    title: '设备名称',
    field: 'equName',
    minWidth: 100
  },
  {
    title: '资产编号',
    field: 'equAssetNo',
    minWidth: 100
  },
  {
    title: '设备状态',
    field: 'equStatus',
    sortable: true,
    minWidth: 100,
    slots: {
      default: ({ row }) => {
        return renderDict(row.equStatus, DictEnum.SYS_EQU_STATUS);
      }
    }
  },
  {
    title: '使用部门',
    field: 'deptName',
    minWidth: 100
  },
  {
    title: '设备类型',
    field: 'equTypeName',
    minWidth: 100
  },
  {
    title: '设备位置',
    field: 'location',
    minWidth: 100
  },
  {
    title: '盘点人',
    field: 'inventoryUser',
    sortable: true,
    minWidth: 100
  },
  {
    field: 'action',
    fixed: 'right',
    slots: { default: 'action' },
    title: '操作',
    width: 200
  }
];
 
export const drawerSchema: FormSchemaGetter = () => [
  {
    component: 'Input',
    dependencies: {
      show: () => false,
      triggerFields: ['']
    },
    fieldName: 'id'
  },
  {
    component: 'Input',
    dependencies: {
      show: () => false,
      triggerFields: ['']
    },
    fieldName: 'equId'
  },
  {
    component: 'Input',
    dependencies: {
      show: () => false,
      triggerFields: ['']
    },
    fieldName: 'inventoryId'
  },
  {
    component: 'RadioGroup',
    componentProps: {
      buttonStyle: 'solid',
      options: getDictOptions(DictEnum.EIMS_INVENTORY_DETAIL_STATU),
      optionType: 'button'
    },
    defaultValue: '0',
    fieldName: 'status',
    label: '状态'
  }
];