import request from '@/utils/request'

// 查询业务模型列表
export function listBm(query) {
    return request({
        url: '/hl/bm/list',
        method: 'get',
        params: query
    })
}

// 查询业务模型详细
export function getBm(modelId) {
    return request({
        url: '/hl/bm/' + modelId,
        method: 'get'
    })
}

// 新增业务模型
export function addBm(data) {
    return request({
        url: '/hl/bm',
        method: 'post',
        data: data
    })
}

// 修改业务模型
export function updateBm(data) {
    return request({
        url: '/hl/bm',
        method: 'put',
        data: data
    })
}

// 删除业务模型
export function delBm(modelId) {
    return request({
        url: '/hl/bm/' + modelId,
        method: 'delete'
    })
}

// 选择对象
export function selectBm(modelId) {
    return request({
        url: '/hl/bm/obj/select/' + modelId,
        method: 'get'
    })
}

export function addBmModel(modelId,query) {
    return request({
        url: '/hl/bm/obj/add/' + modelId,
        method: 'get',
        params: query
    })
}

// 一健巡检--模型列表
export function getCheckList(){
    return request({
        url: '/hl/bm/check/list',
        method: 'get'
    })
}
