From 793e473ab9cef377d9e92bcc72637073fed7fd91 Mon Sep 17 00:00:00 2001
From: mmc <1556375442@qq.com>
Date: Tue, 26 May 2026 14:57:53 +0800
Subject: [PATCH] =?UTF-8?q?=E6=9C=BA=E5=99=A8=E4=BA=BA=20=E6=97=A0?=
=?UTF-8?q?=E4=BA=BA=E6=9C=BA=E7=BB=91=E5=AE=9A=20=E8=A7=A3=E7=BB=91?=
=?UTF-8?q?=E5=88=86=E9=A1=B5=E6=9F=A5=E8=AF=A2=20=20=E7=AD=9B=E9=80=89=20?=
=?UTF-8?q?=E6=88=90=E5=8A=9F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/device.ts | 2 +-
.../SystemSetting/DeviceManagement.tsx | 19 ++++++++++++++-----
src/pages/Devices.tsx | 6 +++---
3 files changed, 18 insertions(+), 9 deletions(-)
diff --git a/src/api/device.ts b/src/api/device.ts
index 04ceb6a..114ba58 100644
--- a/src/api/device.ts
+++ b/src/api/device.ts
@@ -209,7 +209,7 @@ export function getSiteDevice(data) {
export function getAllDevice(data) {
return request({
- url: `/iot/device/getDeviceList `,
+ url: `/iot/device/getDeviceList`,
method: 'get',
params: data
})
diff --git a/src/components/SystemSetting/DeviceManagement.tsx b/src/components/SystemSetting/DeviceManagement.tsx
index ef3491f..61fc9e6 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, bindSmartDevice, unbindSmartDevice, getSiteDevice } from '@/api/device';
+import { getPlaneDeviceList, bindDrone, unbindDrone, bindSmartDevice, unbindSmartDevice, getAllDevice } from '@/api/device';
import { getOrgList } from '@/api/organization/index';
import { getSiteByOrgId, getStationList } from '@/api/stationManage/index';
import { getUser } from '@/api/user/index';
@@ -95,6 +95,7 @@ export default function DeviceManagementPage() {
const [smartParams, setSmartParams] = useState({
pageNum: 1,
pageSize: 10,
+ serialNumber: '',
});
const [smartTotal, setSmartTotal] = useState(0);
@@ -127,7 +128,7 @@ export default function DeviceManagementPage() {
const fetchSmartList = async () => {
setLoading(true);
try {
- const res = await getSiteDevice(smartParams);
+ const res = await getAllDevice(smartParams);
if (res.code === 200) {
setSmartList(res.rows || []);
setSmartTotal(res.total || res.rows.length);
@@ -343,13 +344,13 @@ export default function DeviceManagementPage() {
render: (_, record) => (