yudao-dev/src/api/base/equipment.js

62 lines
1.1 KiB
JavaScript
Raw Normal View History

2023-08-10 16:52:47 +08:00
import request from '@/utils/request'
// 创建设备
export function createEquipment(data) {
return request({
2023-10-17 15:22:17 +08:00
url: '/base/core-equipment/create',
2023-08-10 16:52:47 +08:00
method: 'post',
data: data
})
}
// 更新设备
export function updateEquipment(data) {
return request({
2023-10-17 15:22:17 +08:00
url: '/base/core-equipment/update',
2023-08-10 16:52:47 +08:00
method: 'put',
data: data
})
}
// 删除设备
export function deleteEquipment(id) {
return request({
2023-10-17 15:22:17 +08:00
url: '/base/core-equipment/delete?id=' + id,
2023-08-10 16:52:47 +08:00
method: 'delete'
})
}
// 获得设备
export function getEquipment(id) {
return request({
2023-10-17 15:22:17 +08:00
url: '/base/core-equipment/get?id=' + id,
2023-08-10 16:52:47 +08:00
method: 'get'
})
}
// 获得设备分页
export function getEquipmentPage(query) {
return request({
2023-10-17 15:22:17 +08:00
url: '/base/core-equipment/page',
2023-08-10 16:52:47 +08:00
method: 'get',
params: query
})
}
// 导出设备 Excel
export function exportEquipmentExcel(query) {
return request({
2023-10-17 15:22:17 +08:00
url: '/base/core-equipment/export-excel',
2023-08-10 16:52:47 +08:00
method: 'get',
params: query,
responseType: 'blob'
})
}
2023-09-08 16:01:54 +08:00
// 获得所有设备列表
export function getEquipmentAll() {
return request({
2023-10-17 15:22:17 +08:00
url: '/base/core-equipment/listAll',
2023-09-08 16:01:54 +08:00
method: 'get'
})
2023-09-11 15:04:16 +08:00
}