初始代码
This commit is contained in:
57
yawei-mes/mes-ui/src/api/energy/coal.js
Normal file
57
yawei-mes/mes-ui/src/api/energy/coal.js
Normal file
@@ -0,0 +1,57 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询煤炭监测列表
|
||||
export const getCoalMonitoringPage = (params) => {
|
||||
return request({
|
||||
url: '/energy/coal-monitoring/page',
|
||||
method: 'get',
|
||||
params
|
||||
}).then((res) => ({
|
||||
list: res.rows || [],
|
||||
total: res.total || 0
|
||||
}))
|
||||
}
|
||||
|
||||
// 查询煤炭监测详情
|
||||
export const getCoalMonitoring = (id) => {
|
||||
return request({
|
||||
url: `/energy/coal-monitoring/get?id=${id}`,
|
||||
method: 'get'
|
||||
}).then((res) => res.data)
|
||||
}
|
||||
|
||||
// 新增煤炭监测
|
||||
export const createCoalMonitoring = (data) => {
|
||||
return request({
|
||||
url: '/energy/coal-monitoring/create',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改煤炭监测
|
||||
export const updateCoalMonitoring = (data) => {
|
||||
return request({
|
||||
url: '/energy/coal-monitoring/update',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除煤炭监测
|
||||
export const deleteCoalMonitoring = (id) => {
|
||||
return request({
|
||||
url: `/energy/coal-monitoring/delete?id=${id}`,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 导出煤炭监测 Excel
|
||||
export const exportCoalMonitoring = (params) => {
|
||||
return request({
|
||||
url: '/energy/coal-monitoring/export-excel',
|
||||
method: 'get',
|
||||
params,
|
||||
responseType: 'blob'
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user