From f20a554bdb24e9dfde9dc6a69d78595944f61d15 Mon Sep 17 00:00:00 2001
From: mark <mark18340872469@163.com>
Date: 星期二, 25 十月 2022 14:53:57 +0800
Subject: [PATCH] 设备管理 样式调整

---
 src/api/device.js |   95 +++++++++++++++++++++++++++++++++++++----------
 1 files changed, 75 insertions(+), 20 deletions(-)

diff --git a/src/api/device.js b/src/api/device.js
index 1eaec51..bd1cdc0 100644
--- a/src/api/device.js
+++ b/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,
+  });
+};

--
Gitblit v1.8.0