diff --git a/src/api/eam/documentType/index.ts b/src/api/eam/basicDocumentType/index.ts similarity index 100% rename from src/api/eam/documentType/index.ts rename to src/api/eam/basicDocumentType/index.ts diff --git a/src/api/eam/basicMaintenanceOption/index.ts b/src/api/eam/basicMaintenanceOption/index.ts new file mode 100644 index 000000000..0d95570c6 --- /dev/null +++ b/src/api/eam/basicMaintenanceOption/index.ts @@ -0,0 +1,64 @@ +import request from '@/config/axios' +import {EquipmentMainPartVO} from "@/api/eam/equipmentMainPart"; + +export interface BasicMaintenanceOptionVO { + id: number + code: string + name: string + describing: string + isUpdated: boolean + type: string + departmentCode: string + remark: string + siteId: string + available: string + deletionTime: Date + deleterId: byte[] + concurrencyStamp: number +} + +// 查询保养方案列表 +export const getBasicMaintenanceOptionPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/eam/basic-maintenance-option/senior', data }) + } else { + return await request.get({ url: `/eam/basic-maintenance-option/page`, params }) + } +} + +// 查询保养方案详情 +export const getBasicMaintenanceOption = async (id: number) => { + return await request.get({ url: `/eam/basic-maintenance-option/get?id=` + id }) +} + +// 新增保养方案 +export const createBasicMaintenanceOption = async (data: BasicMaintenanceOptionVO) => { + return await request.post({ url: `/eam/basic-maintenance-option/create`, data }) +} + +// 修改保养方案 +export const updateBasicMaintenanceOption = async (data: BasicMaintenanceOptionVO) => { + return await request.put({ url: `/eam/basic-maintenance-option/update`, data }) +} + +// 删除保养方案 +export const deleteBasicMaintenanceOption = async (id: number) => { + return await request.delete({ url: `/eam/basic-maintenance-option/delete?id=` + id }) +} + +// 导出保养方案 Excel +export const exportBasicMaintenanceOption = async (params) => { + return await request.download({ url: `/eam/basic-maintenance-option/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/eam/basic-maintenance-option/get-import-template' }) +} + +// 启用 / 禁用 +export const updateEnableCode = async (data: EquipmentMainPartVO) => { + return await request.post({ url: `/eam/basic-maintenance-option/ables` , data }) +} diff --git a/src/views/eam/documentType/documentType.data.ts b/src/views/eam/basicDocumentType/basicDocumentType.data.ts similarity index 100% rename from src/views/eam/documentType/documentType.data.ts rename to src/views/eam/basicDocumentType/basicDocumentType.data.ts diff --git a/src/views/eam/documentType/index.vue b/src/views/eam/basicDocumentType/index.vue similarity index 98% rename from src/views/eam/documentType/index.vue rename to src/views/eam/basicDocumentType/index.vue index 0f46e6cf1..50e79ca47 100644 --- a/src/views/eam/documentType/index.vue +++ b/src/views/eam/basicDocumentType/index.vue @@ -59,8 +59,8 @@