From 32d17aa477ee691589e52644aa5075630fc9fc5b Mon Sep 17 00:00:00 2001 From: mmc <1556375442@qq.com> Date: Tue, 26 May 2026 14:36:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=BA=E5=99=A8=E4=BA=BA=E5=88=97=E8=A1=A8?= =?UTF-8?q?=20=20=E4=BF=AE=E6=94=B9=E6=8E=A5=E5=8F=A3=20=20=E5=88=86?= =?UTF-8?q?=E9=A1=B5=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/device.ts | 28 +++++++++++++------ .../SystemSetting/DeviceManagement.tsx | 4 +-- 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/src/api/device.ts b/src/api/device.ts index e7b566b..04ceb6a 100644 --- a/src/api/device.ts +++ b/src/api/device.ts @@ -166,14 +166,6 @@ export function unbindDrone(data) { }) } -// 获取所有智能装备列表 -export function getSmartDeviceList(params) { - return request({ - url: '/iot/device/list', - method: 'get', - params - }) -} // 绑定智能装备 export function bindSmartDevice(data) { @@ -203,6 +195,24 @@ export function postLiveHeartbeat(data) { } - +//获取场站设备/iot/device/getSiteList + +export function getSiteDevice(data) { + return request({ + url: `/iot/device/getSiteList`, + method: 'get', + params: data + }) +} + +//获取配置i界面机器人设备/iot/device/getDeviceList + +export function getAllDevice(data) { + return request({ + url: `/iot/device/getDeviceList `, + method: 'get', + params: data + }) +} diff --git a/src/components/SystemSetting/DeviceManagement.tsx b/src/components/SystemSetting/DeviceManagement.tsx index f2d9118..ef3491f 100644 --- a/src/components/SystemSetting/DeviceManagement.tsx +++ b/src/components/SystemSetting/DeviceManagement.tsx @@ -31,7 +31,7 @@ import { DisconnectOutlined, } from '@ant-design/icons'; import SerialNumGenerate from "./SerialNumGenerate" -import { getPlaneDeviceList, bindDrone, unbindDrone, getSmartDeviceList, bindSmartDevice, unbindSmartDevice } from '@/api/device'; +import { getPlaneDeviceList, bindDrone, unbindDrone, bindSmartDevice, unbindSmartDevice, getSiteDevice } from '@/api/device'; import { getOrgList } from '@/api/organization/index'; import { getSiteByOrgId, getStationList } from '@/api/stationManage/index'; import { getUser } from '@/api/user/index'; @@ -127,7 +127,7 @@ export default function DeviceManagementPage() { const fetchSmartList = async () => { setLoading(true); try { - const res = await getSmartDeviceList(smartParams); + const res = await getSiteDevice(smartParams); if (res.code === 200) { setSmartList(res.rows || []); setSmartTotal(res.total || res.rows.length);