From a7e6761ba0cfccdf33ed552eb2d3b783c8e4ab4a Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Wed, 16 Apr 2025 20:49:12 +0800
Subject: [PATCH] feat:事件弹窗显示调整

---
 src/api/home/index.js |  137 +++++++++++++++++++++++++++++++++++++++------
 1 files changed, 118 insertions(+), 19 deletions(-)

diff --git a/src/api/home/index.js b/src/api/home/index.js
index 318eb8e..b4b3556 100644
--- a/src/api/home/index.js
+++ b/src/api/home/index.js
@@ -1,25 +1,124 @@
-import request from '@/axios';
+import request from '@/axios'
 
 // 巡检总任务数量
-export const getTotalJobNum = () => {
-  return request({
-    url: '/drone-device-core/wayline/waylineJobInfo/totalJobNum',
-    method: 'get',
-  });
-};
+export const getTotalJobNum = params => {
+	return request({
+		url: '/drone-device-core/wayline/waylineJobInfo/totalJobNum',
+		method: 'get',
+		params,
+	})
+}
 
 // 巡检任务item数量
-export const getJobStatistics = () => {
-  return request({
-    url: '/drone-device-core/wayline/waylineJobInfo/jobStatistics',
-    method: 'post',
-  });
-};
+export const getJobStatistics = data => {
+	return request({
+		url: '/drone-device-core/wayline/waylineJobInfo/jobStatistics',
+		method: 'post',
+		data,
+	})
+}
 
 // 巡检任务柱状图数据
-export const getJobNumBar = () => {
-  return request({
-    url: '/drone-device-core/wayline/waylineJobInfo/jobNumBar',
-    method: 'post',
-  });
-};
+export const getJobNumBar = data => {
+	return request({
+		url: '/drone-device-core/wayline/waylineJobInfo/jobNumBar',
+		method: 'post',
+		data,
+	})
+}
+// 事件概况总数
+export const getJobEventTotal = () => {
+	return request({
+		url: '/drone-device-core/jobEvent/total',
+		method: 'get',
+	})
+}
+// 事件概况分类数
+export const getJobEventByStatus = data => {
+	return request({
+		url: '/drone-device-core/jobEvent/eventByStatus',
+		method: 'post',
+		data,
+	})
+}
+export const getJobEventBrokerLine = data => {
+	return request({
+		url: '/drone-device-core/jobEvent/eventBrokerLine',
+		method: 'post',
+		data,
+	})
+}
+
+// 任务成果
+export const getMediaFileCountBy = () => {
+	return request({
+		url: '/blade-resource/media/api/v1/workspaces/files/getMediaFileCountBy',
+		method: 'get',
+	})
+}
+
+// 降本增效
+export const optimizeCostEfficiency = () => {
+	return request({
+		url: '/drone-device-core/manage/api/v1/devices/optimizeCostEfficiency',
+		method: 'get',
+	})
+}
+
+// 历史巡检任务列表
+export const getBeforeJob = data => {
+	return request({
+		url: '/drone-device-core/wayline/waylineJobInfo/beforeJob',
+		method: 'post',
+		data,
+	})
+}
+// 当前巡检任务列表
+export const getTodayJob = data => {
+	return request({
+		url: `/drone-device-core/wayline/waylineJobInfo/todayJob?current=${data.current}&size=${data.size}`,
+		method: 'post',
+		data,
+	})
+}
+
+// 巡检任务详情 柱状图
+export const jobNumBar = data => {
+	return request({
+		url: '/drone-device-core/wayline/waylineJobInfo/jobEventBar',
+		method: 'post',
+		data,
+	})
+}
+// 巡检任务详情 饼图
+export const eventNumPie = data => {
+	return request({
+		url: '/drone-device-core/jobEvent/eventNumPie',
+		method: 'post',
+		data,
+	})
+}
+
+// 获取区域
+export const getRegion = code => {
+	return request({
+		url: '/blade-system/region/select',
+		method: 'get',
+		params: { code },
+	})
+}
+// 立即返航
+export const flyByJobId = jobId => {
+	return request({
+		url: '/drone-device-core/wayline/api/v1/workspaces/flyByJobId?jobId=' + jobId,
+		method: 'post',
+	})
+}
+// 再次执行
+export const returnHome = sn => {
+	return request({
+		url: `/drone-device-core/dp/home/${sn}/drc/returnHome`,
+		method: 'post',
+	})
+}
+

--
Gitblit v1.9.3