import request from '@/utils/request'
/* 事件中心 */
/* 隐患告警管理 type1隐患2告警 */
export function addTbAlarm(data) {
    return request({
        url: "/tbAlarm",
        method: 'post',
        data: data
    })
}

export function delTbAlarm(data) {
    return request({
        url: "/tbAlarm/" + data,
        method: 'delete',
    })
}
export function updateTbAlarm(data) {
    return request({
        url: "/tbAlarm",
        method: 'put',
        data: data
    })
}
export function updateTbAlarmP(data) { //批量修改
    return request({
        url: "/tbAlarm/list",
        method: 'put',
        data: data
    })
}
export function getTbAlarm(data) {
    return request({
        url: "/tbAlarm/page",
        method: 'post',
        data: data
    })
}

export function exportTbAlarm(data) {
    return request({
        url: "/tbAlarm/export",
        method: 'post',
        data: data
    })
}

export function collectTbAlarm(data) { //告警统计
    return request({
        url: "/tbAlarm/collect",
        method: 'post',
        data: data
    })
}


export function getTbAlarmCollectIco(data) { //折线图多个
    return request({
        url: "/tbAlarm/collectIco",
        method: 'post',
        data: data
    })
}

export function getTbAlarmCollectIcoDetail(data) { //折线图单个在线
    return request({
        url: "/tbAlarm/collectIcoDetail",
        method: 'post',
        data: data
    })
}
export function getTbAlarmCollectIcoStatusDetail(data) { //折线图单个离线
    return request({
        url: "/tbDeviceStatus/collectIcoDetail",
        method: 'post',
        data: data
    })
}

export function tbInfoList(data) { //设备工况
    return request({
        url: "/tbInfo/list",
        method: 'post',
        data: data
    })
}














/* 事件管理 */
export function addEventManage(data) {
    return request({
        url: "/eventManage",
        method: 'post',
        data: data
    })
}

export function delEventManage(data) {
    return request({
        url: "/eventManage/" + data,
        method: 'delete',
    })
}
export function updateEventManage(data) {
    return request({
        url: "/eventManage",
        method: 'put',
        data: data
    })
}
export function getEventManage(data) {
    return request({
        url: "/eventManage/list",
        method: 'get',
        params: data
    })
}
export function exportEventManage(data) {
    return request({
        url: "/eventManage/export",
        method: 'post',
        data: data
    })
}

export function collectEventManage(data) {
    return request({
        url: "/eventManage/collect",
        method: 'get',
        params: data
    })
}