| | |
| | | export const columns: VxeGridProps['columns'] = [ |
| | | { type: 'checkbox', width: 60, fixed: 'left' }, |
| | | { |
| | | title: '设备(工具)名称', |
| | | sortable: true, |
| | | minWidth: 150, |
| | | fixed: 'left', |
| | | slots: { |
| | | default: ({ row }) => { |
| | | if (!row.reqType) { |
| | | return ''; |
| | | } |
| | | |
| | | // 根据不同的请求类型返回相应的名称 |
| | | switch (row.reqType) { |
| | | case REPAIR_REQ_TYPE.EQU: { |
| | | return row.equName; |
| | | } |
| | | case REPAIR_REQ_TYPE.FIXTURE: { |
| | | return row.fixtureName; |
| | | } |
| | | default: { |
| | | // 如果请求类型既不是 EQU 也不是 FIXTURE,则返回空字符串 |
| | | return ''; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | { |
| | | title: '维修单号', |
| | | field: 'resCode', |
| | | minWidth: 160, |
| | |
| | | field: 'reqTime', |
| | | sortable: true, |
| | | minWidth: 200 |
| | | }, |
| | | { |
| | | title: '设备(工具)名称', |
| | | sortable: true, |
| | | minWidth: 150, |
| | | slots: { |
| | | default: ({ row }) => { |
| | | if (!row.reqType) { |
| | | return ''; |
| | | } |
| | | |
| | | // 根据不同的请求类型返回相应的名称 |
| | | switch (row.reqType) { |
| | | case REPAIR_REQ_TYPE.EQU: { |
| | | return row.equName; |
| | | } |
| | | case REPAIR_REQ_TYPE.FIXTURE: { |
| | | return row.fixtureName; |
| | | } |
| | | default: { |
| | | // 如果请求类型既不是 EQU 也不是 FIXTURE,则返回空字符串 |
| | | return ''; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | { |
| | | title: '故障类别', |