ljlong_2630
6 months ago
1 changed files with 67 additions and 0 deletions
@ -0,0 +1,67 @@ |
|||||
|
import request from '@/config/axios' |
||||
|
|
||||
|
export interface EquipmentMainPartVO { |
||||
|
id: number |
||||
|
name: string |
||||
|
code: string |
||||
|
type: string |
||||
|
departmentCode: string |
||||
|
remark: string |
||||
|
siteId: string |
||||
|
available: string |
||||
|
deletionTime: Date |
||||
|
deleterId: byte[] |
||||
|
concurrencyStamp: number |
||||
|
} |
||||
|
|
||||
|
// 查询主要部件列表
|
||||
|
export const getEquipmentMainPartPage = async (params) => { |
||||
|
if (params.isSearch) { |
||||
|
delete params.isSearch |
||||
|
const data = {...params} |
||||
|
return await request.post({ url: '/eam/equipment-main-part/senior', data }) |
||||
|
} else { |
||||
|
return await request.get({ url: `/eam/equipment-main-part/page`, params }) |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
// 查询主要部件详情
|
||||
|
export const getEquipmentMainPart = async (id: number) => { |
||||
|
return await request.get({ url: `/eam/equipment-main-part/get?id=` + id }) |
||||
|
} |
||||
|
|
||||
|
// 新增主要部件
|
||||
|
export const createEquipmentMainPart = async (data: EquipmentMainPartVO) => { |
||||
|
return await request.post({ url: `/eam/equipment-main-part/create`, data }) |
||||
|
} |
||||
|
|
||||
|
// 修改主要部件
|
||||
|
export const updateEquipmentMainPart = async (data: EquipmentMainPartVO) => { |
||||
|
console.log(data) |
||||
|
return await request.put({ url: `/eam/equipment-main-part/update`, data }) |
||||
|
} |
||||
|
|
||||
|
// 删除主要部件
|
||||
|
export const deleteEquipmentMainPart = async (id: number) => { |
||||
|
return await request.delete({ url: `/eam/equipment-main-part/delete?id=` + id }) |
||||
|
} |
||||
|
|
||||
|
// 导出主要部件 Excel
|
||||
|
export const exportEquipmentMainPart = async (params) => { |
||||
|
if (params.isSearch) { |
||||
|
const data = {...params} |
||||
|
return await request.downloadPost({ url: `/eam/equipment-main-part/export-excel-senior`, data }) |
||||
|
}else{ |
||||
|
return await request.download({ url: `/eam/equipment-main-part/export-excel`, params }) |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
// 下载用户导入模板
|
||||
|
export const importTemplate = () => { |
||||
|
return request.download({ url: '/eam/equipment-main-part/get-import-template' }) |
||||
|
} |
||||
|
|
||||
|
// 启用 / 禁用
|
||||
|
export const updateEnableCode = async (data: EquipmentMainPartVO) => { |
||||
|
return await request.post({ url: `/eam/equipment-main-part/ables` , data }) |
||||
|
} |
Loading…
Reference in new issue