mark
2022-10-25 f20a554bdb24e9dfde9dc6a69d78595944f61d15
src/api/device.js
@@ -1,4 +1,4 @@
import request from "./index";
import request from "@/scripts/httpRequest";
/* 
  添加设备
@@ -7,7 +7,7 @@
*/
export const addDevice = (params) => {
  return request({
    url: "/data/api-d/device/addDevice",
    url: "/sass/api-d/device/addDevice",
    method: "post",
    data: params,
  });
@@ -25,7 +25,7 @@
*/
export const findDevList = (params) => {
  return request({
    url: "/data/api-d/device/findDeviceList",
    url: "/saas/api-d/device/findDeviceListByUser",
    method: "post",
    data: params,
  });
@@ -37,8 +37,18 @@
*/
export const findDevListByUser = () => {
  return request({
    url: "/data/api-d/device/getAllDeviceMenu",
    url: "/saas/api-d/device/getAllDeviceMenu",
    method: "get",
  });
};
/* 导出设备列表 */
export const exportDevListExcel = (data) => {
  return request({
    url: "/saas/api-d/device/exportDevListExcel",
    method: "post",
    data,
    responseType: "blob",
  });
};
@@ -49,7 +59,7 @@
*/
export const unbind = (params) => {
  return request({
    url: "/data/api-d/device/unbind",
    url: "/saas/api-d/device/unbind",
    method: "post",
    data: params,
  });
@@ -58,7 +68,7 @@
// 显示设备详情
export const findDevDetail = (data) => {
  return request({
    url: "/data/api-d/device/show",
    url: "/saas/api-d/device/show",
    method: "post",
    data,
  });
@@ -67,7 +77,7 @@
//回填重启日期
export const getRestartTask = (data) => {
  return request({
    url: "/data/api-d/device/getRestartTask",
    url: "/saas/api-d/device/getRestartTask",
    method: "post",
    data,
  });
@@ -76,16 +86,16 @@
// 设置重启日期
export const setRestartTask = (data) => {
  return request({
    url: "/data/api-d/device/setRestartTask",
    url: "/saas/api-d/device/setRestartTask",
    method: "post",
    data,
  });
};
// 设置重启日期
// 重启设备
export const restart = (data) => {
  return request({
    url: "/data/api-d/device/restart",
    url: "/saas/api-d/device/restart",
    method: "post",
    data,
  });
@@ -94,7 +104,7 @@
// 检查最新版本
export const checkVersion = (data) => {
  return request({
    url: "/data/api-d/device/checkVersion",
    url: "/saas/api-d/device/checkVersion",
    method: "post",
    data,
  });
@@ -103,7 +113,7 @@
// 更新最新版本
export const updateVersion = (data) => {
  return request({
    url: "/data/api-d/device/updateVersion",
    url: "/saas/api-d/device/updateVersion",
    method: "post",
    data,
  });
@@ -112,7 +122,7 @@
// 获取应用
export const findAllApp = (data) => {
  return request({
    url: "/data/api-d/device/findAllApp",
    url: "/saas/api-d/device/findAllApp",
    method: "post",
    data,
  });
@@ -121,7 +131,7 @@
// 获取算法
export const findAllSdk = (data) => {
  return request({
    url: "/data/api-d/device/findAllSdk",
    url: "/saas/api-d/device/findAllSdk",
    method: "post",
    data,
  });
@@ -130,7 +140,7 @@
// 获取设备性能
export const showSystemStates = (data) => {
  return request({
    url: "/data/api-d/device/showSystemStates",
    url: "/saas/api-d/device/showSystemStates",
    method: "post",
    data,
  });
@@ -139,7 +149,7 @@
// 获取算法资源
export const showProcesses = (data) => {
  return request({
    url: "/data/api-d/device/showProcesses",
    url: "/saas/api-d/device/showProcesses",
    method: "post",
    data,
  });
@@ -148,7 +158,7 @@
// 卸载算法
export const unInstallSdk = (data) => {
  return request({
    url: "/data/api-d/device/unInstallSdk",
    url: "/sass/api-d/device/unInstallSdk",
    method: "post",
    data,
  });
@@ -157,7 +167,7 @@
// 卸载应用
export const unInstallApp = (data) => {
  return request({
    url: "/data/api-d/device/unInstallApp",
    url: "/saas/api-d/device/unInstallApp",
    method: "post",
    data,
  });
@@ -166,7 +176,7 @@
// 升级算法应用
export const installAppSdk = (data) => {
  return request({
    url: "/data/api-d/device/installAppSdk",
    url: "/sass/api-d/device/installAppSdk",
    method: "post",
    data,
  });
@@ -175,8 +185,53 @@
// 获取时间
export const clockInfo = (data) => {
  return request({
    url: "/data/api-d/device/clockInfo",
    url: "/saas/api-d/device/clockInfo",
    method: "post",
    data,
  });
};
// 获取集群
export const findClustersBySearch = (data) => {
  return request({
    url: "/saas/api-d/device/findClustersBySearch",
    method: "post",
    data,
  });
};
// 获取集群
export const findDeviceListAll = (params) => {
  return request({
    url: "/saas/api-d/device/findDeviceListAll",
    method: "post",
    data: params,
  });
};
//获取集群下所有设备
export const getDevicesByCluster = (params) => {
  return request({
    url: "/saas/api-d/device/getDevicesByCluster",
    method: "post",
    data: params,
  });
};
//获取集群下所有设备
export const addCluster = (params) => {
  return request({
    url: "/saas/api-d/device/addCluster",
    method: "post",
    data: params,
  });
};
//获取集群下所有设备
export const addDeviceToUser = (params) => {
  return request({
    url: "/saas/api-d/device/addDeviceToUser",
    method: "post",
    data: params,
  });
};