import request from '../js/request'
import config from '../js/config'

export function addEngineering(params) {
    return request({
        url: '/cs-device-boot/engineering/addEngineering',
        method: 'post',
        data: params,
        header: {
            'Content-Type': 'application/json',
        },
    })
}

export function auditEngineering(params) {
    return request({
        url: '/cs-device-boot/engineering/auditEngineering',
        method: 'post',
        data: params,
        header: {
            'Content-Type': 'application/json',
        },
    })
}

export function queryEngineering(params) {
    return request({
        url: '/cs-device-boot/engineering/queryEngineering',
        method: 'post',
        data: params,
        header: {
            'Content-Type': 'application/json',
        },
    })
}

// 删除工程
export function deleteEngineering(id) {
    return request({
        url: '/cs-device-boot/engineering/auditEngineering',
        method: 'post',
        data: {
            id: id,
            status: 0,
        },
        header: {
            'Content-Type': 'application/json',
        },
    })
}

// 查询工程配置列表
export function queryAllEnginner(params) {
    return request({
        url: '/cs-device-boot/csMarketData/queryAllEnginner',
        method: 'post',
    })
}

// 更新工程配置
export function csMarketDataAdd(params) {
    return request({
        url: '/cs-device-boot/csMarketData/follow',
        method: 'post',
        data: params,
        header: {
            'Content-Type': 'application/json',
        },
    })
}
