|
@ -4,14 +4,20 @@ import {InspectionItemSelectSetVO} from "@/api/eam/inspectionItemSelectSet"; |
|
|
export interface MaintenanceVO { |
|
|
export interface MaintenanceVO { |
|
|
id: number |
|
|
id: number |
|
|
number: string |
|
|
number: string |
|
|
describing: string |
|
|
name: string |
|
|
equipmentCode: string |
|
|
equipmentCode: string |
|
|
type: string |
|
|
type: string |
|
|
optionCode: string |
|
|
optionCode: string |
|
|
cycle: string |
|
|
cycle: string |
|
|
classes: string |
|
|
startTime: Date |
|
|
peoples: number |
|
|
endTime: Date |
|
|
estimatedMinutes: number |
|
|
status: string |
|
|
|
|
|
approver: number |
|
|
|
|
|
approveContent: string |
|
|
|
|
|
approveTime: Date |
|
|
|
|
|
autoExamine: string |
|
|
|
|
|
autoAgree: string |
|
|
|
|
|
directCreateRecord: string |
|
|
factoryAreaCode: string |
|
|
factoryAreaCode: string |
|
|
workshopCode: string |
|
|
workshopCode: string |
|
|
workshopSectionCode: string |
|
|
workshopSectionCode: string |
|
@ -29,43 +35,43 @@ export const getMaintenancePage = async (params) => { |
|
|
if (params.isSearch) { |
|
|
if (params.isSearch) { |
|
|
delete params.isSearch |
|
|
delete params.isSearch |
|
|
const data = {...params} |
|
|
const data = {...params} |
|
|
return await request.post({ url: '/eam/basic/maintenance/senior', data }) |
|
|
return await request.post({ url: '/eam/maintenance/senior', data }) |
|
|
} else { |
|
|
} 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) => { |
|
|
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) => { |
|
|
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) => { |
|
|
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) => { |
|
|
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
|
|
|
// 导出保养计划 Excel
|
|
|
export const exportMaintenance = async (params) => { |
|
|
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 = () => { |
|
|
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) => { |
|
|
export const updateEnableCode = async (data: MaintenanceVO) => { |
|
|
return await request.post({ url: `/eam/basic/maintenance/ables` , data }) |
|
|
return await request.post({ url: `/eam/maintenance/ables` , data }) |
|
|
} |
|
|
} |
|
|