songshankun
2023-11-22 f6739d7542be48f7f8139c3d5fc7b2326e5cfc8d
src/api/home/index.js
@@ -1,6 +1,6 @@
import request from "@/utils/request";
import axios from "axios"
// 获取网络配置
// 获取网络配置
export const NetworkCard = () => {
  return request({
    url: "/v1/config/net",
@@ -15,7 +15,7 @@
    data
  });
};
// 获取生产进度
// 获取生产进度
export const getProgress = (data) => {
  return request({
    url: "/v1/plc/productProgress",
@@ -31,29 +31,29 @@
    method: "get",
  });
};
// 添加 pLC品牌
// 添加 pLC品牌
export const addMiniDict = () => {
  return request({
    url: "/v1/plcBrand/add",
    method: "post",
  });
};
// 删除 pLC品牌
// 删除 pLC品牌
export const deleteMiniDict = (data) => {
  return request({
    url: `v1/plcBrand/delete/${data.id}`,
    method: "delete",
  });
};
// 更新 pLC品牌
// 更新 pLC品牌
export const updateMiniDict = () => {
  return request({
    url: "/v1/plcBrand/update",
    method: "put",
  });
};
// 获取plc
// 获取plc
export const getPlc = () => {
  return request({
    url: "/v1/config/plc",
@@ -115,7 +115,7 @@
    data,
  });
};
//获取未任务
//获取未任务
export const getTaskUnStarted = (data) => {
  return request({
    url: "/v1/task/get/unStarted?page="+data.page+'&pageSize='+data.pageSize,
@@ -124,4 +124,51 @@
  });
};
// 获取工艺模型列表
export const processModelList = (data) => {
  return request({
    url: "/v1/processModel/list?page="+data.page+'&pageSize='+data.pageSize+'&procedureId='+data.procedureId,
    method: "get",
    data,
  });
};
// 更新工艺模型
export const updateProcessParams = (data) => {
  return request({
    url: "/v1/task/updateProcessParams",
    method: "post",
    data,
  });
};
/**
 * 获取当前面板绑定的设备列表
 */
export function getDeviceList() {
  return request({
    url: `/v1/device/list`,
    method: 'get'
  })
}
/**
 * 设定当前设备配置
 */
export function apiSetCurrentDeviceConfig(data) {
  return request({
    url: `/v1/device/config`,
    method: 'post',
    data
  })
}
/**
 * 设定当前设备
 */
export function apiSetCurrentDevice(data) {
  return request({
    url: `/v1/device/setCurrentDeviceId`,
    method: 'post',
    data
  })
}