| | |
| | | export const columns: VxeGridProps['columns'] = [ |
| | | { type: 'checkbox', width: 60, fixed: 'left' }, |
| | | { |
| | | title: '设备(工具)名称', |
| | | sortable: true, |
| | | minWidth: 150, |
| | | fixed: 'left', |
| | | slots: { |
| | | default: ({ row }) => { |
| | | if (row.reqType === REPAIR_REQ_TYPE.EQU) { |
| | | return row.equName; |
| | | } else if (row.reqType === REPAIR_REQ_TYPE.FIXTURE) { |
| | | return row.fixtureName; |
| | | } else { |
| | | return ''; |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | { |
| | | title: '报修单号', |
| | | field: 'code', |
| | | minWidth: 160, |
| | |
| | | return renderDict(row.status, DictEnum.REPAIR_REQ_STATUS); |
| | | } |
| | | } |
| | | }, |
| | | { |
| | | title: '维修单号', |
| | | field: 'resCode', |
| | | minWidth: 200 |
| | | }, |
| | | { |
| | | title: '报修类型', |
| | |
| | | minWidth: 200 |
| | | }, |
| | | { |
| | | title: '设备(工具)名称', |
| | | title: '发生时间', |
| | | field: 'occTime', |
| | | sortable: true, |
| | | minWidth: 150, |
| | | slots: { |
| | | default: ({ row }) => { |
| | | if (row.reqType === REPAIR_REQ_TYPE.EQU) { |
| | | return row.equName; |
| | | } else if (row.reqType === REPAIR_REQ_TYPE.FIXTURE) { |
| | | return row.fixtureName; |
| | | } else { |
| | | return ''; |
| | | } |
| | | } |
| | | } |
| | | minWidth: 200 |
| | | }, |
| | | { |
| | | title: '故障类别', |
| | |
| | | minWidth: 100, |
| | | slots: { |
| | | default: ({ row }) => { |
| | | if(!row.faultType){ |
| | | return '' |
| | | } |
| | | return renderDict(row.faultType, DictEnum.REPAIR_FAULT_TYPE); |
| | | } |
| | | } |
| | |
| | | getPopupContainer, |
| | | options: getDictOptions(DictEnum.REPAIR_REQ_STATUS) |
| | | }, |
| | | dependencies: { |
| | | show: () => false, |
| | | triggerFields: [''] |
| | | }, |
| | | fieldName: 'status', |
| | | defaultValue: '0', |
| | | label: '处理状态' |
| | |
| | | label: '报修人' |
| | | } |
| | | ]; |
| | | |
| | | export const modalSchema: FormSchemaGetter = () => [ |
| | | { |
| | | component: 'Input', |
| | | dependencies: { |
| | | show: () => false, |
| | | triggerFields: [''] |
| | | }, |
| | | fieldName: 'id' |
| | | }, |
| | | { |
| | | component: 'Input', |
| | | dependencies: { |
| | | show: () => false, |
| | | triggerFields: [''] |
| | | }, |
| | | fieldName: 'batchReqIds' |
| | | }, |
| | | { |
| | | component: 'TreeSelect', |
| | | // 在drawer里更新 这里不需要默认的componentProps |
| | | defaultValue: undefined, |
| | | fieldName: 'resDept', |
| | | label: '维修部门', |
| | | help: `报修人员所属部门` |
| | | // rules: 'selectRequired', |
| | | }, |
| | | { |
| | | component: 'Select', |
| | | componentProps: { |
| | | showSearch: true, |
| | | allowClear: true, |
| | | getPopupContainer |
| | | }, |
| | | fieldName: 'resUser', |
| | | label: '维修人' |
| | | } |
| | | ]; |