import axios from "@/utils/request";


export function filterLog(query) {
  return axios({
    url: "/spssync/basic/udiinfo/filter",
    method: "get",
    params: query
  });
}

export function testConnect(query) {
  return axios({
    url: "/spssync/basic/connect/test",
    method: "get",
    params: query
  });
}

export function deleteLog(query) {
  return axios({
    url: "/spssync/basic/udiinfo/deleteByStatus",
    method: "post",
    data: query
  });
}

export function createSchedule(query) {
  return axios({
    url: "/spssync/basic/schedule/create",
    method: "post",
    data: query
  });
}


export function findConfig(query) {
  return axios({
    url: "/system/param/syncData/config",
    method: "get",
    params: query
  });
}

export function getSelectedBussinessType(query) {
  return axios({
    url: "/system/param/syncData/selectedBus",
    method: "get",
    params: query
  });
}

export function getSelectedToInBussinessType(query) {
  return axios({
    url: "/system/param/syncData/selectedToInBus",
    method: "get",
    params: query
  });
}

export function updateConfig(query) {
  return axios({
    url: "/system/param/syncData/save",
    method: "post",
    data: query
  });
}

export function infoByStatus(query) {
  return axios({
    url: "/spssync/basic/udiinfo/infoByStatus",
    method: "post",
    data: query,
    responseType: 'blob'
  });
}

export function downloadFile(query) {
  return axios({
    url: "/sps/sync/download/info/file",
    method: "get",
    param: query,
    responseType: 'blob'
  });
}

export function uploadData(query) {
  return axios({
    url: "/spssync/udiinfo/uploadData",
    method: "post",
    data: query
  });
}


