src/api/home/index.js
@@ -1,8 +1,77 @@
import request from "@/utils/request";
//获取任务
import axios from "axios"
// 获取网络配置
export const NetworkCard = () => {
  return request({
    url: "/v1/config/net",
    method: "get",
  });
};
export const setworkCard = (data) => {
  return request({
    url: "/v1/config/net",
    method: "post",
    data
  });
};
// 获取生产进度
export const getProgress = (data) => {
  return request({
    url: "/v1/plc/productProgress",
    loadingFlag:true,
    method: "post",
    data
  });
};
// 获取pLC品牌 列表
export const getMiniDictList = () => {
  return request({
    url: "/v1/plcBrand/list",
    method: "get",
  });
};
// 添加 pLC品牌
export const addMiniDict = () => {
  return request({
    url: "/v1/plcBrand/add",
    method: "post",
  });
};
// 删除 pLC品牌
export const deleteMiniDict = (data) => {
  return request({
    url: `v1/plcBrand/delete/${data.id}`,
    method: "delete",
  });
};
// 更新 pLC品牌
export const updateMiniDict = () => {
  return request({
    url: "/v1/plcBrand/update",
    method: "put",
  });
};
// 获取plc
export const getPlc = () => {
  return request({
    url: "/v1/config/plc",
    method: "get",
  });
};
export const setPlc = (data) => {
  return request({
    url: "/v1/config/plc",
    method: "post",
    data,
  });
};
// 设置plc
//获取任务?page= +data.page+'&pageSize='+data.pageSize
export const getTaskInfo = (data) => {
  return request({
    url: "/v1/task/get",
    url: "/v1/task/get?taskMode="+data.taskMode,
    method: "get",
    data,
  });
@@ -22,6 +91,7 @@
  return request({
    url: `v1/task/start/${data.id}`,
    method: "get",
    loadingFlag:true,
    data,
  });
};
@@ -29,11 +99,29 @@
export const sendProcessParams = (data) => {
  return request({
    url: `v1/task/sendProcessParams/${data.id}`,
    url: `v1/task/sendProcessParams`,
    method: "post",
    loadingFlag:true,
    data,
  });
};
// 倒计时
export const countdown = (data) => {
  return request({
    url: 'v1/task/countdown',
    method: "get",
    data,
  });
};
//获取未任务
export const getTaskUnStarted = (data) => {
  return request({
    url: "/v1/task/get/unStarted?page="+data.page+'&pageSize='+data.pageSize,
    method: "get",
    data,
  });
};