From ac8a1d013465a3a4da0369c48c49a7791288e76f Mon Sep 17 00:00:00 2001 From: mmc <1556375442@qq.com> Date: Sat, 9 May 2026 09:23:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=8F=E8=AE=AE=E8=8E=B7=E5=8F=96=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=20=E6=8E=A5=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SystemSetting/DeviceAccessPage.tsx | 48 +++++++++++-------- 1 file changed, 28 insertions(+), 20 deletions(-) diff --git a/src/components/SystemSetting/DeviceAccessPage.tsx b/src/components/SystemSetting/DeviceAccessPage.tsx index fbb8ed8..5b0163c 100644 --- a/src/components/SystemSetting/DeviceAccessPage.tsx +++ b/src/components/SystemSetting/DeviceAccessPage.tsx @@ -123,17 +123,17 @@ export default function DeviceAccessPage() { pageSize: 10, total: 0, }); + + // 获取协议列表 const getConnectList = () => { getConnectTypes("").then(res => { if (res.code == 200) { setProtocolList(res.data || []); } else { setProtocolList([]); - } - }); - } + }; // 删除物模型 const handleDeleteModel = (id) => { @@ -327,11 +327,11 @@ export default function DeviceAccessPage() { if (activeTab === 'model') { getModel(); } - }, [pagination.current, pagination.pageSize, activeTab]); + useEffect(() => { getConnectList(); - }, []) + }, []); // 表格列 const deviceColumns = [ @@ -436,10 +436,9 @@ export default function DeviceAccessPage() {