import request from '@/utils/request'
/* 设备管理 */
/* 设备类型管理 */
export function addDeviceType(data) {
    return request({
        url: "/deviceType",
        method: 'post',
        data: data
    })
}

export function delDeviceType(data) {
    return request({
        url: "/deviceType/" + data,
        method: 'delete',
    })
}
export function updateDeviceType(data) {
    return request({
        url: "/deviceType",
        method: 'put',
        data: data
    })
}
export function getDeviceType(data) {
    return request({
        url: "/deviceType/list",
        method: 'get',
        params: data
    })
}
export function exportDeviceType(data) {
    return request({
        url: "/deviceType/export",
        method: 'get',
        params: data
    })
}
export function DeviceTypeCollect(data) {
    return request({
        url: "/device/collect",
        method: 'get',
        params: data
    })
}
export function DeviceTypeStatus(data) { //设备离线查询
    return request({
        url: "/tbDeviceStatus/collect",
        method: 'post',
        data: data
    })
}
export function DeviceTypeStatusCollectIco(data) { //设备离线查询
    return request({
        url: "/tbDeviceStatus/collectIco",
        method: 'post',
        data: data
    })
}







/* 设备列表 */
export function addDevice(data) {
    return request({
        url: "/device",
        method: 'post',
        data: data
    })
}
export function delDevice(data) {
    return request({
        url: "/device/" + data,
        method: 'delete',
    })
}
export function updateDevice(data) {
    return request({
        url: "/device",
        method: 'put',
        data: data
    })
}
export function getDevice(data) {
    return request({
        url: "/device/list",
        method: 'post',
        data: data
    })
}
export function exportDevice(data) {
    return request({
        url: "/device/export",
        method: 'post',
        data: data
    })
}



/* 通信接口 */
export function addCommunicationApi(data) {
    return request({
        url: "/communicationApi",
        method: 'post',
        data: data
    })
}

export function delCommunicationApi(data) {
    return request({
        url: "/communicationApi/" + data,
        method: 'delete',
    })
}
export function updateCommunicationApi(data) {
    return request({
        url: "/communicationApi",
        method: 'put',
        data: data
    })
}
export function getCommunicationApi(data) {
    return request({
        url: "/communicationApi/list",
        method: 'get',
        params: data
    })
}
export function exportCommunicationApi(data) {
    return request({
        url: "/communicationApi/export",
        method: 'post',
        data: data
    })
}

/* 检测点位 */
export function addMonitorPoint(data) {
    return request({
        url: "/monitorPoint",
        method: 'post',
        data: data
    })
}
export function delMonitorPoint(data) {
    return request({
        url: "/monitorPoint/" + data,
        method: 'delete',
    })
}
export function updateMonitorPoint(data) {
    return request({
        url: "/monitorPoint",
        method: 'put',
        data: data
    })
}
export function getMonitorPoint(data) {
    return request({
        url: "/monitorPoint/list",
        method: 'get',
        params: data
    })
}
export function exportMonitorPoint(data) {
    return request({
        url: "/monitorPoint/export",
        method: 'post',
        data: data
    })
}

/* 监测通道 */
export function addDeviceChannel(data) {
    return request({
        url: "/deviceChannel",
        method: 'post',
        data: data
    })
}
export function delDeviceChannel(data) {
    return request({
        url: "/deviceChannel/" + data,
        method: 'delete',
    })
}
export function updateDeviceChannel(data) {
    return request({
        url: "/deviceChannel",
        method: 'put',
        data: data
    })
}
export function getDeviceChannel(data) {
    return request({
        url: "/deviceChannel/list",
        method: 'get',
        params: data
    })
}
export function exportDeviceChannel(data) {
    return request({
        url: "/deviceChannel/export",
        method: 'post',
        data: data
    })
}