import request from '@/utils/axios.ts';
// 耳标设备列表
export function queryEarTagList(data) {
    console.log('=== 调用耳标设备列表API ===', data);
    return request({
        url: '/jbqClient/list',
        method: 'POST',
        data,
    });
}

// 主机设备列表
export function queryHostList(data) {
    console.log('=== 调用主机设备列表API ===', data);
    return request({
        url: '/jbqServer/serverList',
        method: 'POST',
        data,
    });
}

// 公司列表
// TODO: Backend endpoint /jbqDevice/companyList does not exist
export function queryCompanyList(data) {
    return Promise.resolve({
        code: 200,
        data: {
            list: [],
            total: 0
        }
    });
    // return request({
    //     url: '/jbqDevice/companyList',
    //     method: 'POST',
    //     data,
    // });
}

// 设备分配
// TODO: Backend endpoint /device/allocation does not exist
export function deviceAssign(data) {
    return Promise.resolve({
        code: 200,
        msg: '设备分配成功'
    });
    // return request({
    //     url: '/device/allocation',
    //     method: 'POST',
    //     data,
    // });
}

// 按数量分配设备
// TODO: Backend endpoint /device/allocationByNum does not exist
export function deviceAssignByNum(data) {
    return Promise.resolve({
        code: 200,
        msg: '设备分配成功'
    });
    // return request({
    //     url: '/device/allocationByNum',
    //     method: 'POST',
    //     data,
    // });
}

// 所有主机位置
// TODO: Backend endpoint /device/serverAllLocation does not exist
export function serverAllLocation() {
    return Promise.resolve({
        code: 200,
        data: []
    });
    // return request({
    //     url: '/device/serverAllLocation',
    //     method: 'GET',
    // });
}
