import request from '@/utils/request'

// 查询业务对象指标列表
export function listMetrics(query) {
    return request({
        url: '/obj/metrics/list',
        method: 'get',
        params: query
    })
}

// 查询业务对象指标详细
export function getMetrics(objMetricsId) {
    return request({
        url: '/obj/metrics/' + objMetricsId,
        method: 'get'
    })
}

// 新增业务对象指标
export function addMetrics(data) {
    return request({
        url: '/obj/metrics',
        method: 'post',
        data: data
    })
}

// 修改业务对象指标
export function updateMetrics(data) {
    return request({
        url: '/obj/metrics',
        method: 'put',
        data: data
    })
}

// 删除业务对象指标
export function delMetrics(objMetricsId) {
    return request({
        url: '/obj/metrics/' + objMetricsId,
        method: 'delete'
    })
}

export function metricsHistory(objMetricsId){
    return request({
        url: '/obj/metrics/history/' + objMetricsId,
        method: 'get'
    })
}

export function putMetrics(data){
    return request({
        url: '/obj/metrics',
        method: 'put',
        data: data
    })
}
