代码初始化
This commit is contained in:
71
src/api/light/switchBox.js
Normal file
71
src/api/light/switchBox.js
Normal file
@@ -0,0 +1,71 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询配电柜信息列表
|
||||
export function listSwitchBox(query) {
|
||||
return request({
|
||||
url: '/smartlight/light/switchBox/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询配电柜信息详细
|
||||
export function getSwitchBox(id) {
|
||||
return request({
|
||||
url: '/smartlight/light/switchBox/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增配电柜信息
|
||||
export function addSwitchBox(data) {
|
||||
return request({
|
||||
url: '/smartlight/light/switchBox',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改配电柜信息
|
||||
export function updateSwitchBox(data) {
|
||||
return request({
|
||||
url: '/smartlight/light/switchBox',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除配电柜信息
|
||||
export function delSwitchBox(id) {
|
||||
return request({
|
||||
url: '/smartlight/light/switchBox/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 导入模板下载
|
||||
export function importDownload(query) {
|
||||
return request({
|
||||
url: '/smartlight/light/switchBox/exportUrl',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 导入信息
|
||||
export function importSwitchBox(data) {
|
||||
return request({
|
||||
url: '/smartlight/light/switchBox/importData',
|
||||
method: 'post',
|
||||
data,
|
||||
responseType: 'blob'
|
||||
})
|
||||
}
|
||||
|
||||
// 获取配电柜详情
|
||||
export function getSwitchBoxInfo(id) {
|
||||
return request({
|
||||
url: `/smartlight/screen/getSwitchBox/${id}`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user