import request from "@/utils/request";
import { AxiosPromise } from "axios";
import { DeviceContainer, ResData } from "./screwdriverTypes";
//获取数据采集data
export function getScrewdriverData(): Promise<ResData> {
  return request({
    url: `/api/v1/process/data/acquisition/device/list`,
    method: "get",
  });
}
export function getAcquisitionData(data: any): Promise<ResData> {
  return request({
    url: `/api/v1/process/data/acquisition/page`,
    method: "post",
    data,
  });
}
export function addAcquisitionData(data: any): Promise<ResData> {
  return request({
    url: `/api/v1/process/data/acquisition/add`,
    method: "post",
    data,
  });
}
export function updateAcquisitionData(data: any): Promise<ResData> {
  return request({
    url: `/api/v1/process/data/acquisition/update`,
    method: "post",
    data,
  });
}
export function delAcquisitionData(data: any): Promise<ResData> {
  return request({
    url: `/api/v1/process/data/acquisition/del`,
    method: "post",
    data,
  });
}
//获取电动螺丝刀列表
export function getTaskList(data: any): Promise<ResData> {
  return request({
    url: `/api/v1/screwdriverTask/list`,
    method: "post",
    data,
  });
}
export function startData(data: any): Promise<ResData> {
  return request({
    url: `/api/v1/process/data/acquisition/start`,
    method: "post",
    data,
  });
}
