import request from '@/utils/request'

// 查询指标定义列表
export function listDef(query) {
    return request({
        url: '/metrics/def/list',
        method: 'get',
        params: query
    })
}

// 查询指标定义详细
export function getDef(metricsId) {
    return request({
        url: '/metrics/def/' + metricsId,
        method: 'get'
    })
}

// 新增指标定义
export function addDef(data) {
    return request({
        url: '/metrics/def',
        method: 'post',
        data: data
    })
}

// 修改指标定义
export function updateDef(data) {
    return request({
        url: '/metrics/def',
        method: 'put',
        data: data
    })
}

// 删除指标定义
export function delDef(metricsId) {
    return request({
        url: '/metrics/def/' + metricsId,
        method: 'delete'
    })
}
