From 91d92b81e52d90142e9091716f36f04774947d93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8C=AB=E7=8C=ABguowen?= <9290821+guowen-the-cat@user.noreply.gitee.com> Date: Tue, 5 Aug 2025 15:41:03 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E4=B8=8E=E5=9B=BD=E9=99=85?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/api/index.js | 57 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 ruoyi-ui/src/api/index.js diff --git a/ruoyi-ui/src/api/index.js b/ruoyi-ui/src/api/index.js new file mode 100644 index 0000000..15abe22 --- /dev/null +++ b/ruoyi-ui/src/api/index.js @@ -0,0 +1,57 @@ +import request from '@/utils/request' + +// 获取设备统计数据 +export function getDeviceStats() { + return request({ + url: '/index/deviceStats', + method: 'get' + }) +} + +// 获取任务统计数据 +export function getTaskStats() { + return request({ + url: '/index/taskStats', + method: 'get' + }) +} + +// 获取当前任务队列 +export function getCurrentTasks() { + return request({ + url: '/index/currentTasks', + method: 'get' + }) +} + +// 获取设备列表 +export function getDeviceList() { + return request({ + url: '/index/deviceList', + method: 'get' + }) +} + +// 获取任务类型分布图表数据 +export function getTaskTypeChart() { + return request({ + url: '/index/taskTypeChart', + method: 'get' + }) +} + +// 获取设备状态分布图表数据 +export function getDeviceStatusChart() { + return request({ + url: '/index/deviceStatusChart', + method: 'get' + }) +} + +// 获取首页综合数据 +export function getIndexData() { + return request({ + url: '/index/data', + method: 'get' + }) +} \ No newline at end of file