72 lines
1.3 KiB
JavaScript
72 lines
1.3 KiB
JavaScript
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'
|
|
})
|
|
}
|