import request from '@/utils/request' // 查询位置列表 export function listLocation(query) { return request({ url: '/ems/location/list', method: 'get', params: query }) } // 查询位置详细 export function getLocation(locationId) { return request({ url: '/ems/location/' + locationId, method: 'get' }) } // 新增位置 export function addLocation(data) { return request({ url: '/ems/location', method: 'post', data: data }) } // 修改位置 export function updateLocation(data) { return request({ url: '/ems/location', method: 'put', data: data }) } // 删除位置 export function delLocation(locationId) { return request({ url: '/ems/location/' + locationId, method: 'delete' }) } // 获取位置及其子位置下的所有设备 export function getLocationMeters(locationId) { return request({ url: '/ems/location/' + locationId + '/meters', method: 'get' }) } // 获取位置树及其设备信息(用于拓扑图展示) export function getLocationTree() { return request({ url: '/ems/location/tree/topology', method: 'get' }) }