import axios from '@/utils/request'

export function getPlatform(query) {
    return axios({
        url: "/udiwms/platform/list",
        method: "get",
        params: query
    });
}

export function updatePlatform(data) {
    return axios({
        url: "/udiwms/platform/update",
        method: "post",
        data: data
    });
}

export function deletePlatform(data) {
    return axios({
        url: "/udiwms/platform/remove",
        method: "post",
        data: data
    });
}

export function deletePlatforms(data) {
    return axios({
        url: "/udiwms/platform/delect",
        method: "post",
        data: data
    });
}


export function linkPlatform(query) {
    return axios({
        url: "/udiwms/platform/link",
        method: "post",
        data: query
    });
}

//查询往来单位和自助平台关联数据
export function getLinkPlatformList(query) {
    return axios({
        url: "/udiwms/platform/getLinkPlatformList",
        method: "get",
        params: query
    });
}

//解绑往来单位字典和自助平台
export function unbindPlatform(query) {
    return axios({
        url: "/udiwms/platform/unbind",
        method: "post",
        params: query
    });
}

export function getTargetActions(query) {
    return axios({
        url: "/udiwms/platform/getTargetActions",
        method: "get",
        params: query
    });
}

export function getTargetInv(query) {
    return axios({
        url: "/udiwms/platform/getTargetInv",
        method: "get",
        params: query
    });
}

export function getTargetSubInv(query) {
    return axios({
        url: "/udiwms/platform/getTargetSubInv",
        method: "get",
        params: query
    });
}

export function testPlatformConnection(query) {
    return axios({
        url: "/udiwms/platform/testPlatformConnection",
        method: "get",
        params: query
    })
}

export function testUserInfo(data) {
    return axios({
        url: "/udiwms/platform/testUserInfo",
        method: "post",
        data: data
    });
}
