|
|
@ -4,14 +4,20 @@ import {InspectionItemSelectSetVO} from "@/api/eam/inspectionItemSelectSet"; |
|
|
|
export interface MaintenanceVO { |
|
|
|
id: number |
|
|
|
number: string |
|
|
|
describing: string |
|
|
|
name: string |
|
|
|
equipmentCode: string |
|
|
|
type: string |
|
|
|
optionCode: string |
|
|
|
cycle: string |
|
|
|
classes: string |
|
|
|
peoples: number |
|
|
|
estimatedMinutes: number |
|
|
|
startTime: Date |
|
|
|
endTime: Date |
|
|
|
status: string |
|
|
|
approver: number |
|
|
|
approveContent: string |
|
|
|
approveTime: Date |
|
|
|
autoExamine: string |
|
|
|
autoAgree: string |
|
|
|
directCreateRecord: string |
|
|
|
factoryAreaCode: string |
|
|
|
workshopCode: string |
|
|
|
workshopSectionCode: string |
|
|
@ -29,43 +35,43 @@ export const getMaintenancePage = async (params) => { |
|
|
|
if (params.isSearch) { |
|
|
|
delete params.isSearch |
|
|
|
const data = {...params} |
|
|
|
return await request.post({ url: '/eam/basic/maintenance/senior', data }) |
|
|
|
return await request.post({ url: '/eam/maintenance/senior', data }) |
|
|
|
} else { |
|
|
|
return await request.get({ url: `/eam/basic/maintenance/page`, params }) |
|
|
|
return await request.get({ url: `/eam/maintenance/page`, params }) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 查询保养计划详情
|
|
|
|
export const getMaintenance = async (id: number) => { |
|
|
|
return await request.get({ url: `/eam/basic/maintenance/get?id=` + id }) |
|
|
|
return await request.get({ url: `/eam/maintenance/get?id=` + id }) |
|
|
|
} |
|
|
|
|
|
|
|
// 新增保养计划
|
|
|
|
export const createMaintenance = async (data: MaintenanceVO) => { |
|
|
|
return await request.post({ url: `/eam/basic/maintenance/create`, data }) |
|
|
|
return await request.post({ url: `/eam/maintenance/create`, data }) |
|
|
|
} |
|
|
|
|
|
|
|
// 修改保养计划
|
|
|
|
export const updateMaintenance = async (data: MaintenanceVO) => { |
|
|
|
return await request.put({ url: `/eam/basic/maintenance/update`, data }) |
|
|
|
return await request.put({ url: `/eam/maintenance/update`, data }) |
|
|
|
} |
|
|
|
|
|
|
|
// 删除保养计划
|
|
|
|
export const deleteMaintenance = async (id: number) => { |
|
|
|
return await request.delete({ url: `/eam/basic/maintenance/delete?id=` + id }) |
|
|
|
return await request.delete({ url: `/eam/maintenance/delete?id=` + id }) |
|
|
|
} |
|
|
|
|
|
|
|
// 导出保养计划 Excel
|
|
|
|
export const exportMaintenance = async (params) => { |
|
|
|
return await request.download({ url: `/eam/basic/maintenance/export-excel`, params }) |
|
|
|
return await request.download({ url: `/eam/maintenance/export-excel`, params }) |
|
|
|
} |
|
|
|
|
|
|
|
// 下载用户导入模板
|
|
|
|
export const importTemplate = () => { |
|
|
|
return request.download({ url: '/eam/basic/maintenance/get-import-template' }) |
|
|
|
return request.download({ url: '/eam/maintenance/get-import-template' }) |
|
|
|
} |
|
|
|
|
|
|
|
// 启用 / 禁用
|
|
|
|
export const updateEnableCode = async (data: InspectionItemSelectSetVO) => { |
|
|
|
return await request.post({ url: `/eam/basic/maintenance/ables` , data }) |
|
|
|
export const updateEnableCode = async (data: MaintenanceVO) => { |
|
|
|
return await request.post({ url: `/eam/maintenance/ables` , data }) |
|
|
|
} |
|
|
|