From 78100600b17b48336b5a60b0e648b1bc98a53a90 Mon Sep 17 00:00:00 2001
From: 龚焕茏 <2842157468@qq.com>
Date: 星期三, 21 八月 2024 18:00:49 +0800
Subject: [PATCH] feat:大屏查询条件

---
 src/api/newpage.js |   38 +++++++++++++++++++++++---------------
 1 files changed, 23 insertions(+), 15 deletions(-)

diff --git a/src/api/newpage.js b/src/api/newpage.js
index 70c4e00..37db17d 100644
--- a/src/api/newpage.js
+++ b/src/api/newpage.js
@@ -1,57 +1,65 @@
 import request from "@/utils/request";
 
-// 璁惧鏁版嵁
-export function getDeviceData() {
+// 鑾峰彇鍦板尯閮ㄩ棬
+export function getDepartmentData() {
   return request({
-    url: "/dashboard/monitor/total",
+    url: "/dashboard/department",
+    method: "get",
+  });
+}
+
+// 璁惧鏁版嵁
+export function getDeviceData(dataScope, deptId) {
+  return request({
+    url: "/dashboard/monitor/total?dataScope=" + dataScope + "&deptId=" + deptId,
     method: "get",
   });
 }
 
 // 宸ュ崟鏁版嵁
-export function getWorkOrderData() {
+export function getWorkOrderData(dataScope, deptId) {
   return request({
-    url: "/dashboard/workOrder/total",
+    url: "/dashboard/workOrder/total?dataScope=" + dataScope + "&deptId=" + deptId,
     method: "get",
   });
 }
 
 // 宸ュ崟鍦板尯
-export function getWorkOrderRegion() {
+export function getWorkOrderRegion(dataScope, deptId) {
   return request({
-    url: "/dashboard/workOrder/region",
+    url: "/dashboard/workOrder/region?dataScope=" + dataScope + "&deptId=" + deptId,
     method: "get",
   });
 }
 
 //璁惧姝e父鐜�
-export function getNormalRate(id) {
+export function getNormalRate(dataScope, deptId) {
   return request({
-    url: "/dashboard/monitor/rate?dataScope=" + id,
+    url: "/dashboard/monitor/rate?dataScope=" + dataScope + "&deptId=" + deptId,
     method: "get",
   });
 }
 
 //浜鸿劯鑰冩牳鏁版嵁
-export function checkFace(id) {
+export function checkFace(dataScope, deptId) {
   return request({
-    url: "/dashboard/check/face",
+    url: "/dashboard/check/face?dataScope=" + dataScope + "&deptId=" + deptId,
     method: "get",
   });
 }
 
 // 杞﹁締鑰冩牳鏁版嵁
-export function checkCar(id) {
+export function checkCar(dataScope, deptId) {
   return request({
-    url: "/dashboard/check/car",
+    url: "/dashboard/check/car?dataScope=" + dataScope + "&deptId=" + deptId,
     method: "get",
   });
 }
 
 // 瑙嗛鑰冩牳鏁版嵁
-export function checkVideo(id) {
+export function checkVideo(dataScope, deptId) {
   return request({
-    url: "/dashboard/check/video",
+    url: "/dashboard/check/video?dataScope=" + dataScope + "&deptId=" + deptId,
     method: "get",
   });
 }

--
Gitblit v1.8.0