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() {