| | |
| | | model: string // 型号 |
| | | } |
| | | |
| | | // 设备 VO |
| | | export interface DeviceVO { |
| | | id: number // id |
| | | devId: string // 设备编号 |
| | | category: string // 分类名 |
| | | brand: string // 品牌 |
| | | model: string // 型号 |
| | | purchaseDate: Date // 采购日期 |
| | | } |
| | | |
| | | // 设备型号 API |
| | | export const DevModelApi = { |
| | | // 查询设备型号分页 |
| | |
| | | exportDevModel: async (params) => { |
| | | return await request.download({ url: `/ecg/dev-model/export-excel`, params }) |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 设备 API |
| | | export const DeviceApi = { |
| | | // 查询设备分页 |
| | | getDevicePage: async (params: any) => { |
| | | return await request.get({ url: `/ecg/device/page`, params }) |
| | | }, |
| | | |
| | | // 查询设备详情 |
| | | getDevice: async (id: number) => { |
| | | return await request.get({ url: `/ecg/device/get?id=` + id }) |
| | | }, |
| | | |
| | | // 新增设备 |
| | | createDevice: async (data: DeviceVO) => { |
| | | return await request.post({ url: `/ecg/device/create`, data }) |
| | | }, |
| | | |
| | | // 修改设备 |
| | | updateDevice: async (data: DeviceVO) => { |
| | | return await request.put({ url: `/ecg/device/update`, data }) |
| | | }, |
| | | |
| | | // 删除设备 |
| | | deleteDevice: async (id: number) => { |
| | | return await request.delete({ url: `/ecg/device/delete?id=` + id }) |
| | | }, |
| | | |
| | | // 导出设备 Excel |
| | | exportDevice: async (params) => { |
| | | return await request.download({ url: `/ecg/device/export-excel`, params }) |
| | | } |
| | | } |